/* ============================================
   Font Declarations
   ============================================ */
@font-face {
    font-family: 'Geist';
    src: url('../fonts/geist/Geist-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   Global Base Styles - Light Theme
   ============================================ */
:root {
    /* Backgrounds */
    --bg-page: #FAFAFA; /* page background */
    --bg-card: #ffffff; /* cards, modals, dropdowns */
    --bg-muted: #f0f1f3; /* muted containers (pagination, subtle panels) */
    --bg-hover: #eef2f1; /* hover surfaces */
    --border-color: #e3e5e8;
    /* Text */
    --text-strong: #1A1A2E; /* headings, titles */
    --text-body: #1A1A2E; /* body text */
    --text-muted: #6b7280; /* secondary text */
    /* Primary accent (INDIGO) */
    --accent: #5A5AFF; /* primary brand color */
    --accent-hover: #4848CC; /* darker hover state */
    --accent-weak: #C5C5FF; /* subtle ring/background tints */
    /* Secondary accent (MINT) */
    --accent2: #00FFB4; /* highlight/CTA color */
    --accent2-hover: #00CC90;
    /* Tertiary accent (SKY BLUE) */
    --accent3: #78E3FD; /* decorative/info elements */
    --accent3-hover: #5ED4F0;
    /* Inputs */
    --input-bg: #ffffff;
    --input-border: #d7dbe0;
    --input-text: #1A1A2E;
    /* Legacy fallbacks for your existing usage */
    --bg-dark: var(--bg-page);
    --bg-mid: var(--bg-muted);
    --bg-light: var(--bg-card);
    --text-light: var(--text-body);
}


html {
    font-size: 14px;
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed navbar height */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    margin-bottom: 80px;
    padding-top: 20px;
    min-height: 100vh;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Typography - Main titles use Geist */
h1, h2, h3,
.h1, .h2, .h3 {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

h1, .h1 {
    font-size: 3.75rem;
}

.hero-title {
    font-size: 5.5rem;
    text-align: left;
    line-height: 0.95;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

h2, .h2 {
    font-size: 3.25rem;
}

h3, .h3 {
    font-size: 1.75rem;
}

/* Smaller headings use Geist */
h4, h5, h6,
.h4, .h5, .h6 {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: 0.00em;
    color: var(--text-strong);
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.lead {
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* =========================
   OVERRIDE BOOTSTRAP CSS VARIABLES
========================= */
:root {
    /* Bootstrap primary color overrides */
    --bs-primary: #5A5AFF;
    --bs-primary-rgb: 90, 90, 255;
    --bs-link-color: #5A5AFF;
    --bs-link-color-rgb: 90, 90, 255;
    --bs-link-hover-color: #4848CC;
    --bs-link-hover-color-rgb: 72, 72, 204;

    /* Bootstrap subtle background overrides */
    --bs-primary-bg-subtle: #E8E8FF;
    --bs-primary-text-emphasis: #3A3ACC;
    --bs-primary-border-subtle: #C5C5FF;

    /* Bootstrap success color overrides (Mint) */
    --bs-success: #00FFB4;
    --bs-success-rgb: 0, 255, 180;
    --bs-success-bg-subtle: rgba(0, 255, 180, 0.15);
    --bs-success-text-emphasis: #00CC90;
    --bs-success-border-subtle: rgba(0, 255, 180, 0.3);

    /* Bootstrap info color overrides (Sky Blue) */
    --bs-info: #78E3FD;
    --bs-info-rgb: 120, 227, 253;
    --bs-info-bg-subtle: #E0F7FA;
    --bs-info-text-emphasis: #5ED4F0;
}

.text-primary {
    color: var(--accent) !important;
}

.text-primary:hover {
    color: var(--accent-hover) !important;
}

.bg-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    border-radius: 10px;
}

.bg-primary-subtle {
    background-color: var(--bs-primary-bg-subtle) !important;
}

.text-primary-emphasis {
    color: var(--bs-primary-text-emphasis) !important;
}

.border-primary {
    border-color: var(--accent) !important;
}

.border-primary-subtle {
    border-color: var(--bs-primary-border-subtle) !important;
}

/* =========================
   BOOTSTRAP SUCCESS COLOR OVERRIDES (Mint)
========================= */
.text-success {
    color: #00CC90 !important; /* Darker mint for better readability */
}

.bg-success {
    background-color: #00FFB4 !important;
}

.bg-success.bg-opacity-10,
.bg-success.bg-opacity-25 {
    background-color: rgba(0, 255, 180, 0.15) !important;
}

.btn-success {
    background-color: #00FFB4 !important;
    border-color: #00FFB4 !important;
    color: #1A1A2E !important;
}

.btn-success:hover {
    background-color: #00CC90 !important;
    border-color: #00CC90 !important;
}

.btn-outline-success {
    color: #00CC90 !important;
    border-color: #00CC90 !important;
}

.btn-outline-success:hover {
    background-color: #00FFB4 !important;
    border-color: #00FFB4 !important;
    color: #1A1A2E !important;
}

.border-success {
    border-color: #00FFB4 !important;
}

/* =========================
   BOOTSTRAP INFO COLOR OVERRIDES (Sky Blue)
========================= */
.text-info {
    color: #5ED4F0 !important;
}

.bg-info {
    background-color: #78E3FD !important;
}

.btn-info {
    background-color: #78E3FD !important;
    border-color: #78E3FD !important;
    color: #1A1A2E !important;
}

.btn-outline-info {
    color: #5ED4F0 !important;
    border-color: #78E3FD !important;
}

.btn-outline-info:hover {
    background-color: #78E3FD !important;
    color: #1A1A2E !important;
}

/* ============================================
   General Elements
   ============================================ */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.btn {
    border-radius: 10px !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

.btn-outline-primary {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

.btn-secondary,
.btn-outline-secondary {
    border-radius: 10px !important;
}

/* ============================================
   Landing Page Navigation
   ============================================ */
.landing-nav-link {
    color: #1A1A2E !important;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none !important;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.2s ease, opacity 0.2s ease;
    background: none !important;
    border: none !important;
}

.landing-nav-link:hover {
    color: #5A5AFF !important;
    text-decoration: none !important;
    opacity: 0.9;
}

.landing-nav-link:focus,
.landing-nav-link:active {
    color: #5A5AFF !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Landing page mobile navbar */
.navbar-toggler {
    padding: 0.5rem;
    border: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
}

@media (max-width: 991.98px) {
    /* Ensure the navbar container allows the collapse to be visible */
    .navbar.fixed-top .container {
        flex-wrap: wrap;
    }

    /* Override Bootstrap's default collapse behavior for navbar */
    .navbar .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        width: 100%;
    }

    /* When collapse is shown, display as block with styling */
    .navbar .navbar-collapse.show,
    .navbar .navbar-collapse.collapsing {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-color: #FFFFFF;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid #eee;
        position: relative;
        z-index: 1000;
    }

    /* Ensure navbar-nav is visible when collapse is shown */
    .navbar .navbar-collapse.show .navbar-nav,
    .navbar .navbar-collapse.collapsing .navbar-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .navbar-collapse .navbar-nav {
        gap: 0 !important;
        width: 100%;
        flex-direction: column;
    }

    .navbar-collapse .nav-item {
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .navbar-collapse .nav-item:last-child {
        border-bottom: none;
    }

    .navbar-collapse .nav-link,
    .navbar-collapse .landing-nav-link {
        padding: 0.75rem 0.5rem !important;
        display: block;
        width: 100%;
        color: #1A1A2E !important;
    }

    /* Sign up button on mobile */
    .navbar-collapse .btn {
        width: 100%;
        margin-top: 0.75rem;
        text-align: center;
        display: block;
    }

    /* Make sure navbar toggler is visible */
    .navbar-toggler {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Sign up button hover effect */
.navbar .btn[style*="background-color: #1A1A2E"]:hover {
    background-color: #2A2A4E !important;
    transform: translateY(-1px);
}

/* ============================================
   Forms
   ============================================ */
.form-control, .form-select {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
}

    .form-control:focus, .form-select:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.18);
        background-color: var(--input-bg);
        color: var(--input-text);
    }

    .form-control::placeholder {
        color: var(--text-muted);
    }



/* ============================================
   Cards & Containers
   ============================================ */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-body);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

/* Onboarding checklist card - override default card styles */
.onboarding-card {
    background: linear-gradient(135deg, #5A5AFF 0%, #1A1A2E 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

.onboarding-card .card-body {
    color: #ffffff !important;
}

.onboarding-card h1,
.onboarding-card h2,
.onboarding-card h3,
.onboarding-card h4,
.onboarding-card h5,
.onboarding-card h6 {
    color: #ffffff !important;
}

.onboarding-card a {
    color: #ffffff !important;
}

.onboarding-card a:hover {
    color: #ffffff !important;
    text-decoration: none;
}


.card-body {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Container stays as you had it */
.video-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* Loader overlay */
.video-loading {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000; /* keep it black until content is ready */
    z-index: 1;
    opacity: 1;
    transition: opacity .35s ease; /* smooth fade-out */
}

    /* Hide loader when ready */
    .video-loading.is-hidden {
        opacity: 0;
        pointer-events: none;
    }

/* Media fade-in */
.video-fade {
    opacity: 0;
    transition: opacity .35s ease; /* smooth fade-in */
}

    .video-fade.is-visible {
        opacity: 1;
    }

/* Optional: respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .video-loading,
    .video-fade {
        transition: none;
    }
}

/* ============================================
   Navbar (Signed Out)
   ============================================ */
.navbar {
    background-color: var(--bg-mid);
    transition: all 0.3s ease-in-out;
}

    .navbar .navbar-brand {
        color: var(--accent2-hover) !important;
    }
        .navbar .navbar-brand:hover {
            color: var(--accent2-hover) !important;
        }

    .navbar .nav-link {
        color: var(--text-light);
        position: relative;
        font-weight: 500;
        padding-bottom: 6px;
        transition: color 0.25s ease-in-out;
    }

        .navbar .nav-link::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0%;
            height: 2px;
            background-color: var(--accent);
            transition: width 0.25s ease-in-out;
        }

        .navbar .nav-link:hover {
            color: var(--accent);
        }

            .navbar .nav-link:hover::after,
            .navbar .nav-link.active::after {
                width: 100%;
            }

        .navbar .nav-link.active {
            color: var(--accent);
        }

    .navbar.fixed-top.scrolled {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    }

/* Account dropdown refinement */
.topbar .dropdown-menu {
    min-width: 180px; /* smaller menu width */
    padding: 0.25rem 0;
    font-size: 0.875rem; /* slightly smaller text */
    line-height: 1.3;
}

.topbar .dropdown-item {
    padding: 0.4rem 0.9rem; /* less vertical padding */
    font-size: 0.875rem;
    color: var(--text-light);
}

    .topbar .dropdown-item:hover {
        background-color: var(--bg-hover);
        color: var(--accent);
    }

.topbar .dropdown-header {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 0.9rem;
}

.topbar .dropdown-divider {
    margin: 0.25rem 0;
    border-color: var(--border-color);
}

/* Responsive topbar styles */
.topbar-journey-select select {
    min-width: 200px;
}

.topbar-notifications-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.topbar-email {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .topbar-journey-select select {
        min-width: 140px;
        max-width: 180px;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        padding: 0 0.75rem;
    }

    .topbar-journey-select {
        flex: 1;
        max-width: 200px;
    }

    .topbar-journey-select select {
        min-width: unset;
        max-width: 100%;
    }

    .topbar-icon-btn {
        padding: 0.375rem 0.5rem;
    }

    .topbar-profile-btn {
        padding: 0.375rem 0.5rem;
    }

    .topbar-notifications-dropdown {
        width: calc(100vw - 24px);
        max-width: 320px;
        right: -60px !important;
    }
}

/* ============================================
   Dashboard Layout
   ============================================ */
body.signed-in {
    display: flex;
    padding-top: 0;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background-color: #fafafa; /* neutral panel */
    border-right: 1px solid #c8cad0; /* Darker border visible against topbar */
    display: flex;
    flex-direction: column;
    z-index: 1020;
    padding: 0; /* remove extra padding */
    overflow: hidden; /* no scroll here */
}

/* Brand area: same height as topbar (80px) */
.sidebar-brand {
    position: relative;
    flex-shrink: 0;
    height: 80px; /* match .topbar height */
    display: flex;
    align-items: center;
    justify-content: center; /* Center logo horizontally */
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #e8e8ec; /* Matches topbar */
}

.sidebar-logo {
    height: 36px;
    width: auto;
}

/* Show full logo by default, hide icon */
.sidebar-logo-full {
    display: block;
}

.sidebar-logo-icon {
    display: none;
    height: 32px;
}

/* Plan badge next to logo */
.sidebar-plan-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 50px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-plan-badge.plan-free {
    background-color: #e8e8ec;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.sidebar-plan-badge.plan-pro {
    background: linear-gradient(135deg, #5A5AFF, #7B68EE);
    color: #fff;
}

.sidebar-plan-badge.plan-max {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    color: #fff;
}

/* Usage counters */
.sidebar-usage-counters {
    background: #f3f4f6;
    border-radius: 8px;
    margin: 0 0.25rem 0.5rem;
}

/* Upgrade card pinned at bottom */
.sidebar-upgrade-card {
    flex-shrink: 0;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.upgrade-card-inner {
    background: linear-gradient(135deg, #EEF0FF 0%, #F5F3FF 100%);
    border: 1px solid #D4D4FF;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.upgrade-card-icon {
    font-size: 1.5rem;
    color: #5A5AFF;
    margin-bottom: 0.25rem;
}

.upgrade-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 0.25rem;
}

.upgrade-card-text {
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.upgrade-card-btn {
    display: inline-block;
    background: linear-gradient(135deg, #5A5AFF, #7B68EE);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.upgrade-card-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 90, 255, 0.3);
}

/* Scrollable nav area */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1rem 1.5rem;
}

    /* Optional: nicer scrollbar */
    .sidebar-nav::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: #c8c8c8;
        border-radius: 4px;
    }

        .sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Adjust nav spacing inside sidebar */
.sidebar .nav {
    margin-top: 0; /* you had 1.5rem; optional */
    flex-grow: 1;
}

    .sidebar .nav-link {
        color: var(--text-body);
        padding: 0.75rem 0.9rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
    }

        .sidebar .nav-link i {
            font-size: 1.2rem;
            transition: transform 0.2s ease;
        }

        .sidebar .nav-link:hover {
            background-color: var(--bg-hover);
            color: var(--accent);
            transform: translateX(4px);
        }

            .sidebar .nav-link:hover i {
                transform: translateX(3px);
                color: currentColor;
            }

        .sidebar .nav-link.active {
            background-color: rgba(244, 211, 94, 0.22); /* yellow tint */
            color: var(--accent);
            font-weight: 600;
            border: 1px solid rgba(244, 211, 94, 0.65);
        }

            .sidebar .nav-link.active i {
                color: var(--accent);
            }

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 80px;
    background-color: #e8e8ec; /* Slightly darker gray than body */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1rem;
    z-index: 1020;
    line-height: 80px;
}

    .topbar .dropdown-menu {
        background-color: var(--bg-light);
        border: 1px solid var(--border-color);
    }

    .topbar .dropdown-item {
        color: var(--text-light);
    }

        .topbar .dropdown-item:hover {
            background-color: var(--bg-hover);
            color: var(--accent);
        }

/* MAIN CONTENT */
.main-content {
    margin-left: 240px;
    margin-top: 30px;
    padding: 2rem;
    flex: 1;
}

/* ============================================
   Parallax Hero (Landing Page)
   ============================================ */
.parallax-hero {
    height: 100vh;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    margin-top: -60px;
}

    .parallax-hero h1 {
        text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
        max-width: 700px;
        margin: 0 auto;
        line-height: 1.2;
    }

/* Landing page headings use Geist */
.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page .h1,
.landing-page .h2,
.landing-page .h3 {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Hero title uses Geist */
.landing-page .hero-title {
    display: block;
    text-align: left;
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 800;
}

/* ============================================
   Alerts, Modals & Badges
   ============================================ */

.alert {
    background-color: var(--bg-card);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* keep gentle rounding for readability */
}

/* Hide empty validation summary alerts */
.alert:empty {
    display: none;
}

/* Info: soft blue tint + accent stripe */
.alert-info {
    background-color: #E0F7FA !important; /* light sky blue wash */
    border-left: 4px solid #78E3FD !important;
    border-color: #78E3FD !important;
    color: var(--text-body) !important;
}

    /* Make the info icon align with the accent */
    .alert-info i {
        color: #78E3FD !important;
    }

/* =========================
   PROGRESS BARS - Brand Colors
========================= */
.progress {
    background-color: var(--bg-muted);
    border-radius: 4px;
}

.progress-bar.bg-success {
    background-color: #00FFB4 !important; /* Mint - good/plenty remaining */
}

.progress-bar.bg-warning {
    background-color: #78E3FD !important; /* Sky Blue - approaching limit */
}

.progress-bar.bg-danger {
    background-color: #5A5AFF !important; /* Indigo - at limit */
}

.progress-bar.bg-primary {
    background-color: #5A5AFF !important; /* Indigo */
}

.modal-content {
    background-color: var(--bg-card);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
}

/* Only style plain badges without Bootstrap bg-* classes */
.badge:not([class*="bg-"]) {
    background-color: var(--accent-weak);
    color: var(--accent);
}

.badge.badge-secondary {
    background-color: var(--accent2);
    color: var(--text-strong);
}

/* Ensure Bootstrap bg-primary badges have white text */
.badge.bg-primary {
    color: #fff !important;
}

/* Fix contrast for bg-opacity-10 circles with text-primary icons */
.bg-primary.bg-opacity-10 {
    background-color: rgba(90, 90, 255, 0.15) !important;
}

.bg-primary.bg-opacity-10 .text-primary,
.bg-primary.bg-opacity-10.text-primary {
    color: #4040CC !important; /* Darker indigo for better contrast */
}


/* ============================================
   SortableJS � Drag & Drop Styling
   ============================================ */
.organize-scroll {
    background: var(--bg-muted) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    padding: 0.75rem;
    border-radius: 10px;
    max-height: calc(100vh - 240px);
    min-height: calc(100vh - 240px);
    overflow-y: scroll;
    scrollbar-gutter: stable; /* modern browsers: prevents shift when it shows/hides */
    position: relative;
}
.is-dragging {
    transform-origin: top left;
}
.organize-scroll {
    scrollbar-gutter: stable; /* Modern browsers */
}
.organize-scroll {
    max-height: calc(100vh - 240px);
    min-height: calc(100vh - 240px); /*  prevents shrinking during drag */
    overflow-y: auto;
}

.topic-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    transition: background-color .2s ease;
}
    .topic-card:hover {
        background-color: var(--bg-hover);
    }

    .topic-card .card-header {
        cursor: grab;
    }
    .topic-card.dragging-topic {
        height: 60px !important; /* or whatever your topic header height is */
        overflow: hidden;
    }
.organize-scroll.dragging {
    padding-right: 17px; /* or scrollbar width in px */
    overflow-y: scroll; /* force scrollbar space */
}

.list-group-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    cursor: grab;
    transition: background-color .18s ease;
}

    .list-group-item:hover {
        background-color: var(--bg-hover);
    }

.is-chosen {
    opacity: .98;
    z-index: 1000;
}
/* Review if broken*/
.is-ghost {
    opacity: .85;
    background-color: var(--bg-hover) !important;
    border: 1px dashed var(--accent) !important;
    box-shadow: 0 0 8px rgba(46, 125, 50, .25);
}

/* When dragging a topic, hide its class list */
.topic-card.dragging-topic .list-group,
.topic-card.is-ghost .list-group,
.topic-card.is-chosen .list-group {
    display: none !important;
}

.topic-card.dragging-topic .card-header,
.topic-card.is-ghost .card-header,
.topic-card.is-chosen .card-header {
    border-bottom: none;
}

.sortable-topics > .topic-card,
.sortable-topic > .list-group-item {
    will-change: transform;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    background-color: var(--bg-muted);
    border-radius: 12px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.25);
    padding: 0.75rem;
}
.page-link {
    color: var(--text-body);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================
   Misc Utilities
   ============================================ */
.text-muted {
    color: var(--text-muted) !important;
}

.noselect {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* =========================
   FORM INPUTS & LABELS
========================= */
.form-label {
    color: var(--text-body);
}

.form-control,
.form-select,
textarea.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

    .form-control::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
    }

    .form-control:focus,
    .form-select:focus,
    textarea.form-control:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.18);
        border-radius: 10px;
    }

/* Large inputs for titles and URLs */
.form-control-lg {
    font-size: 1rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
}

/* =========================
   MODALS
========================= */
.modal-content {
    background-color: var(--bg-card);
    color: var(--text-body);
    border: 1px solid var(--border-color);
}


.modal-header,
.modal-footer {
    border-color: var(--border-color);
}

.modal .form-control,
.modal .form-select {
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 7px; /* matches your inputs/buttons */
}

    .modal .form-control:focus,
    .modal .form-select:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.18);
    }


/* =========================
   BADGES AND TAGS
========================= */
.tag-badge {
    background-color: var(--bg-muted); /* light chip bg */
    color: var(--accent); /* green text */
    border: 1px solid var(--accent);
    display: inline-flex; /* keep your layout */
    align-items: center;
    padding-right: 0.5rem;
}

    /* Close button on light chips: remove the dark-theme inversion */
    .tag-badge .btn-close {
        filter: none !important; /* override JS-injected invert */
        opacity: 0.7;
        width: 0.6em;
        height: 0.6em;
        margin-left: 0.4rem;
    }

        .tag-badge .btn-close:hover {
            opacity: 1;
        }

/* =========================
   APP NAME / BRAND COLOR
========================= */
.navbar .navbar-brand,
.sidebar .navbar-brand {
    color: var(--accent) !important;
}

    .navbar .navbar-brand:hover,
    .sidebar .navbar-brand:hover {
        color: var(--accent-hover) !important;
        text-decoration: none;
    }

.navbar-logo {
    height: 40px;
    width: auto;
}

/* =========================
   COURSE HERO & HEADERS
========================= */
.course-hero {
    background-color: var(--bg-muted) !important;
    color: var(--text-body);
    border-radius: 10px;
}

    .course-hero h1 {
        color: var(--text-strong) !important; /* strong readable header */
        font-weight: 700;
    }
.badge.bg-primary.bg-opacity-10.text-primary.border {
    background-color: var(--accent-weak) !important; /* soft green wash */
    color: var(--accent) !important;
    border: 1px solid var(--accent) !important;
}


/* =========================
   COURSE HERO TITLE � STRONG OVERRIDE
======================= == */
.course-hero h1 {
    color: #43474f !important; /* dark, readable (no border) */
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    text-shadow: none; /* remove the glow/border-ish look */
}

.course-hero p.lead {
    color: #43474f !important; /* �almost black� description */
    font-weight: 400;
}



/* ============================================
   THEME FIX � Disabled States
============================================ */
.form-control:disabled,
.form-select:disabled,
textarea.form-control:disabled,
input[readonly],
textarea[readonly] {
    background-color: #f6f7f9 !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
    opacity: 0.8;
    cursor: not-allowed;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
    background-color: var(--bg-muted) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.5;
}

/* =========================
   Student Preview Frame
========================= */
.preview-frame {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    overflow: hidden;
}

/* top strip: subtle, not yelling */
.preview-topbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-color);
    font-size: .875rem;
    color: var(--text-muted);
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: var(--accent);
    opacity: .85;
}

/* inner content area that simulates the student page canvas */
.preview-canvas {
    padding: 1.25rem;
    background: var(--bg-page);
}

    /* normalize �student view� typography inside the frame */
    .preview-canvas h1,
    .preview-canvas .display-5 {
        color: var(--text-strong) !important;
        text-shadow: none;
    }

    .preview-canvas .lead {
        color: var(--text-body) !important;
    }

.preview-meta {
    color: var(--text-muted);
}

/* video placeholder if no video */
.preview-video-placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(180deg, var(--bg-muted), var(--bg-hover));
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: .95rem;
    color: var(--text-muted);
}

/* hero inside preview: slightly lifted */
.preview-hero {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

/* tags in preview */
.preview-tag {
    background-color: var(--accent-weak) !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent) !important;
}

/* soft divider that feels native */
.preview-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0 1.25rem;
}
.journey-tree .node {
    position: relative;
    padding: 0.25rem 0.5rem;
    margin: 0.1rem 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.journey-node {
    background-color: #e8f4ff;
}

.chapter-node {
    background-color: #f3f0ff;
}

.lesson-node {
    background-color: #f8f9fa;
}

.journey-tree li {
    position: relative;
    margin-left: 1rem;
}

    /* connector lines */
    .journey-tree li::before {
        content: "";
        position: absolute;
        left: -0.75rem;
        top: 0;
        bottom: 0;
        border-left: 1px solid #dee2e6;
    }

    .journey-tree li::after {
        content: "";
        position: absolute;
        left: -0.75rem;
        top: 0.8rem;
        width: 0.75rem;
        border-top: 1px solid #dee2e6;
    }

    /* no vertical line for last child */
    .journey-tree li:last-child::before {
        bottom: 0.8rem;
    }

/* ============================================
   Student Collapsible Sidebar
   ============================================ */

/* Toggle button styling */
.sidebar-toggle {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.sidebar-toggle:hover {
    background: var(--accent-weak);
    border-color: var(--accent);
}

.sidebar-toggle i {
    font-size: 1.2rem;
    color: var(--text-body);
    transition: transform 0.3s ease;
}

/* Sidebar transition for smooth collapse */
body.student-view .sidebar,
body.student-view .topbar,
body.student-view .main-content {
    transition: all 0.3s ease;
}

body.student-view .sidebar .nav-link span {
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

/* Collapsed state for student sidebar (desktop) */
body.student-view.sidebar-collapsed .sidebar {
    width: 70px;
}

body.student-view.sidebar-collapsed .sidebar-brand {
    padding: 0;
    justify-content: center;
}

body.student-view.sidebar-collapsed .sidebar-brand .navbar-brand {
    justify-content: center;
    width: 100%;
}

/* Show isotipo, hide full logo when collapsed */
body.student-view.sidebar-collapsed .sidebar-logo-full {
    display: none;
}

body.student-view.sidebar-collapsed .sidebar-logo-icon {
    display: block;
    height: 32px;
}

body.student-view.sidebar-collapsed .sidebar-nav {
    padding: 0.75rem 0.5rem;
}

body.student-view.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 0.75rem;
    position: relative;
}

body.student-view.sidebar-collapsed .sidebar .nav-link span {
    display: none;
}

body.student-view.sidebar-collapsed .sidebar .nav-link i {
    margin: 0;
    font-size: 1.4rem;
}

/* Tooltip on hover for collapsed state */
body.student-view.sidebar-collapsed .sidebar .nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-strong);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-left: 8px;
    z-index: 1050;
}

body.student-view.sidebar-collapsed .sidebar .nav-link:hover::after {
    opacity: 1;
}

body.student-view.sidebar-collapsed .topbar {
    left: 70px;
}

body.student-view.sidebar-collapsed .main-content {
    margin-left: 70px;
}

/* Toggle icon rotation when collapsed */
body.student-view.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Hide sidebar toggle button text in collapsed */
body.student-view.sidebar-collapsed .sidebar-toggle {
    padding: 0.6rem;
}

/* Mobile responsive: hide sidebar on small screens for students */
@media (max-width: 992px) {
    /* Show hamburger button on mobile */
    body.student-view .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide sidebar by default on mobile */
    body.student-view .sidebar {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
        z-index: 1035;
    }

    /* Show sidebar when expanded */
    body.student-view.sidebar-expanded .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.25);
    }

    /* Main content takes full width on mobile */
    body.student-view .main-content {
        margin-left: 0;
        padding: 1rem 0.75rem;
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Prevent horizontal scroll on mobile */
    body.student-view {
        overflow-x: hidden;
    }

    body.student-view .topbar {
        left: 0;
    }

    /* Show all sidebar content when expanded */
    body.student-view.sidebar-expanded .sidebar .nav-link span {
        display: inline;
    }

    body.student-view.sidebar-expanded .sidebar .nav-link {
        justify-content: flex-start;
    }

    /* Overlay when sidebar is expanded */
    body.student-view.sidebar-expanded::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1025;
        animation: fadeIn 0.2s ease;
    }

    /* Hide desktop toggle on mobile */
    body.student-view .sidebar-toggle {
        display: none;
    }
}

