/* ============================================================
   EduPlay — Dark Gaming Platform Design System
   Modern, sleek gaming aesthetic with neon accents
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    /* Core Palette */
    --color-bg: #0F0F1A;
    --color-surface: #1A1A2E;
    --color-surface-2: #252540;
    --color-surface-3: #2D2D4A;
    --color-primary: #7C3AED;
    --color-secondary: #06B6D4;
    --color-accent: #8B5CF6;
    --color-yellow: #FBBF24;
    --color-green: #10B981;
    --color-pink: #EC4899;
    --color-danger: #EF4444;
    --color-success: #10B981;
    --color-white: #F8FAFC;
    --color-dark: #F8FAFC;
    --color-text: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-text-muted: #64748B;
    --color-muted: #94A3B8;
    --color-border: rgba(255,255,255,0.08);
    --color-light-gray: rgba(255,255,255,0.06);
    --color-purple: #7C3AED;
    --color-orange: #F97316;

    /* Subject Colors */
    --color-math: #F97316;
    --color-science: #06B6D4;
    --color-english: #8B5CF6;

    /* Glow Effects */
    --glow-purple: 0 0 20px rgba(124,58,237,0.3);
    --glow-cyan: 0 0 20px rgba(6,182,212,0.3);
    --glow-green: 0 0 20px rgba(16,185,129,0.3);
    --glow-pink: 0 0 20px rgba(236,72,153,0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.6);

    /* Typography */
    --font-body: 'Nunito', 'Inter', 'Segoe UI', sans-serif;
    --font-heading: 'Nunito', 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================
   2. KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(124,58,237,0.3); }
    50% { box-shadow: 0 0 25px rgba(124,58,237,0.6); }
}

@keyframes neon-text {
    0%, 100% { text-shadow: 0 0 5px rgba(124,58,237,0.5); }
    50% { text-shadow: 0 0 20px rgba(124,58,237,0.8), 0 0 40px rgba(124,58,237,0.3); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes confettiDrop {
    0% { opacity: 1; transform: translateY(-100vh) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress, 0%); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

@keyframes flipIn {
    from { transform: rotateY(180deg); }
    to { transform: rotateY(0deg); }
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(3deg); }
    30% { transform: rotate(-3deg); }
    45% { transform: rotate(2deg); }
    60% { transform: rotate(-2deg); }
}

/* ============================================================
   3. BASE STYLES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 14px;
    scroll-behavior: smooth;
    min-height: 100%;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    margin-bottom: 60px;
    line-height: 1.6;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Subtle grid pattern */
    background-image:
        linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Full-width containers */
.container {
    max-width: 100% !important;
    padding-left: 2rem;
    padding-right: 2rem;
}

::selection {
    background-color: var(--color-primary);
    color: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; }

.btn:focus, .form-control:focus {
    box-shadow: 0 0 0 3px rgba(124,58,237,0.3);
}

/* ============================================================
   4. UTILITY CLASSES
   ============================================================ */
.text-playful { font-family: var(--font-heading); font-weight: 800; }
.text-muted-edu { color: var(--color-text-secondary); font-weight: 600; }
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}
.text-gradient-purple {
    background: linear-gradient(135deg, var(--color-primary), var(--color-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease both; }
.animate-popIn { animation: popIn 0.4s ease both; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-bounce { animation: bounce 2s ease infinite; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

.section-spacing { padding: var(--space-3xl) 0; }

.bg-white-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}
.bg-white-card:hover {
    border-color: rgba(124,58,237,0.3);
    box-shadow: var(--glow-purple);
}

/* ============================================================
   5. SIDEBAR & APP LAYOUT
   ============================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    scrollbar-width: thin;
    scrollbar-color: var(--color-surface-3) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 4px; }

.sidebar-content {
    padding: 0 0 var(--space-lg);
}

/* Sidebar Brand */
.sidebar-brand {
    padding: var(--space-lg) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}
.sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.sidebar-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(124,58,237,0.4));
    transition: filter 0.3s ease, transform 0.3s ease;
}
.sidebar-logo:hover {
    filter: drop-shadow(0 0 20px rgba(6,182,212,0.5));
    transform: scale(1.05);
}
.mobile-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(124,58,237,0.4));
}

