@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #090a0f;
    --bg-card: rgba(22, 24, 33, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    /* Theme Colors */
    --color-xp: #ff9f43;
    --color-gems: #00d2d3;
    --color-lives: #ff7675;
    --color-streak: #ff6b6b;
    
    /* Topic Colors */
    --color-ai: #a370f7;
    --color-ai-glow: rgba(163, 112, 247, 0.4);
    --color-finance: #10b981;
    --color-finance-glow: rgba(16, 185, 129, 0.4);
    --color-marketing: #ff7a00;
    --color-marketing-glow: rgba(255, 122, 0, 0.4);
    
    /* Global Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 10%, rgba(163, 112, 247, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 10%, rgba(255, 122, 0, 0.05) 0px, transparent 50%);
    color: #e2e8f0;
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Global Text Readability Override */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Premium Sidebar Layout */
.sidebar-sticky {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: 260px;
    padding: 24px;
    background: rgba(13, 14, 21, 0.95);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    margin-left: 260px;
    padding: 32px 40px;
    min-height: 100vh;
    padding-top: 100px;
}

/* Sidebar Branding */
.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 8px;
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--color-ai);
    object-fit: cover;
    box-shadow: 0 0 12px var(--color-ai-glow);
    animation: mascotBounce 3s ease-in-out infinite;
}

.brand-text {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, var(--color-ai) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    text-align: left;
    width: 100%;
}

.nav-item-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.nav-item-btn.active {
    color: #fff;
    background: rgba(163, 112, 247, 0.15);
    border-color: rgba(163, 112, 247, 0.3);
    box-shadow: 0 4px 20px rgba(163, 112, 247, 0.1);
}

.nav-item-btn i {
    font-size: 1.3rem;
}

/* Header/TopBar Indicators */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
    height: 80px;
    z-index: 99;
    padding: 0 40px;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-indicators {
    display: flex;
    align-items: center;
    gap: 24px;
}

.indicator-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.2s;
}

.indicator-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
}

.badge-streak { color: var(--color-streak); border-color: rgba(255, 107, 107, 0.2); }
.badge-xp { color: var(--color-xp); border-color: rgba(255, 159, 67, 0.2); }
.badge-gems { color: var(--color-gems); border-color: rgba(0, 210, 211, 0.2); }
.badge-lives { color: var(--color-lives); border-color: rgba(255, 118, 117, 0.2); }

/* Learning Paths & Subject Selector */
.subject-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.subject-card {
    cursor: pointer;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.03));
    z-index: 0;
}

.subject-card.active-ai { border-color: var(--color-ai); box-shadow: 0 0 15px var(--color-ai-glow); }
.subject-card.active-finance { border-color: var(--color-finance); box-shadow: 0 0 15px var(--color-finance-glow); }
.subject-card.active-marketing { border-color: var(--color-marketing); box-shadow: 0 0 15px var(--color-marketing-glow); }

.subject-card i {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.3s;
}

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

.subject-card-ai i { color: var(--color-ai); }
.subject-card-finance i { color: var(--color-finance); }
.subject-card-marketing i { color: var(--color-marketing); }

/* Learning Path Tree (Nodes layout) */
.path-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 40px 0;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.path-line {
    position: absolute;
    width: 6px;
    background: rgba(255, 255, 255, 0.08);
    top: 80px;
    bottom: 80px;
    z-index: 1;
    border-radius: 3px;
}

.path-node-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.path-node {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    background: #1f2230;
}

/* Offset nodes for Zig-Zag classic layout */
.path-node-wrapper:nth-child(even) .path-node { transform: translateX(45px); }
.path-node-wrapper:nth-child(odd) .path-node { transform: translateX(-45px); }

.path-node-wrapper:nth-child(even) .node-label { transform: translateX(45px); }
.path-node-wrapper:nth-child(odd) .node-label { transform: translateX(-45px); }

.path-node::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border: 5px solid transparent;
    transition: all 0.3s;
    pointer-events: none;
}

.path-node.unlocked:hover {
    transform: scale(1.12);
}
.path-node-wrapper:nth-child(even) .path-node.unlocked:hover { transform: translateX(45px) scale(1.12); }
.path-node-wrapper:nth-child(odd) .path-node.unlocked:hover { transform: translateX(-45px) scale(1.12); }

/* Node States colors */
.path-node.locked {
    background: #161821;
    color: #4b5563;
    cursor: not-allowed;
}