/* Legacy: Keep old styles for backwards compatibility */
@media (max-width: 768px) {
    body.student-view .sidebar-brand {
        padding: 0 1rem;
        height: 60px;
    }

    body.student-view .sidebar-nav {
        padding: 0.5rem 1rem;
    }

    /* Disable tooltip on mobile (touch devices) */
    body.student-view .sidebar .nav-link::after {
        display: none;
    }

    /* Expanded state on mobile (when user taps hamburger) */
    body.student-view.sidebar-expanded .sidebar {
        width: 260px;
        position: fixed;
        z-index: 1030;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }

    body.student-view.sidebar-expanded .sidebar-brand {
        padding: 0 1rem;
        justify-content: flex-start;
        height: 60px;
    }

    body.student-view.sidebar-expanded .sidebar-brand .navbar-brand {
        justify-content: flex-start;
    }

    body.student-view.sidebar-expanded .sidebar-logo {
        height: 32px;
    }

    body.student-view.sidebar-expanded .sidebar-nav {
        padding: 1rem;
    }

    body.student-view.sidebar-expanded .sidebar .nav-link {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    body.student-view.sidebar-expanded .sidebar .nav-link span {
        display: inline;
    }

    body.student-view.sidebar-expanded .sidebar .nav-link i {
        font-size: 1.2rem;
        margin-right: 0.75rem;
    }

    /* Overlay when sidebar is expanded on mobile */
    body.student-view.sidebar-expanded::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1025;
        animation: fadeIn 0.2s ease;
    }

    /* Mobile hamburger button in topbar */
    body.student-view .mobile-menu-toggle {
        display: flex;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    body.student-view .main-content {
        padding: 0.75rem;
    }
}

/* Hide mobile toggle on desktop */
@media (min-width: 993px) {
    body.student-view .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile menu toggle button - inline in topbar */
.mobile-menu-toggle {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    margin-right: auto;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:active {
    background: rgba(0,0,0,0.08);
}

.mobile-menu-toggle i {
    font-size: 1.4rem;
    color: #334155;
    line-height: 1;
}

/* ============================================
   Video Picker Styles
   ============================================ */
.video-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--border-color);
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#videoPickerModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#videoPickerModal .card-img-top {
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   Toast Alerts (Fixed Position)
   ============================================ */
.toast-container-fixed {
    position: fixed;
    top: 90px; /* Below topbar (80px) + 10px gap */
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    pointer-events: auto;
    animation: toastSlideIn 0.4s ease-out forwards;
    position: relative;
    overflow: hidden;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-alert.toast-hiding {
    animation: toastSlideOut 0.4s ease-in forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Toast types */
.toast-error {
    border-left-color: #dc3545;
}

.toast-error .toast-icon {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.toast-success {
    border-left-color: var(--accent);
}

.toast-success .toast-icon {
    color: var(--accent);
    background: rgba(46, 125, 50, 0.1);
}

.toast-info {
    border-left-color: #0d6efd;
}

.toast-info .toast-icon {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

/* Toast icon */
.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Toast content */
.toast-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-strong);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.4;
    word-break: break-word;
}

/* Toast close button */
.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-strong);
}

/* Progress bar for auto-dismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    animation: toastProgress 6s linear forwards;
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, #dc3545, #f8d7da);
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, var(--accent), var(--accent-weak));
}

.toast-info .toast-progress {
    background: linear-gradient(90deg, #0d6efd, #cfe2ff);
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Signed-out users: different top position (navbar is ~60px) */
.toast-container-signedout {
    top: 70px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toast-container-fixed {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast-alert {
        padding: 12px 14px;
    }
}

/* ============================================
   Animated Bookshelf Menu Icon (SVG hover animation)
   ============================================ */
@keyframes book-bounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(0); }
    100% { transform: translateY(0); }
}

@keyframes shelf-lift {
    0% { transform: translateY(0) rotate(0); }
    20% { transform: translateY(-4px) rotate(10deg); }
    40% { transform: translateY(-4px) rotate(0); }
    60% { transform: translateY(-4px) rotate(-10deg); }
    80% { transform: translateY(0); }
    100% { transform: translateY(0); }
}

.book-shelf-icon {
    width: 70px;
    height: 48px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 1px;
}

.book-shelf-icon:hover {
    cursor: pointer;
}

.book-shelf-icon:hover .book-shelf__book {
    animation: book-bounce 0.4s ease;
    animation-iteration-count: 1;
}

.book-shelf-icon:hover .book-shelf__book--two {
    animation-delay: 0.04s;
}

.book-shelf-icon:hover .book-shelf__book--three {
    animation-delay: 0.08s;
}

.book-shelf-icon:hover .book-shelf__shelf {
    animation: shelf-lift 0.4s ease;
    animation-iteration-count: 1;
    transform-origin: 50% 50%;
}

/* Also animate when hovering the parent nav-link */
.nav-link:hover .book-shelf-icon .book-shelf__book {
    animation: book-bounce 0.4s ease;
    animation-iteration-count: 1;
}

.nav-link:hover .book-shelf-icon .book-shelf__book--two {
    animation-delay: 0.04s;
}

.nav-link:hover .book-shelf-icon .book-shelf__book--three {
    animation-delay: 0.08s;
}

.nav-link:hover .book-shelf-icon .book-shelf__shelf {
    animation: shelf-lift 0.4s ease;
    animation-iteration-count: 1;
    transform-origin: 50% 50%;
}

/* ============================================
   YouTube Embed Fallback Styles
   ============================================ */
.youtube-embed-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border-radius: 8px;
    z-index: 10;
}

.youtube-fallback-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.youtube-fallback-icon {
    font-size: 4rem;
    color: #ff0000;
    margin-bottom: 1rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

.youtube-fallback-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.youtube-fallback-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.youtube-fallback-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 50px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.youtube-fallback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .youtube-fallback-content {
        padding: 1.5rem;
    }

    .youtube-fallback-icon {
        font-size: 3rem;
    }

    .youtube-fallback-title {
        font-size: 1.1rem;
    }

    .youtube-fallback-text {
        font-size: 0.85rem;
    }
}