/* Sidebar User */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

/* Sidebar Auth Buttons */
.sidebar-auth {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

/* Sidebar Logout */
.sidebar-logout { color: var(--color-danger) !important; }
.sidebar-logout:hover { background: rgba(239,68,68,0.1) !important; border-left-color: var(--color-danger) !important; }

.sidebar-section {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }

.sidebar-heading {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    padding: var(--space-md) var(--space-lg) var(--space-xs);
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px var(--space-lg);
    color: var(--color-text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background: rgba(124,58,237,0.08);
    color: var(--color-text);
    border-left-color: var(--color-primary);
}
.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Category colors in sidebar */
.sidebar-cat.cat-math:hover { border-left-color: var(--color-math); }
.sidebar-cat.cat-math:hover i { color: var(--color-math); }
.sidebar-cat.cat-science:hover { border-left-color: var(--color-science); }
.sidebar-cat.cat-science:hover i { color: var(--color-science); }
.sidebar-cat.cat-english:hover { border-left-color: var(--color-english); }
.sidebar-cat.cat-english:hover i { color: var(--color-english); }

.sidebar-type:hover i { color: var(--color-secondary); }

/* Main content area */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 0;
}

/* Mobile Top Bar */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 300;
    background: rgba(15,15,26,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 16px;
    align-items: center;
    justify-content: space-between;
}
.mobile-brand {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* Sidebar toggle button */
.sidebar-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--color-text-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-fast);
}
.sidebar-toggle:hover {
    color: var(--color-text);
    border-color: var(--color-primary);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.open { display: block; }

/* Mobile sidebar */
@media (max-width: 991.98px) {
    .mobile-topbar { display: flex; }
    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 250;
        padding-top: 0;
    }
    .sidebar.open { left: 0; }
    .main-content { width: 100%; }
}

/* ============================================================
   6. NAVBAR
   ============================================================ */
.navbar-eduplay {
    background: rgba(15,15,26,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.6rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-eduplay .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}
.navbar-eduplay .navbar-brand:hover { opacity: 0.9; }

.navbar-eduplay .nav-link {
    color: var(--color-text-secondary) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.navbar-eduplay .nav-link:hover {
    color: var(--color-text) !important;
    background: rgba(124,58,237,0.15);
}
.navbar-eduplay .nav-link.active {
    background: rgba(124,58,237,0.2);
    color: var(--color-accent) !important;
}

.navbar-eduplay .navbar-toggler {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.7rem;
}
.navbar-eduplay .navbar-toggler-icon { filter: brightness(0) invert(1); }

.navbar-eduplay .dropdown-menu {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.navbar-eduplay .dropdown-menu .dropdown-item {
    color: var(--color-text-secondary);
    padding: 0.6rem 1.2rem;
    transition: all var(--transition-fast);
}
.navbar-eduplay .dropdown-menu .dropdown-item:hover {
    background: rgba(124,58,237,0.15);
    color: var(--color-text);
}
.navbar-eduplay .dropdown-menu .dropdown-divider {
    border-color: var(--color-border);
}

.level-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: var(--glow-purple);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.2);
}
.avatar-circle.avatar-sm { width: 32px; height: 32px; }
.avatar-circle.avatar-lg { width: 64px; height: 64px; }
.avatar-circle.avatar-xl { width: 90px; height: 90px; font-size: 2rem; }

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn-eduplay {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 12px 28px;
    min-height: 44px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.btn-eduplay:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}
.btn-eduplay:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary-edu {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    box-shadow: var(--glow-purple);
}
.btn-primary-edu:hover {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: white;
    box-shadow: 0 0 30px rgba(124,58,237,0.5);
}

.btn-success-edu {
    background: linear-gradient(135deg, var(--color-green), #34D399);
    color: white;
    box-shadow: var(--glow-green);
}
.btn-success-edu:hover {
    color: white;
    box-shadow: 0 0 30px rgba(16,185,129,0.5);
}

.btn-math {
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: white;
}
.btn-science {
    background: linear-gradient(135deg, #06B6D4, #22D3EE);
    color: white;
}
.btn-english {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
}

.btn-eduplay.btn-outline {
    background: transparent;
    border: 2px solid rgba(124,58,237,0.5);
    color: var(--color-accent);
}
.btn-eduplay.btn-outline:hover {
    background: rgba(124,58,237,0.15);
    border-color: var(--color-primary);
    color: white;
}

.btn-eduplay.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
    min-height: 52px;
    border-radius: var(--radius-lg);
}
.btn-eduplay.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
    min-height: 36px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   7. CARDS
   ============================================================ */
.game-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,0.4);
    box-shadow: var(--glow-purple);
}
.game-card .card-title {
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}
.game-card .card-subtitle {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }

