:root {
    --primary: #a20a0a;
    --primary-dark: #7c0808;
    --danger: #d9534f;
    --danger-dark: #c9302c;
    --bg: #f7f4ee;
    --card-bg: #ffffff;
    --text-main: #2b2d42;
    --text-light: #475569;
    --border-color: rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --accent: #f3a83b;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Navbar Styles */
.app-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 900;
}

body.dark-theme .app-nav {
    background: rgba(18, 19, 28, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    line-height: 1.15;
    white-space: nowrap;
    margin-right: 40px;
}

.nav-logo .logo-main {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.4px;
    white-space: nowrap;
    display: inline-block;
}

.nav-logo .logo-sub {
    font-size: 0.68rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    display: block;
    width: fit-content;
    margin: 3px auto 0 auto !important;
    text-align: center;
}

body.dark-theme .nav-logo .logo-sub {
    color: #6ee7b7;
    background: rgba(110, 231, 183, 0.15);
    border-color: rgba(110, 231, 183, 0.35);
}

.logo-accent {
    color: var(--primary);
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(162, 10, 10, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9990;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-4px) scale(1.08);
}

/* Floating Quests Badge (Interroller Banner) */
.floating-quests-badge {
    position: fixed;
    bottom: 160px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3a83b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(243, 168, 59, 0.4);
    cursor: pointer;
    z-index: 9995;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.floating-quests-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: rgba(243, 168, 59, 0.4);
    z-index: -1;
    animation: questsPulse 2s infinite;
}

@keyframes questsPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.floating-quests-badge .quests-badge-icon {
    font-size: 1.5rem;
    user-select: none;
    transition: transform 0.3s ease;
}

.floating-quests-badge:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 30px rgba(243, 168, 59, 0.6);
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.floating-quests-badge:hover .quests-badge-icon {
    transform: rotate(15deg) scale(1.1);
}

.floating-quests-badge .quests-badge-tooltip {
    position: absolute;
    right: 65px;
    background: #11121d;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(243, 168, 59, 0.3);
}

.floating-quests-badge:hover .quests-badge-tooltip {
    opacity: 1;
    transform: translateX(0);
}


.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.925rem;
    transition: color 0.3s;
    padding: 6px 4px;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.active {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 4px;
    color: var(--primary);
}

/* Nav Badges */
.nav-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    margin-left: 4px;
    vertical-align: middle;
    display: inline-block;
}
.nav-badge.hot {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.nav-badge.pro {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.nav-badge.ai {
    background: rgba(162, 10, 10, 0.15);
    color: #f3a83b;
    border: 1px solid rgba(162, 10, 10, 0.4);
}
.nav-badge.new {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Nav Dropdown Styling */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.925rem;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
    white-space: nowrap !important;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.active .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle {
    color: var(--primary);
}

.nav-dropdown.active .nav-dropdown-toggle {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 4px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

body.dark-theme .nav-dropdown-menu {
    background: #181926;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu a {
    padding: 9px 12px !important;
    border-radius: 8px;
    font-size: 0.88rem !important;
    white-space: nowrap;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main) !important;
    text-decoration: none;
    border-bottom: none !important;
    transition: background 0.2s ease !important;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: rgba(162, 10, 10, 0.08);
    color: var(--primary) !important;
}

body.dark-theme .nav-dropdown-menu a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

/* Highlight first 3 features in dropdown menu */
.nav-dropdown-menu a:nth-of-type(2),
.nav-dropdown-menu a:nth-of-type(3),
.nav-dropdown-menu a:nth-of-type(4) {
    font-weight: 700 !important;
    border-left: 3px solid var(--accent) !important;
    background: rgba(243, 168, 59, 0.03);
}

body.dark-theme .nav-dropdown-menu a:nth-of-type(2),
body.dark-theme .nav-dropdown-menu a:nth-of-type(3),
body.dark-theme .nav-dropdown-menu a:nth-of-type(4) {
    background: rgba(243, 168, 59, 0.05);
}


/* Nav Contact Author Avatar */
.nav-contact-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px !important;
    border: 1px solid rgba(243, 168, 59, 0.4);
    border-radius: 20px;
    background: rgba(243, 168, 59, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    border-bottom: none !important;
}

.nav-contact-author:hover {
    background: rgba(243, 168, 59, 0.2);
    border-color: #f3a83b;
}

.nav-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f3a83b;
}

/* Mobile Hamburger Toggle & Drawer Fix */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-main);
    font-size: 1.3rem;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-theme .mobile-menu-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 65px;
        right: -100%;
        width: 290px;
        height: calc(100vh - 65px);
        background: var(--card-bg);
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.25);
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        grid-auto-rows: auto;
        align-content: start;
        padding: 24px 20px;
        gap: 15px 12px;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 9999;
        overflow-y: auto;
    }

    /* Normal menu links span the full width */
    .nav-links > a,
    .nav-links > .nav-dropdown {
        grid-column: span 3;
        order: 1;
        text-align: center;
    }

    .nav-links > .nav-user-hud {
        grid-column: span 3;
        order: 90;
        justify-self: center;
        margin: 15px 0 10px 0;
        width: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    /* Align utility icon buttons horizontally in a single row at the bottom of the drawer */
    .nav-links > #nav-share-btn {
        order: 100;
    }
    .nav-links > #notification-bell-container {
        order: 101;
    }
    .nav-links > #theme-toggle {
        order: 102;
    }

    .nav-links > #theme-toggle,
    .nav-links > #nav-share-btn,
    .nav-links > #notification-bell-container {
        grid-column: span 1;
        justify-self: center;
        align-self: center;
        margin: 10px 0 0 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50% !important;
        background: rgba(120, 120, 120, 0.08) !important;
        border: 1px solid rgba(120, 120, 120, 0.18) !important;
        padding: 0 !important;
        font-size: 1.15rem !important;
        transition: all 0.2s ease;
    }

    .nav-links > #notification-bell-container button {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 1.15rem !important;
        width: 100% !important;
        height: 100% !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    body.dark-theme .nav-links {
        background: #12131c;
        border-left-color: rgba(255, 255, 255, 0.1);
    }

    body.dark-theme .nav-links > #theme-toggle,
    body.dark-theme .nav-links > #nav-share-btn,
    body.dark-theme .nav-links > #notification-bell-container {
        background: rgba(255, 255, 255, 0.05) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    .nav-links.mobile-open {
        right: 0;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: center;
        gap: 6px;
        padding: 8px 0;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.04);
        opacity: 1;
        visibility: visible;
        display: none;
        padding: 6px 8px;
        margin-top: 4px;
        border-radius: 8px;
    }

    body.dark-theme .nav-dropdown-menu {
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: flex;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input, select, textarea, button {
    font-family: inherit;
}
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.text-danger { color: var(--danger); font-weight: 600; }
.text-success { color: var(--primary); font-weight: 600; }

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    background: radial-gradient(circle at top right, rgba(162, 10, 10, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(217, 83, 79, 0.05), transparent);
    animation: fadeInDown 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.highlight {
    color: var(--danger);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(217, 83, 79, 0.2);
    z-index: -1;
    transform: skewX(-15deg);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Intro Section */
.intro {
    padding: 40px 0;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.formula {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    font-size: 1.25rem;
    font-weight: 700;
}

.badge {
    background: var(--text-main);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.badge-success {
    background: var(--primary);
}

.operator {
    font-size: 2rem;
    color: var(--text-light);
}

/* Shifts Section */
.shifts {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Flip Card Styles */
.flip-card {
    background-color: transparent;
    height: 320px;
    perspective: 1500px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow);
}

.flip-card-front.bg-danger {
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
    border-left: 5px solid var(--danger);
}

.flip-card-back.bg-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 5px solid var(--primary);
    color: var(--text-main);
    transform: rotateY(180deg);
}

.card-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
    opacity: 0.1;
}

.flip-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.phrase {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid currentColor;
}

.bg-danger .phrase { color: var(--danger-dark); }
.bg-success .phrase { color: var(--primary-dark); }

.impact {
    font-size: 0.95rem;
    color: var(--text-light);
}

.hint {
    margin-top: auto;
    display: inline-block;
    font-size: 0.85rem;
    color: var(--danger);
    font-weight: 600;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Matrix Section */
.summary {
    padding: 60px 0 100px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: white;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.matrix-table th {
    background-color: var(--text-main);
    color: white;
    padding: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    text-align: left;
}

.matrix-table td {
    padding: 20px;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.3s;
}

.matrix-table tbody tr:hover td {
    background-color: #f7fafc;
}

.matrix-table tbody tr:last-child td {
    border-bottom: none;
}

/* Footer */
.footer {
    background: transparent;
    color: var(--text-main);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.final-quote {
    font-size: 2rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.4;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    color: #800020; /* Default Red Wine (Burgundy) for Light Theme */
    transition: color 0.3s ease;
}

body.dark-theme .final-quote {
    color: #ff6b6b; /* Lighter Wine Red/Coral for High Contrast in Dark Theme */
}

.final-quote::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: -20px;
    font-size: 6rem;
    color: rgba(255,255,255,0.1);
    font-family: serif;
}

.author {
    margin-top: 40px;
}

.author-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Ecosystem Section Design Upgrade */
.features-showcase {
    padding: 60px 0;
}

.ecosystem-header-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 35px;
}

.ecosystem-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px auto 40px;
    flex-wrap: wrap;
    max-width: 850px;
}

.ecosystem-category-intro {
    text-align: center;
    max-width: 700px;
    margin: -25px auto 35px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    min-height: 50px;
    transition: all 0.3s ease;
}

.eco-tab-btn {
    padding: 10px 22px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.dark-theme .eco-tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.eco-tab-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.eco-tab-btn.active {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(162, 10, 10, 0.3);
}

/* ==========================================================================
   B2B BD Cosmic Galaxy Ecosystem
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 30px 10px;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(162, 10, 10, 0.04) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.04) 0%, transparent 40%);
    border-radius: 30px;
}

@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

body.dark-theme .features-grid {
    background: radial-gradient(circle at 10% 20%, rgba(129, 140, 248, 0.07) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(244, 63, 94, 0.07) 0%, transparent 50%);
}

.feature-card {
    --planet-color: #ef4444; /* Default */
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Planet Glow Ring & Cosmic Nebula Path */
.feature-card::before {
    content: '';
    position: absolute;
    top: -45%;
    right: -45%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--planet-rgb, 239, 68, 68), 0.15) 0%, transparent 70%);
    z-index: -1;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--planet-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.dark-theme .feature-card {
    background: rgba(20, 21, 33, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(var(--planet-rgb, 239, 68, 68), 0.4);
    box-shadow: 0 20px 40px rgba(var(--planet-rgb, 239, 68, 68), 0.12),
                0 0 30px rgba(var(--planet-rgb, 239, 68, 68), 0.05);
}

.feature-card:hover::before {
    transform: scale(1.3) translate(-10px, 10px);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(var(--planet-rgb, 239, 68, 68), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--planet-color);
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0 1px rgba(var(--planet-rgb, 239, 68, 68), 0.15);
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.15) rotate(-8deg);
    background: var(--planet-color);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(var(--planet-rgb, 239, 68, 68), 0.4);
}

.feature-badge-pill {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: rgba(var(--planet-rgb, 239, 68, 68), 0.12) !important;
    color: var(--planet-color) !important;
    border: 1px solid rgba(var(--planet-rgb, 239, 68, 68), 0.25) !important;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-cta-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--planet-color) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.feature-card:hover .feature-cta-btn {
    transform: translateX(6px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .section-title { font-size: 2rem; }
    .glass-effect { padding: 25px; }
    .matrix-table th, .matrix-table td { padding: 15px; }
    .final-quote { font-size: 1.5rem; }
    .flip-card { height: 350px; }
}

/* Minigame Section */
.minigame {
    padding: 60px 0;
}
.game-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(162, 10, 10, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-main);
    margin-top: 20px;
}
.btn-secondary:hover {
    background-color: #cbd5e1;
}
.btn-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Be Vietnam Pro', sans-serif;
}
.btn-option:hover:not(:disabled) {
    border-color: var(--primary);
    background-color: rgba(162, 10, 10, 0.05);
}
.btn-option.correct {
    background-color: #dcfce7;
    border-color: var(--primary);
    color: var(--primary-dark);
}
.btn-option.wrong {
    background-color: #fee2e2;
    border-color: var(--danger);
    color: var(--danger-dark);
}
.btn-option:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}
.hidden {
    display: none !important;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}