/* AI Nodes styles */
.node-ai.unlocked { background: var(--color-ai); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.node-ai.completed { background: #6200ea; color: #fff; border-color: var(--color-ai); box-shadow: 0 0 15px var(--color-ai-glow); }

/* Finance Nodes styles */
.node-finance.unlocked { background: var(--color-finance); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.node-finance.completed { background: #064e3b; color: #fff; border-color: var(--color-finance); box-shadow: 0 0 15px var(--color-finance-glow); }

/* Marketing Nodes styles */
.node-marketing.unlocked { background: var(--color-marketing); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.node-marketing.completed { background: #7c2d12; color: #fff; border-color: var(--color-marketing); box-shadow: 0 0 15px var(--color-marketing-glow); }

.node-label {
    margin-top: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #94a3b8;
    text-align: center;
    max-width: 160px;
}

.node-label.active {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

/* Quiz Screen (Lesson Interface Modal Style) */
.lesson-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: #090a0f;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 40px;
    animation: slideUpFullScreen 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

@keyframes slideUpFullScreen {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.btn-close-lesson {
    background: transparent;
    border: none;
    color: #4b5563;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-close-lesson:hover {
    color: #f3f4f6;
}

.lesson-progress-bar-container {
    flex-grow: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.lesson-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-ai), var(--color-gems));
    border-radius: 8px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-content {
    max-width: 680px;
    width: 100%;
    margin: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lesson-mascot-bubble {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 12px;
    position: relative;
}

.lesson-mascot-bubble::after {
    content: '';
    position: absolute;
    left: 38px;
    bottom: -10px;
    width: 18px;
    height: 18px;
    background: #0d0e14;
    border-right: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    transform: rotate(45deg);
    display: none; /* Hide default bubble arrow if side layout is used */
}

.mascot-avatar-small {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #1e202e;
    object-fit: cover;
    animation: mascotBounce 3.5s ease-in-out infinite;
}

.lesson-bubble-text {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: #e2e8f0;
}

.question-text {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 24px;
}

/* Answer Cards (Multiple Choice) */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.answer-card {
    padding: 18px 24px;
    border: 2px solid var(--border-glass);
    background: var(--bg-card);
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.answer-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.answer-card.selected {
    border-color: var(--color-ai);
    background: rgba(163, 112, 247, 0.1);
    box-shadow: 0 4px 15px var(--color-ai-glow);
}

.answer-shortcut {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 800;
    color: #94a3b8;
    border: 1px solid var(--border-glass);
}

.answer-card.selected .answer-shortcut {
    background: var(--color-ai);
    color: #fff;
    border-color: var(--color-ai);
}

/* Arrange words element styles */
.word-blocks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 15px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    background: rgba(0,0,0,0.15);
    margin-bottom: 24px;
    align-items: center;
}

.word-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.word-block {
    padding: 10px 18px;
    background: #1f2230;
    border: 2px solid var(--border-glass);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: all 0.15s;
    user-select: none;
}

.word-block:hover {
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.word-block.used {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* Footer Verification Panel */
.lesson-footer {
    border-top: 1px solid var(--border-glass);
    padding: 24px 0;
    background: rgba(9, 10, 15, 0.9);
    position: relative;
    z-index: 10;
}

.lesson-footer-content {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.verification-banner {
    display: none; /* Injected dynamically */
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    animation: slideUpFast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.verification-banner.correct {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
}

.verification-banner.incorrect {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.verification-banner-title {
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.verification-banner-desc {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Buttons Styling */
.btn-premium {
    font-family: var(--font-heading);
    font-weight: 800;
    padding: 14px 28px;
    border-radius: 14px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.btn-premium:hover {
    transform: translateY(-2px) scale(1.03);
}

.btn-check-answer {
    background: linear-gradient(135deg, var(--color-ai) 0%, #6200ea 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(163, 112, 247, 0.3);
}

.btn-correct-action {
    background: var(--color-finance);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-incorrect-action {
    background: var(--color-lives);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 118, 117, 0.3);
}

/* Outfits Shop UI */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.shop-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shop-avatar-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.shop-card:hover .shop-avatar-img {
    transform: scale(1.08) rotate(2deg);
}

.shop-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.shop-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 20px;
    min-height: 40px;
}

.shop-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-gems);
    font-size: 1.15rem;
    margin-bottom: 16px;
}

.btn-buy-outfit {
    width: 100%;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid var(--color-gems);
    background: transparent;
    color: var(--color-gems);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy-outfit:hover {
    background: var(--color-gems);
    color: #0d0e14;
    box-shadow: 0 0 15px rgba(0, 210, 211, 0.3);
}

.btn-buy-outfit.owned {
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

.btn-buy-outfit.owned:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: none;
}

.btn-buy-outfit.equipped {
    background: var(--color-ai);
    border-color: var(--color-ai);
    color: #fff;
}

.btn-buy-outfit.equipped:hover {
    background: var(--color-ai);
    box-shadow: 0 0 15px var(--color-ai-glow);
}

/* User Profile UI */
.profile-card {
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
}

.profile-avatar-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--color-ai);
    box-shadow: 0 0 25px var(--color-ai-glow);
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    animation: mascotBounce 4s ease-in-out infinite;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details h2 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    color: #fff;
}

.profile-role {
    font-size: 1.1rem;
    color: var(--color-ai);
    font-weight: 600;
    margin-bottom: 16px;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

@media (max-width: 576px) {
    .profile-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    padding: 16px;
    text-align: center;
}

.stat-box-val {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 4px;
}

.stat-box-lbl {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Leaderboard Page UI */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-radius: 14px;
}

.leaderboard-user-details {
    display: flex;
    align-items: center;
    gap: 16px;
}

.leaderboard-rank {
    width: 32px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    text-align: center;
}

.rank-1 { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.3); }
.rank-2 { color: #c0c0c0; text-shadow: 0 0 8px rgba(192,192,192,0.3); }
.rank-3 { color: #cd7f32; text-shadow: 0 0 8px rgba(205,127,50,0.3); }

.leaderboard-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-glass);
}

.leaderboard-name {
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
}

.leaderboard-xp-tag {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-xp);
}

.leaderboard-row.current-user {
    background: rgba(163, 112, 247, 0.08);
    border: 1px solid rgba(163, 112, 247, 0.25);
}

/* Congratulation Success Screen */
.congrats-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
    min-height: fit-content;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.congrats-mascot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--color-finance);
    box-shadow: 0 0 30px var(--color-finance-glow);
    background: rgba(0, 0, 0, 0.3);
    object-fit: cover;
    animation: mascotJump 0.6s ease-in-out infinite alternate;
}

.congrats-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #fff, var(--color-xp));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reward-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.reward-card {
    padding: 16px;
    text-align: center;
}

.reward-val {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-top: 4px;
}

.reward-val.reward-xp { color: var(--color-xp); }
.reward-val.reward-gems { color: var(--color-gems); }

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 1100;
}

/* Mascot Bounce & Animation Animations */
@keyframes mascotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes mascotJump {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-24px) scale(1.05); }
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

@keyframes pulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.shake-animation {
    animation: shakeError 0.4s ease-in-out;
}

.pulse-animation {
    animation: pulseSuccess 1s ease-in-out;
}

/* Page Transitions */
.page-section {
    display: none;
    animation: pageFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-section.active {
    display: block;
}

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

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

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 0. LOGIN OVERLAY */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(9, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s ease;
}

.login-card {
    max-width: 480px;
    width: 100%;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card p.text-muted {
    color: #ffd700 !important; /* Yellow warning/info text */
    font-size: 0.95rem;
}

.login-card .form-label {
    color: #ffffff !important; /* White labels */
    font-weight: 700;
}

.login-mascot-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--color-ai);
    box-shadow: 0 0 20px var(--color-ai-glow);
    object-fit: cover;
    animation: mascotBounce 3.5s ease-in-out infinite;
}

.login-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    font-size: 1rem !important;
}

.login-input:focus {
    border-color: var(--color-ai) !important;
    box-shadow: 0 0 12px var(--color-ai-glow) !important;
}

/* History Table Glassmorphism Styles */
.table-dark {
    background: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: rgba(255,255,255,0.06) !important;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.table td {
    padding: 14px 18px !important;
    vertical-align: middle;
    font-size: 0.95rem;
}

.table th {
    padding: 14px 18px !important;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===================================================
   ADMIN PANEL STYLES
   =================================================== */

.admin-question-editor {
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.admin-question-editor:hover {
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.08);
}

.admin-question-editor::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #a370f7, #fbbf24);
    border-radius: 18px 0 0 18px;
    opacity: 0.7;
}

#section-admin .form-select,
#section-admin .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
    border-radius: 10px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#section-admin .form-select:focus,
#section-admin .form-control:focus {
    border-color: rgba(163, 112, 247, 0.6) !important;
    box-shadow: 0 0 12px rgba(163, 112, 247, 0.15) !important;
    outline: none;
}

#section-admin .form-select option {
    background: #16182a;
    color: #e2e8f0;
}

.admin-q-answer-radio {
    cursor: pointer;
}

#section-admin .btn-outline-danger {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transition: all 0.2s ease;
}

#section-admin .btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    transform: scale(1.05);
}

#section-admin .btn-outline-info {
    border-color: rgba(6, 182, 212, 0.4);
    color: #06b6d4;
    font-weight: 600;
    transition: all 0.2s ease;
}

#section-admin .btn-outline-info:hover {
    background: rgba(6, 182, 212, 0.12);
    border-color: #06b6d4;
    transform: translateY(-1px);
}

#btn-save-all-courses:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.admin-q-type {
    font-size: 0.85rem !important;
    padding: 4px 10px !important;
}

/* ===================================================
   TOAST SLIDE-IN ANIMATION
   =================================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================================
   RESPONSIVE - MOBILE ADMIN
   =================================================== */
@media (max-width: 768px) {
    .admin-question-editor .d-flex.justify-content-between {
        flex-direction: column;
        gap: 10px;
    }
    .admin-q-type {
        flex: 1;
        width: 100%;
    }
}