/* ============================================================
   8. XP BAR / PROGRESS
   ============================================================ */
.xp-bar-container {
    width: 100%;
    height: 20px;
    background: var(--color-surface-2);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}
.xp-bar-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 100%;
    animation: shimmer 2.5s linear infinite, progressFill 1s ease-out both;
    width: var(--progress, 0%);
    transition: width 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 40px;
    box-shadow: 0 0 10px rgba(124,58,237,0.4);
}
.xp-bar-fill::after {
    content: attr(data-xp);
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
}
.xp-bar-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

/* ============================================================
   9. STREAK BADGE
   ============================================================ */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-orange), var(--color-yellow));
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(249,115,22,0.3);
    animation: pulse 2s ease-in-out infinite;
}
.streak-badge .streak-icon { font-size: 1.2rem; }
.streak-badge .streak-count { font-weight: 900; font-size: 1.1rem; }

/* ============================================================
   10. ACHIEVEMENT BADGES
   ============================================================ */
.badge-earned {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 2px solid var(--color-yellow);
    box-shadow: 0 0 20px rgba(251,191,36,0.15);
    transition: all var(--transition-normal);
}
.badge-earned:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(251,191,36,0.3);
}
.badge-earned .badge-icon { font-size: 2.5rem; margin-bottom: var(--space-sm); }
.badge-earned .badge-name { font-weight: 800; font-size: 0.85rem; color: var(--color-text); }

.badge-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 2px dashed rgba(255,255,255,0.1);
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all var(--transition-normal);
}
.badge-locked:hover { opacity: 0.6; filter: grayscale(50%); }
.badge-locked .badge-icon { font-size: 2.5rem; margin-bottom: var(--space-sm); }
.badge-locked .badge-name { font-weight: 800; font-size: 0.85rem; color: var(--color-text-muted); }

/* ============================================================
   11. SUBJECT CARDS
   ============================================================ */
.subject-card {
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    color: white;
    border: 1px solid var(--color-border);
}
.subject-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.subject-card .subject-icon { font-size: 3rem; display: block; margin-bottom: var(--space-md); }
.subject-card .subject-title { font-weight: 800; font-size: 1.4rem; margin-bottom: var(--space-sm); color: white; }
.subject-card .subject-count { font-weight: 700; opacity: 0.8; font-size: 0.9rem; }

.subject-card.math { background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.05)); border-color: rgba(249,115,22,0.3); }
.subject-card.math:hover { box-shadow: 0 0 30px rgba(249,115,22,0.3); border-color: rgba(249,115,22,0.5); }
.subject-card.science { background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(6,182,212,0.05)); border-color: rgba(6,182,212,0.3); }
.subject-card.science:hover { box-shadow: 0 0 30px rgba(6,182,212,0.3); border-color: rgba(6,182,212,0.5); }
.subject-card.english { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(139,92,246,0.05)); border-color: rgba(139,92,246,0.3); }
.subject-card.english:hover { box-shadow: 0 0 30px rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.5); }

/* ============================================================
   12. SEGMENT CARDS (Age Groups)
   ============================================================ */
.segment-card {
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    color: white;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--color-border);
}
.segment-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.segment-card .segment-title { font-weight: 800; font-size: 1.2rem; margin-bottom: var(--space-xs); }
.segment-card .segment-age { font-weight: 700; opacity: 0.8; font-size: 0.85rem; }
.segment-card .segment-icon { font-size: 2.5rem; margin-bottom: var(--space-md); display: block; }