.progress {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}
.timer-display {
    display: inline-block;
    background-color: #fee2e2;
    color: var(--danger-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: pulse 1s infinite alternate;
    box-shadow: 0 4px 6px rgba(217, 83, 79, 0.1);
}
.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-main);
    line-height: 1.5;
}
.feedback-msg {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    animation: fadeInUp 0.4s ease;
}
.feedback-msg.success {
    background-color: #dcfce7;
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}
.feedback-msg.error {
    background-color: #fee2e2;
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}
#result-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}
#result-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
    text-align: left;
}
.game-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px rgba(162, 10, 10, 0.15);
}

.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    z-index: 10;
}
.slider-nav-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    transform: scale(1.05);
}
.slider-nav-btn.prev-btn {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
}
.slider-nav-btn.next-btn {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
}

.game-slider-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.game-slider-container::-webkit-scrollbar {
    display: none;
}
.game-slider-track .game-card {
    flex: 0 0 320px;
    width: 320px;
    scroll-snap-align: center;
}
.level-tab-btn {
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.level-tab-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}
.level-tab-btn.active {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}


/* ==========================================================================
   Features Showcase & Navigation Styles
   ========================================================================== */

.features-showcase {
    padding: 60px 0 20px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 30px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(162, 10, 10, 0.15);
    border-color: rgba(162, 10, 10, 0.4);
    background: rgba(255, 255, 255, 0.7);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-main), #11998e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.feature-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.feature-link:hover {
    color: var(--primary-dark);
}