.segment-card.minikler { background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(236,72,153,0.1)); border-color: rgba(236,72,153,0.3); }
.segment-card.tomurcuklar { background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(124,58,237,0.1)); border-color: rgba(124,58,237,0.3); }
.segment-card.kesifciler { background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(6,182,212,0.1)); border-color: rgba(6,182,212,0.3); }
.segment-card.kasifler { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(59,130,246,0.1)); border-color: rgba(59,130,246,0.3); }
.segment-card.liderler { background: linear-gradient(135deg, rgba(249,115,22,0.3), rgba(249,115,22,0.1)); border-color: rgba(249,115,22,0.3); }

/* ============================================================
   13. FORM CONTROLS
   ============================================================ */
.form-control-eduplay {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    transition: all var(--transition-normal);
    width: 100%;
    outline: none;
}
.form-control-eduplay::placeholder { color: var(--color-text-muted); }
.form-control-eduplay:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
.form-control-eduplay:hover { border-color: rgba(255,255,255,0.15); }
.form-control-eduplay.is-valid { border-color: var(--color-green); }
.form-control-eduplay.is-invalid { border-color: var(--color-danger); animation: shake 0.5s ease; }

.form-label-eduplay {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   14. LEADERBOARD
   ============================================================ */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.4s ease both;
}
.leaderboard-item:hover {
    transform: translateX(6px);
    border-color: rgba(124,58,237,0.3);
    box-shadow: var(--glow-purple);
}

.leaderboard-item .rank {
    font-weight: 900;
    font-size: 1.3rem;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
}

.leaderboard-item:nth-child(1) .rank {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    color: #1A1A2E;
    box-shadow: 0 0 15px rgba(251,191,36,0.4);
}
.leaderboard-item:nth-child(2) .rank {
    background: linear-gradient(135deg, #94A3B8, #CBD5E1);
    color: #1A1A2E;
    box-shadow: 0 0 15px rgba(148,163,184,0.3);
}
.leaderboard-item:nth-child(3) .rank {
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: #1A1A2E;
    box-shadow: 0 0 15px rgba(249,115,22,0.3);
}

.leaderboard-item .user-info { flex: 1; }
.leaderboard-item .user-name { font-weight: 800; font-size: 1rem; color: var(--color-text); }
.leaderboard-item .user-level { font-size: 0.8rem; color: var(--color-text-muted); }
.leaderboard-item .user-xp { font-weight: 900; font-size: 1.1rem; color: var(--color-secondary); }

.leaderboard-item:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.25s; }

/* ============================================================
   15. HERO SECTION
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 50%, #252540 100%);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(6,182,212,0.1) 0%, transparent 60%);
}
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(124,58,237,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-move 8s linear infinite;
    opacity: 0.5;
}

.hero-section .hero-title {
    font-weight: 900;
    font-size: 3.5rem;
    color: white;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
    line-height: 1.1;
    letter-spacing: -1px;
}
.hero-section .hero-subtitle {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin: 0 auto var(--space-xl);
    position: relative;
    z-index: 1;
}
.hero-section .hero-emoji { display: none; }

/* ============================================================
   16. STAT CARDS
   ============================================================ */
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-normal);
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,0.3);
    box-shadow: var(--glow-purple);
}
.stat-card .stat-icon { font-size: 2rem; margin-bottom: var(--space-sm); display: block; }
.stat-card .stat-value {
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}
.stat-card .stat-label { font-weight: 700; font-size: 0.85rem; color: var(--color-text-muted); margin-top: 4px; }

/* ============================================================
   17. FOOTER
   ============================================================ */
.footer-eduplay {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2xl) 0 var(--space-xl);
    color: var(--color-text-secondary);
    margin-top: var(--space-3xl);
}
.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}
.footer-description { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.6; }
.footer-heading {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.footer-links a:hover { color: var(--color-accent); transform: translateX(4px); display: inline-block; }
.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
    margin-top: var(--space-xl);
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ============================================================
   18. AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-md);
}
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}
.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.auth-header h2 {
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-header p { color: var(--color-text-secondary); }
.auth-emoji { display: none; }

/* Grade selector dark theme */
.grade-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-md);
}
.grade-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.grade-btn:hover { border-color: var(--color-primary); color: var(--color-text); }
.grade-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--glow-purple);
}

/* ============================================================
   19. DASHBOARD
   ============================================================ */
.dashboard-banner {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
}
.dashboard-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 50%; height: 100%;
    background: radial-gradient(ellipse at right, rgba(124,58,237,0.1), transparent);
}

.dashboard-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}
.dashboard-card:hover {
    border-color: rgba(124,58,237,0.2);
}
.dashboard-card-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mission items */
.mission-item {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-fast);
}
.mission-item:hover { border-color: rgba(124,58,237,0.2); }
.mission-item.completed { opacity: 0.6; }

.mission-progress {
    flex: 1;
    height: 6px;
    background: var(--color-surface-3);
    border-radius: 50px;
    overflow: hidden;
}
.mission-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 50px;
    transition: width 0.5s ease;
}

/* Recent activity */
.activity-item {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-fast);
}
.activity-item:hover { border-color: rgba(124,58,237,0.2); }

.activity-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.8rem;
    color: white;
}
.activity-score.good { background: linear-gradient(135deg, var(--color-green), #34D399); }
.activity-score.medium { background: linear-gradient(135deg, var(--color-yellow), #FCD34D); color: #1A1A2E; }
.activity-score.bad { background: linear-gradient(135deg, var(--color-danger), #F87171); }

/* ============================================================
   20. GAME PLAY PAGE
   ============================================================ */
.game-player-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.game-header {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-2)) !important;
    border: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg) !important;
}
.game-header h3 { color: white !important; }

/* ============================================================
   21. ALERTS
   ============================================================ */
.alert-eduplay {
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    border: 1px solid;
}
.alert-info-edu {
    background: rgba(6,182,212,0.1);
    border-color: rgba(6,182,212,0.3);
    color: var(--color-secondary);
}
.alert-success-edu {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
    color: var(--color-green);
}
.alert-danger-edu {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: var(--color-danger);
}

/* ============================================================
   22. PODIUM (Leaderboard)
   ============================================================ */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}
.podium-place {
    text-align: center;
    position: relative;
}
.podium-pillar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
}
.podium-place.first .podium-pillar {
    height: 120px;
    border-color: rgba(251,191,36,0.3);
    box-shadow: 0 0 20px rgba(251,191,36,0.15);
}
.podium-place.second .podium-pillar {
    height: 90px;
    border-color: rgba(148,163,184,0.3);
}
.podium-place.third .podium-pillar {
    height: 70px;
    border-color: rgba(249,115,22,0.3);
}

/* ============================================================
   23. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-section .hero-title { font-size: 2.2rem; }
    .hero-section .hero-subtitle { font-size: 1rem; }
    .section-spacing { padding: var(--space-2xl) 0; }
    .dashboard-banner { padding: var(--space-lg); }
    .auth-card { padding: var(--space-lg); }
    .podium-container { gap: var(--space-sm); }
}

@media (max-width: 480px) {
    .hero-section .hero-title { font-size: 1.8rem; }
    .btn-eduplay.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
    .navbar-eduplay { padding: 0.5rem 1rem; }
}

/* ============================================================
   24. BOOTSTRAP OVERRIDES (Dark Theme)
   ============================================================ */
.text-danger { color: var(--color-danger) !important; }
.text-success { color: var(--color-green) !important; }
.text-warning { color: var(--color-yellow) !important; }
.text-muted { color: var(--color-text-muted) !important; }

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.dropdown-menu {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.dropdown-item {
    color: var(--color-text-secondary);
}
.dropdown-item:hover {
    background: rgba(124,58,237,0.15);
    color: var(--color-text);
}

/* ============================================================
   25. GAMES PORTAL
   ============================================================ */
.games-portal { padding-bottom: var(--space-2xl); }

/* Category Bar */
.gp-category-bar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.gp-category-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.gp-categories {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.gp-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.gp-cat-btn:hover {
    color: var(--color-text);
    border-color: rgba(124,58,237,0.3);
    background: var(--color-surface-3);
}
.gp-cat-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--glow-purple);
}
.gp-cat-btn.cat-math.active { background: linear-gradient(135deg, #F97316, #FB923C); border-color: #F97316; box-shadow: 0 0 15px rgba(249,115,22,0.3); }
.gp-cat-btn.cat-science.active { background: linear-gradient(135deg, #06B6D4, #22D3EE); border-color: #06B6D4; box-shadow: 0 0 15px rgba(6,182,212,0.3); }
.gp-cat-btn.cat-english.active { background: linear-gradient(135deg, #8B5CF6, #A78BFA); border-color: #8B5CF6; box-shadow: 0 0 15px rgba(139,92,246,0.3); }

/* Filters */
.gp-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.gp-grade-select {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}
.gp-grade-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.gp-grade-select option { background: var(--color-surface); color: var(--color-text); }

.gp-search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.gp-search-box i {
    position: absolute;
    left: 12px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.gp-search-box input {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 8px 14px 8px 36px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    width: 200px;
    outline: none;
    transition: all var(--transition-fast);
}
.gp-search-box input::placeholder { color: var(--color-text-muted); }
.gp-search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
    width: 260px;
}

/* CTA Banner */
.gp-cta-banner {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}
.gp-cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: var(--glow-purple);
}
.gp-cta-text { flex: 1; }
.gp-cta-text strong { display: block; font-weight: 800; color: var(--color-text); }
.gp-cta-text span { font-size: 0.85rem; color: var(--color-text-muted); }
.gp-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: var(--glow-purple);
}
.gp-cta-btn:hover { transform: translateY(-2px); color: white; box-shadow: 0 0 25px rgba(124,58,237,0.5); }

/* Section */
.gp-section { margin-bottom: var(--space-2xl); }

.gp-section-title {
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Featured Wrapper with overlay arrows */
.gp-featured-wrapper {
    position: relative;
}

.gp-arrow-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
.gp-arrow-left { left: 8px; }
.gp-arrow-right { right: 8px; }
.gp-arrow-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--glow-purple);
    transform: translateY(-50%) scale(1.1);
}

/* Featured Scroll */
.gp-featured-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: hidden;
    padding-bottom: var(--space-sm);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}
.gp-featured-scroll::-webkit-scrollbar { height: 4px; }
.gp-featured-scroll::-webkit-scrollbar-track { background: var(--color-surface-2); border-radius: 4px; }
.gp-featured-scroll::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 4px; }

.gp-featured-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-normal);
}
.gp-featured-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,0.4);
    box-shadow: var(--glow-purple);
}