.feature-card:hover .feature-link {
    transform: translateX(5px);
}

.feature-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.feature-badge.badge-hot {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #ffffff;
}

.feature-badge.badge-new {
    background: linear-gradient(135deg, #8a2387, #e94057);
    color: #ffffff;
}

.feature-badge.badge-interactive {
    background: linear-gradient(135deg, #f27121, #e94057);
    color: #ffffff;
}

.feature-badge.badge-info {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: #ffffff;
}

.feature-badge.badge-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #ffffff;
}

/* Responsive Navigation for style.css */
/* Clean Mobile Header Fix */
@media (max-width: 992px) {
    .nav-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 16px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .nav-logo {
        text-align: left !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   Global Modal & Form Styles
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 10, 16, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #0f172a;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #0f172a;
}

.modal-subtitle {
    font-size: 1rem;
    color: #b45309;
    margin-bottom: 25px;
}

body.dark-theme .modal-card {
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

body.dark-theme .modal-close {
    color: #94a3b8;
}

body.dark-theme .modal-close:hover {
    color: #f8fafc;
}

body.dark-theme .modal-title {
    color: #f8fafc;
}

body.dark-theme .modal-subtitle {
    color: #f3a83b;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.3s;
}

.form-group input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.form-group input:focus {
    outline: none;
    border-color: #a20a0a;
    background: var(--input-bg);
    box-shadow: 0 0 15px rgba(162, 10, 10, 0.15);
}

.form-group select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.3s;
}

.form-group select option {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

.form-group select:focus {
    outline: none;
    border-color: #a20a0a;
    background: var(--input-bg);
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-block {
    width: 100%;
}

.required {
    color: #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Course Promotion Banners
   ========================================================================== */

.course-sidebar-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    margin-top: 30px;
    backdrop-filter: blur(8px);
    transition: transform 0.3s, border-color 0.3s;
}

.course-sidebar-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.course-sidebar-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.course-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.course-sidebar-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.course-btn {
    display: inline-block;
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.course-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

/* Bottom Course Banner */
.course-bottom-banner {
    display: flex;
    align-items: center;
    gap: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    margin: 50px 0 20px 0;
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.course-bottom-img-container {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.course-bottom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-bottom-content {
    flex-grow: 1;
    text-align: left;
}

.course-bottom-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.course-bottom-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.course-bottom-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.course-bottom-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

@media (max-width: 768px) {
    .course-bottom-banner {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    .course-bottom-img-container {
        margin: 0 auto;
    }
    .course-bottom-content {
        text-align: center;
    }
}

/* Intro Grid Styles */
.intro-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    align-items: stretch;
    max-width: 950px;
    margin: 0 auto;
}

.intro-portrait-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.intro-portrait-card:hover {
    transform: translateY(-5px);
}

.intro-portrait-img {
    width: 100%;
    max-width: 220px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    margin-bottom: 12px;
    object-fit: cover;
}

.intro-portrait-name {
    margin: 5px 0 2px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
}

.intro-portrait-title {
    margin: 0;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* B2B Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.event-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.event-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tech {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-logistics {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-agency {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.badge-finance {
    background: rgba(243, 168, 59, 0.1);
    color: #f3a83b;
    border: 1px solid rgba(243, 168, 59, 0.2);
}

.badge-manufacturing {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.event-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-status.live {
    color: #ef4444;
}

.event-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #000000;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.event-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-live-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.attendees-count {
    font-size: 0.82rem;
    color: #000000;
    font-weight: 700;
}

.attendees-count strong {
    color: #000000;
    transition: color 0.3s ease;
}

.attendees-count.pulse-glow strong {
    color: var(--primary-glow);
    text-shadow: 0 0 8px var(--primary-glow);
}

.event-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.event-register-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary-glow);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}


@media (max-width: 768px) {
    .events-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 16px !important;
        padding: 10px 4px 15px 4px !important;
        margin-top: 15px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
    }
    .events-grid::-webkit-scrollbar {
        height: 6px;
    }
    .events-grid::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    .events-grid::-webkit-scrollbar-thumb {
        background: rgba(243, 168, 59, 0.3);
        border-radius: 10px;
    }
    .events-grid::-webkit-scrollbar-thumb:hover {
        background: rgba(243, 168, 59, 0.5);
    }
    .event-card {
        flex: 0 0 285px !important;
        scroll-snap-align: start !important;
        min-height: 250px !important;
        padding: 16px 20px !important;
    }
}


/* ==========================================================================
   Global Dark Theme Support & Overrides
   ========================================================================== */

body.dark-theme {
    --bg: #0c0707;
    --card-bg: #180f0f;
    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.03);
    background-color: var(--bg);
    color: var(--text-main);
}

body.dark-theme .app-nav {
    background: rgba(15, 17, 26, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .nav-logo {
    color: #f8fafc;
}

body.dark-theme .nav-links a {
    color: #94a3b8;
}

body.dark-theme .nav-links a:hover, 
body.dark-theme .nav-links a.active {
    color: #f8fafc;
}

body.dark-theme .glass-effect {
    background: rgba(20, 21, 33, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Flip Cards Dark Mode */
body.dark-theme .flip-card-front.bg-danger {
    background: linear-gradient(135deg, #2a1b1b, #1e1212);
    border-left: 5px solid #ef4444;
    color: #fca5a5;
}

body.dark-theme .flip-card-front.bg-danger h3 {
    color: #ef4444;
}

body.dark-theme .flip-card-front.bg-danger .phrase {
    color: #fca5a5;
}

body.dark-theme .flip-card-back.bg-success {
    background: linear-gradient(135deg, #352513, #1f160b);
    border-left: 5px solid #f3a83b;
    color: #fde8c5;
}

body.dark-theme .flip-card-back.bg-success h3 {
    color: #f3a83b;
}

body.dark-theme .flip-card-back.bg-success .phrase {
    color: #fde8c5;
}

/* Matrix Table Dark Mode */
body.dark-theme .table-responsive {
    background: #13141f;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .matrix-table {
    background: #13141f;
}

body.dark-theme .matrix-table th {
    background-color: #0d0e16;
    color: #f8fafc;
}

body.dark-theme .matrix-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

body.dark-theme .matrix-table tbody tr:hover td {
    background-color: #1b1c2b;
}

/* Minigame Cards Dark Mode */
body.dark-theme .game-card.glass-panel {
    background: rgba(20, 21, 33, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .game-card.glass-panel h4 {
    color: #f8fafc !important;
}

body.dark-theme .btn-option {
    background: #13141f;
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

body.dark-theme .btn-option:hover:not(:disabled) {
    background: rgba(243, 168, 59, 0.1);
    border-color: #f3a83b;
}

/* Events Dark Mode */
body.dark-theme .event-title {
    color: #f8fafc;
}

body.dark-theme .attendees-count {
    color: #f8fafc;
}

body.dark-theme .attendees-count strong {
    color: #f8fafc;
}

body.dark-theme .events-control-bar {
    background: rgba(20, 21, 33, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body.dark-theme .events-control-bar input,
body.dark-theme .events-control-bar select {
    background: #0d0d0d !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .month-tab {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .month-tab.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    font-size: 1.2rem;
    padding: 6px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    outline: none;
    line-height: 1;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

body.dark-theme .theme-toggle-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body.dark-theme .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-links {
    align-items: center;
}

/* B2B Challenge Layout & Leaderboard Styles */
.challenge-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 991px) {
    .challenge-layout {
        grid-template-columns: 1fr;
    }
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.leaderboard-item:hover {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(162, 10, 10, 0.08);
    border-color: rgba(162, 10, 10, 0.3);
}

body.dark-theme .leaderboard-item {
    background: rgba(255, 255, 255, 0.03);
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffe066 0%, #f59e0b 100%);
    color: #7c2d12;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    color: #1e293b;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.3);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #fed7aa 0%, #ea580c 100%);
    color: #431407;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.rank-badge.other {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

body.dark-theme .rank-badge.other {
    background: rgba(255, 255, 255, 0.08);
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-title {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(162, 10, 10, 0.06);
    color: var(--primary);
    border: 1px solid rgba(162, 10, 10, 0.12);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(162, 10, 10, 0.05);
}

body.dark-theme .score-badge {
    background: rgba(162, 10, 10, 0.15);
    border-color: rgba(162, 10, 10, 0.3);
}



/* Ecosystem Category Filter Tabs styling */
.eco-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    outline: none;
}

.eco-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(162, 10, 10, 0.05);
}

.eco-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 6px 15px rgba(162, 10, 10, 0.2);
}

body.dark-theme .eco-tab-btn.active {
    box-shadow: 0 6px 15px rgba(162, 10, 10, 0.4);
}

/* ==========================================================================
   B2B BD Cosmic Galaxy Ecosystem Visualizer
   ========================================================================== */
.cosmic-galaxy-container {
    position: relative;
    width: 100%;
    height: 720px;
    margin: 40px auto;
    background: radial-gradient(circle at 50% 50%, rgba(162, 10, 10, 0.06) 0%, transparent 60%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
}

body.dark-theme .cosmic-galaxy-container {
    background: radial-gradient(circle at 50% 50%, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
}

.galaxy-core-wrapper {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galaxy-core {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(162, 10, 10, 0.2) 0%, rgba(162, 10, 10, 0.4) 60%, rgba(162, 10, 10, 0.8) 100%);
    border: 3px solid #ef4444;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), 0 0 70px rgba(239, 68, 68, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    animation: corePulse 3s infinite alternate ease-in-out;
}

.core-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.core-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.galaxy-orbit-system {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galaxy-orbit {
    position: absolute;
    border: 1px dashed rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

body.dark-theme .galaxy-orbit {
    border-color: rgba(255, 255, 255, 0.12);
}

.orbit-inner {
    width: 260px;
    height: 260px;
}

.orbit-middle {
    width: 420px;
    height: 420px;
}

.orbit-outer {
    width: 580px;
    height: 580px;
}

.planet-node {
    position: absolute;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
    transform: translate(-50%, -50%);
    left: calc(50% + var(--x));
    top: calc(50% + var(--y));
}

.planet-label {
    position: absolute;
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    opacity: 0.85;
    transition: all 0.3s ease;
    pointer-events: none;
}

body.dark-theme .planet-label {
    background: rgba(30, 31, 48, 0.85);
    border-color: rgba(255,255,255,0.08);
    color: #e2e8f0;
}

.planet-node:hover .planet-label,
.planet-node.active .planet-label {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
    box-shadow: 0 4px 10px rgba(var(--planet-rgb), 0.2);
    border-color: var(--planet-color);
}

.planet-sphere {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--planet-color);
    box-shadow: 0 0 15px rgba(var(--planet-rgb), 0.2), inset 0 0 10px rgba(var(--planet-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-theme .planet-sphere {
    background: rgba(30, 31, 48, 0.85);
}

.planet-sphere::before {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(var(--planet-rgb), 0.25);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg);
    pointer-events: none;
    transition: all 0.3s ease;
}

.planet-node:hover .planet-sphere {
    transform: scale(1.22);
    background: var(--planet-color);
    color: #ffffff;
    box-shadow: 0 0 25px var(--planet-color), 0 0 45px rgba(var(--planet-rgb), 0.4);
}

.planet-node.active .planet-sphere {
    transform: scale(1.3);
    background: var(--planet-color);
    color: #ffffff;
    box-shadow: 0 0 30px var(--planet-color), 0 0 60px rgba(var(--planet-rgb), 0.5);
    animation: planetPulse 2s infinite alternate ease-in-out;
}

.planet-node:hover .planet-sphere::before,
.planet-node.active .planet-sphere::before {
    border-color: #ffffff;
    transform: translate(-50%, -50%) rotateX(60deg) scale(1.15);
}

.planet-tooltip-card {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 320px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    z-index: 12;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body.dark-theme .planet-tooltip-card {
    background: rgba(20, 21, 33, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.planet-tooltip-icon {
    font-size: 1.5rem;
    line-height: 1;
}

#tooltip-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--text-main);
}

#tooltip-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 16px;
}

@keyframes corePulse {
    from {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.4), 0 0 60px rgba(239, 68, 68, 0.15);
        transform: scale(1);
    }
    to {
        box-shadow: 0 0 45px rgba(239, 68, 68, 0.6), 0 0 90px rgba(239, 68, 68, 0.35);
        transform: scale(1.05);
    }
}

@keyframes planetPulse {
    from {
        transform: scale(1.22);
    }
    to {
        transform: scale(1.3);
    }
}

@media (max-width: 992px) {
    .cosmic-galaxy-container {
        height: auto;
        min-height: auto;
        padding: 24px 16px;
        flex-direction: column;
        gap: 20px;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .galaxy-core-wrapper {
        display: none !important;
    }

    .galaxy-orbit-system {
        position: relative;
        width: 100%;
        height: auto;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        justify-content: center;
    }

    .galaxy-orbit {
        display: none;
    }

    .planet-node {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 12px 6px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.02);
        transition: all 0.3s ease;
        cursor: pointer;
    }

    body.dark-theme .planet-node {
        background: rgba(22, 14, 14, 0.85);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .planet-sphere {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        margin-bottom: 8px;
        border-radius: 50%;
        background: rgba(var(--planet-rgb), 0.08);
        border: 2px solid var(--planet-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        animation: none !important;
    }

    .planet-node.active {
        border-color: var(--planet-color);
        box-shadow: 0 8px 20px rgba(var(--planet-rgb), 0.15);
        transform: translateY(-2px);
    }

    .planet-node.active .planet-sphere {
        background: var(--planet-color);
        color: #ffffff;
        box-shadow: 0 0 15px var(--planet-color);
    }

    .planet-label {
        position: static !important;
        transform: none !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        color: var(--text-main) !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        text-align: center;
        white-space: normal !important;
        display: block !important;
    }

    .planet-tooltip-card {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        max-width: 100%;
        margin: 15px auto 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .cosmic-carousel-nav {
        display: none !important; /* Hide carousel buttons since we show all in grid now */
    }

    /* B2B Challenge Mobile Styles Overrides */
    .game-slider-wrapper {
        display: grid;
        grid-template-areas: 
            "slider slider"
            "prev next";
        justify-content: center;
        align-items: center;
        gap: 15px;
        width: 100%;
        margin-top: 10px;
    }
    .game-slider-container {
        grid-area: slider;
        scroll-snap-type: x mandatory;
    }
    .game-slider-track {
        padding: 10px 7.5vw !important;
        gap: 16px !important;
    }
    .game-slider-track .game-card {
        flex: 0 0 85vw !important;
        width: 85vw !important;
        scroll-snap-align: center;
    }
    .slider-nav-btn {
        position: static !important;
        transform: none !important;
    }
    .slider-nav-btn.prev-btn {
        grid-area: prev;
        justify-self: end;
        margin-right: 10px;
    }
    .slider-nav-btn.next-btn {
        grid-area: next;
        justify-self: start;
        margin-left: 10px;
    }
    .game-level-selector {
        gap: 8px !important;
        margin-bottom: 20px !important;
    }
    .level-tab-btn {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 16px !important;
    }
    .game-container {
        padding: 20px 15px !important;
        border-radius: 16px !important;
    }
    .leaderboard-card {
        padding: 20px 15px !important;
        border-radius: 16px !important;
    }
    #leaderboard-submit-box {
        padding: 15px !important;
        margin: 15px auto !important;
    }
}

/* Phase 3 & 4 styling overrides */
.challenge-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 25px;
    align-items: start;
    margin-top: 30px;
}
@media (max-width: 991px) {
    .challenge-layout {
        grid-template-columns: 1fr;
    }
}
.streak-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}
.streak-tab-link {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}
.streak-tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.reward-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}
.reward-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.modal-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Quests & Campaigns Dashboard Styles */
@media (max-width: 600px) {
    .quests-columns-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .quests-column-left {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px;
    }
}

#daily-quests-list div {
    transition: all 0.2s ease;
}
#daily-quests-list div:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(243, 168, 59, 0.2) !important;
}

#weekly-quests-list div {
    transition: all 0.2s ease;
}
#weekly-quests-list div:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(243, 168, 59, 0.2) !important;
}

#navbar-user-hud {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#navbar-user-hud:hover {
    transform: scale(1.05);
    background: rgba(243, 168, 59, 0.15) !important;
    box-shadow: 0 4px 12px rgba(243, 168, 59, 0.2);
}

.campaign-req-item:hover {
    background: rgba(243, 168, 59, 0.1) !important;
    color: var(--primary) !important;
}

.welcome-popup-item:hover {
    background: #f1f5f9 !important;
    border-color: rgba(162, 10, 10, 0.3) !important;
    transform: translateX(4px);
}

body.dark-theme .welcome-popup-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Quests Layout & Sidebar styling */
.quests-main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
    margin-bottom: 40px;
}
@media (min-width: 992px) {
    .quests-main-layout {
        grid-template-columns: 1fr 340px;
    }
}
.peter-slogan-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.peter-slogan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(243, 168, 59, 0.2) !important;
    border-color: rgba(243, 168, 59, 0.5) !important;
}

/* Global Notification Bell & Dropdown Styles */
.nav-notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.noti-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(162, 10, 10, 0.5);
    padding: 2px;
    box-sizing: border-box;
    line-height: 1;
}

.noti-badge.hidden {
    display: none;
}

.noti-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.noti-dropdown.hidden {
    display: none;
}

.noti-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.noti-dropdown-header button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s;
}

.noti-dropdown-header button:hover {
    opacity: 0.8;
}

.noti-dropdown-list {
    max-height: 280px;
    overflow-y: auto;
}

.noti-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.noti-item:hover {
    background: var(--bg);
}

.noti-item.unread {
    background: rgba(162, 10, 10, 0.03);
    border-left: 3px solid var(--primary);
}

.noti-item-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

.noti-item-text b {
    color: var(--primary);
}

.noti-item-time {
    font-size: 0.72rem;
    color: var(--text-light);
}

.noti-empty {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Mobile swipeable carousel for B2B Arcade Games (Đấu trường BD Thực Chiến) */
@media (max-width: 768px) {
    .arcade-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        padding-bottom: 15px !important;
        gap: 15px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(243, 168, 59, 0.3) transparent;
    }

    .arcade-grid::-webkit-scrollbar {
        height: 6px;
    }

    .arcade-grid::-webkit-scrollbar-thumb {
        background: rgba(243, 168, 59, 0.35);
        border-radius: 4px;
    }

    .arcade-game-card {
        min-width: 255px !important;
        max-width: 255px !important;
        scroll-snap-align: start !important;
        flex-shrink: 0 !important;
        margin-bottom: 5px !important;
    }
}

/* Glossary Card Styles (v=2.2.0) */
.glossary-section {
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
}
.glossary-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: var(--text-light);
}
.glossary-section-content {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
}

/* Context Block */
.context-section {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
}
body.dark-theme .context-section {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.context-title {
    color: #4f46e5;
}
body.dark-theme .context-title {
    color: #a5b4fc;
}
.context-content {
    font-style: italic;
    color: #1e1b4b;
}
body.dark-theme .context-content {
    color: #e0e7ff;
}

/* Formula Block */
.formula-section {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
}
body.dark-theme .formula-section {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.formula-title {
    color: #059669;
}
body.dark-theme .formula-title {
    color: #34d399;
}
.formula-code {
    font-family: monospace;
    font-size: 0.92rem;
    color: #065f46;
    font-weight: 700;
    margin-bottom: 6px;
    word-break: break-word;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
}
body.dark-theme .formula-code {
    color: #6ee7b7;
    background: rgba(0, 0, 0, 0.25);
}
.formula-example {
    font-size: 0.84rem;
    color: #047857;
    line-height: 1.4;
    font-style: italic;
}
body.dark-theme .formula-example {
    color: #d1fae5;
}

/* ==========================================================================
   PvP Online Arena & Dual Screen Responsive Styles
   ========================================================================== */
#online-users-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 1050px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.pvp-card-container {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    padding: 28px 20px;
    margin-top: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.pvp-user-row {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

body.dark-theme .pvp-user-row {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
    .dual-screens-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    #online-users-list {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .pvp-card-container {
        padding: 20px 12px !important;
    }
    .pvp-user-row {
        padding: 12px !important;
    }
}