/* Game Cards Grid */
.gp-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
}
.gp-game-card {
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-normal);
}
.gp-game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,0.4);
    box-shadow: var(--glow-purple);
}

/* Card Thumbnail */
.gp-card-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.gp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gp-game-card:hover .gp-card-thumb img,
.gp-featured-card:hover .gp-card-thumb img { transform: scale(1.08); }

.gp-thumb-default {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
}
.gp-thumb-default.thumb-math { background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(249,115,22,0.05)); }
.gp-thumb-default.thumb-science { background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(6,182,212,0.05)); }
.gp-thumb-default.thumb-english { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.05)); }

.gp-thumb-icon {
    font-size: 2.5rem;
    color: var(--color-text-muted);
    opacity: 0.6;
}
.gp-thumb-type {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Card Overlay */
.gp-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,15,26,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.gp-game-card:hover .gp-card-overlay,
.gp-featured-card:hover .gp-card-overlay { opacity: 1; }

.gp-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transform: scale(0.8);
    transition: transform var(--transition-normal);
    box-shadow: var(--glow-purple);
}
.gp-game-card:hover .gp-play-btn,
.gp-featured-card:hover .gp-play-btn { transform: scale(1); }

/* Card Badges */
.gp-card-badges {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}
.gp-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}
.gp-badge-math { background: rgba(249,115,22,0.8); color: white; }
.gp-badge-science { background: rgba(6,182,212,0.8); color: white; }
.gp-badge-english { background: rgba(139,92,246,0.8); color: white; }

.gp-hot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(239,68,68,0.9);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Info */
.gp-card-info { padding: var(--space-md); }
.gp-card-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}
.gp-card-meta i { margin-right: 3px; }

/* Empty State */
.gp-empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--color-text-muted);
}

/* SEO Content Sections */
.gp-seo-intro {
    padding: 1.5rem 0 0.5rem;
}
.gp-seo-title {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}
.gp-seo-intro p {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}
.gp-seo-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}
.gp-seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.gp-seo-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.gp-seo-card h2 {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gp-seo-card p {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}
.gp-seo-card p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .gp-category-inner { flex-direction: column; align-items: stretch; }
    .gp-filters { flex-wrap: wrap; }
    .gp-search-box input { width: 100%; }
    .gp-search-box input:focus { width: 100%; }
    .gp-cta-banner { flex-direction: column; text-align: center; }
    .gp-games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .gp-featured-card { flex: 0 0 200px; }
    .gp-category-bar { top: 48px; }
}

/* ============================================================
   SEO Breadcrumb (used sitewide via _Breadcrumb partial)
   ============================================================ */
.seo-breadcrumb {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.65rem 0;
    font-size: 0.8rem;
    font-weight: 700;
}

.seo-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.seo-breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.seo-breadcrumb-item a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.seo-breadcrumb-item a:hover {
    color: var(--color-primary);
}

.seo-breadcrumb-item span[aria-current="page"] {
    color: var(--color-text);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seo-breadcrumb-sep {
    color: var(--color-text-muted);
    font-size: 0.6rem;
    margin: 0 0.45rem;
}

@media (max-width: 768px) {
    .seo-breadcrumb-item span[aria-current="page"] { max-width: 160px; }
    .seo-breadcrumb-sep { margin: 0 0.3rem; }
}

/* ============================================================
   Landing page intro + FAQ (used by _LandingContent partial)
   ============================================================ */
.landing-content-section,
.landing-faq-section {
    padding: 2rem 1.5rem;
    margin-top: 1.5rem;
}

.landing-intro {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
}

.landing-intro h2,
.landing-intro h3 {
    font-weight: 800;
    color: var(--color-text);
    margin: 1.5rem 0 0.75rem;
}

.landing-intro h2:first-child,
.landing-intro h3:first-child { margin-top: 0; }

.landing-intro h2 { font-size: 1.25rem; }
.landing-intro h3 { font-size: 1.05rem; }
.landing-intro p { margin-bottom: 0.85rem; }
.landing-intro ul { padding-left: 1.25rem; margin-bottom: 0.85rem; }
.landing-intro li { margin-bottom: 0.35rem; }
.landing-intro strong { color: var(--color-text); }

.landing-faq-title {
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.landing-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.landing-faq-question {
    cursor: pointer;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 800;
    color: var(--color-text);
    list-style: none;
    user-select: none;
}

.landing-faq-question::-webkit-details-marker { display: none; }

.landing-faq-question i {
    transition: transform 0.2s;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.landing-faq-item[open] .landing-faq-question i {
    transform: rotate(180deg);
}

.landing-faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.landing-faq-answer p { margin-bottom: 0.6rem; }
.landing-faq-answer p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .landing-content-section,
    .landing-faq-section { padding: 1.25rem 1rem; }
    .landing-intro { padding: 1.25rem 1rem; }
    .landing-intro h2 { font-size: 1.1rem; }
}

/* Footer link list (sitemap-style internal linking) */
.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link-list li {
    margin-bottom: 0.4rem;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: color 0.15s;
}

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

/* Related games on Play page (cross-link to same-subject games) */
.play-related-games {
    margin: 2rem 0 1rem;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

.play-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.play-related-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.play-related-title i {
    color: var(--color-primary);
}

.play-related-all {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.play-related-all:hover { color: var(--color-primary); }

.play-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.play-related-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.15s;
}

.play-related-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    color: var(--color-text);
}

.play-related-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-surface);
}

.play-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-related-thumb-default {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 2rem;
}

.play-related-info {
    padding: 0.65rem 0.85rem 0.85rem;
}

.play-related-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.play-related-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.play-related-meta i { margin-right: 0.25rem; }
