/* assets/css/style.css - Premium UI with Your Colors & Ultra-Responsive Design */

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

/* ===== THEME VARIABLES ===== */
:root {
    /* Light Theme */
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --primary-red-light: #ef4444;
    --primary-red-glow: rgba(220, 38, 38, 0.2);
    
    --secondary-blue: #2563eb;
    --secondary-blue-dark: #1d4ed8;
    --secondary-blue-light: #3b82f6;
    --secondary-blue-glow: rgba(37, 99, 235, 0.2);
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-menu: #ffffff;
    --bg-menu-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #475569;
    --text-menu: #0f172a;
    --text-menu-hover: #dc2626;
    --text-light: #ffffff;
    
    --border-light: #e2e8f0;
    --border-menu: #e2e8f0;
    
    --gradient-red: linear-gradient(135deg, #dc2626, #2563eb);
    --gradient-blue: linear-gradient(135deg, #2563eb, #1d4ed8);
    --gradient-mix: linear-gradient(135deg, #dc2626, #2563eb);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.05);
    --shadow-menu: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-red: 0 10px 20px rgba(220,38,38,0.15);
    
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-red: #ef4444;
    --primary-red-dark: #dc2626;
    --primary-red-light: #f87171;
    --primary-red-glow: rgba(239,68,68,0.2);
    
    --secondary-blue: #3b82f6;
    --secondary-blue-dark: #2563eb;
    --secondary-blue-light: #60a5fa;
    --secondary-blue-glow: rgba(59,130,246,0.2);
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-menu: #1e293b;
    --bg-menu-hover: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --text-menu: #f8fafc;
    --text-menu-hover: #ef4444;
    --text-light: #ffffff;
    
    --border-light: #334155;
    --border-menu: #334155;
    
    --gradient-red: linear-gradient(135deg, #dc2626, #2563eb);
    --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-mix: linear-gradient(135deg, #ef4444, #3b82f6);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --shadow-menu: 0 10px 30px rgba(0,0,0,0.4);
    --shadow-red: 0 10px 20px rgba(239,68,68,0.2);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    scroll-behavior: smooth;
}

/* ===== FIXED DESKTOP MENU ===== */
.desktop-menu {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    background: var(--bg-menu);
    border-radius: 2.5rem;
    padding: 2rem 0.5rem;
    box-shadow: var(--shadow-menu);
    border: 1px solid var(--border-menu);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.desktop-menu-item {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-menu);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
    background: var(--bg-menu-hover);
    border: 1px solid var(--border-menu);
}

.desktop-menu-item:hover {
    background: var(--gradient-red);
    color: white;
    transform: scale(1.1);
    border-color: transparent;
}

.desktop-menu-item.active {
    background: var(--gradient-red);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-red);
}

.desktop-tooltip {
    position: absolute;
    left: 70px;
    background: var(--bg-menu);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border-menu);
    box-shadow: var(--shadow-menu);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.desktop-menu-item:hover .desktop-tooltip {
    opacity: 1;
    visibility: visible;
    left: 80px;
}

/* ===== FIXED BOTTOM MOBILE MENU ===== */
.mobile-menu {
    display: none;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: var(--bg-menu);
    border-radius: 3rem;
    padding: 0.75rem;
    box-shadow: var(--shadow-menu);
    border: 1px solid var(--border-menu);
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-menu-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-menu-item {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-menu);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    background: var(--bg-menu-hover);
    border: 1px solid var(--border-menu);
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background: var(--gradient-red);
    color: white;
    transform: translateY(-5px);
    border-color: transparent;
}

.mobile-label {
    position: absolute;
    bottom: 60px;
    background: var(--bg-menu);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border-menu);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.mobile-menu-item:hover .mobile-label {
    opacity: 1;
    visibility: visible;
    bottom: 70px;
}

/* ===== TOP NAVBAR - BRANDING ONLY ===== */
.top-navbar {
    background: linear-gradient(135deg, #dc2626, #2563eb);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    box-shadow: var(--shadow-md);
}

.top-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-logo i {
    font-size: 1.8rem;
}

.theme-toggle-nav {
    background: rgba(238, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

/* Hide old floating theme toggle when new navbar exists */
.top-navbar + * + .theme-toggle,
.top-navbar ~ .theme-toggle {
    display: none !important;
}

/* Adjust main content for fixed top navbar */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 2rem;
    transition: var(--transition);
}

/* Desktop spacing */
@media (min-width: 769px) {
    .main-content {
        margin-left: 120px;
        width: calc(100% - 120px);
    }
}

/* Mobile spacing */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 60px;
        width: 100%;
        padding: 1rem 1rem 90px 1rem;
    }
}

/* ===== ADMIN PANEL SIDEBAR LAYOUT ===== */

/* Hide floating menu on ALL admin pages */
body[data-admin="true"] .desktop-menu,
body[data-admin="true"] .mobile-menu,
body[data-admin="true"] .floating-menu,
body[data-admin="true"] .bottom-menu {
    display: none !important;
}

/* Hide top navbar on admin pages */
body[data-admin="true"] .top-navbar {
    display: none !important;
}

body[data-admin="true"] {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(220, 38, 38, 0.03), transparent 18%),
        var(--bg-secondary);
}

body[data-admin="true"] .admin-brandbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    background: var(--gradient-red);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    z-index: 1100;
}

body[data-admin="true"] .admin-brandbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body[data-admin="true"] .admin-brandbar-brand i {
    font-size: 1.4rem;
}

body[data-admin="true"] .admin-brandbar-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 500;
}

body[data-admin="true"] .admin-brandbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body[data-admin="true"] .admin-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-admin="true"] .admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

body[data-admin="true"] .admin-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

body[data-admin="true"] .admin-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

body[data-admin="true"] .admin-sidebar-overlay {
    display: none;
}

/* Reset main content for admin pages */
body[data-admin="true"] .main-content {
    margin-left: 280px !important;
    margin-top: 78px !important;
    width: calc(100% - 280px) !important;
    padding: 2rem !important;
}

body[data-admin="true"] > .container {
    max-width: none !important;
    width: auto !important;
    margin: 78px 0 0 280px !important;
    padding: 2rem 2rem 2rem 2.5rem !important;
}

body[data-admin="true"] .settings-container {
    margin: calc(78px + 2rem) 2rem 2rem calc(280px + 2rem) !important;
}

/* Main admin sidebar */
body[data-admin="true"] .navbar {
    display: block !important;
    background: var(--bg-card) !important;
    padding: 0 !important;
    position: fixed !important;
    top: 78px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    border-right: 1px solid var(--border-light) !important;
    z-index: 1000 !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    overflow-y: auto !important;
}

body[data-admin="true"] .navbar .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 1.5rem !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 1.5rem 1rem !important;
}

body[data-admin="true"] .logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    flex-shrink: 0 !important;
    padding: 0.25rem 0.5rem 1.1rem !important;
    border-bottom: 1px solid var(--border-light) !important;
}

body[data-admin="true"] .logo i {
    font-size: 1.6rem !important;
    color: var(--primary-red) !important;
    filter: none !important;
}

body[data-admin="true"] .nav-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
    flex: 1 1 auto !important;
}

body[data-admin="true"] .nav-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    border-radius: 1rem !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    white-space: normal !important;
}

body[data-admin="true"] .nav-links a i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.25rem !important;
    min-width: 1.25rem !important;
    font-size: 1rem !important;
    color: inherit !important;
}

body[data-admin="true"] .nav-links a span {
    display: inline !important;
}

body[data-admin="true"] .nav-links a:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    color: var(--text-primary) !important;
    transform: translateX(4px) !important;
    border-color: rgba(37, 99, 235, 0.12) !important;
}

body[data-admin="true"] .nav-links a.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(37, 99, 235, 0.12)) !important;
    color: var(--text-primary) !important;
    border-color: rgba(16, 185, 129, 0.28) !important;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.12) !important;
}

body[data-admin="true"] .nav-links a:last-child {
    margin-top: auto !important;
    background: rgba(220, 38, 38, 0.08) !important;
    color: var(--primary-red) !important;
    border-color: rgba(220, 38, 38, 0.12) !important;
}

body[data-admin="true"] .nav-links a:last-child:hover {
    background: rgba(220, 38, 38, 0.14) !important;
    color: var(--primary-red-dark) !important;
}

body[data-admin="true"] .nav-right,
body[data-admin="true"] .notification-badge {
    display: none !important;
}

body[data-admin="true"] .theme-toggle,
body[data-admin="true"] #themeToggleNav {
    display: none !important;
}

/* ===== RESPONSIVE BREAKPOINTS FOR ADMIN SIDEBAR ===== */
@media (max-width: 900px) {
    body[data-admin="true"] .admin-menu-toggle {
        display: inline-flex;
    }

    body[data-admin="true"] .admin-brandbar {
        padding: 0 1rem;
    }

    body[data-admin="true"] .admin-brandbar-brand {
        font-size: 1.05rem;
    }

    body[data-admin="true"] .admin-brandbar-subtitle {
        display: none;
    }

    body[data-admin="true"] .navbar {
        position: fixed !important;
        width: min(82vw, 320px) !important;
        height: calc(100vh - 78px) !important;
        border-right: 1px solid var(--border-light) !important;
        border-bottom: none !important;
        top: 78px !important;
        left: 0 !important;
        transform: translateX(-100%);
        transition: transform 0.25s ease !important;
        z-index: 1200 !important;
    }

    body[data-admin="true"] .navbar .container {
        height: 100% !important;
    }

    body[data-admin="true"] .logo {
        padding-bottom: 0.9rem !important;
    }

    body[data-admin="true"] .nav-links {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    body[data-admin="true"] .nav-links a {
        width: 100% !important;
        flex: 0 0 auto !important;
    }

    body[data-admin="true"] .nav-links a:last-child {
        margin-top: 0 !important;
    }

    body[data-admin="true"] > .container {
        margin: 0 !important;
        padding: 1.5rem 1rem !important;
    }

    body[data-admin="true"] .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        padding: 1.5rem 1rem !important;
    }

    body[data-admin="true"] .settings-container {
        margin: 1.5rem 1rem !important;
    }

    body[data-admin="true"] .admin-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 78px 0 0 0;
        background: rgba(15, 23, 42, 0.45);
        border: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        z-index: 1150;
    }

    body[data-admin="true"].admin-sidebar-open .navbar {
        transform: translateX(0);
    }

    body[data-admin="true"].admin-sidebar-open .admin-sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* ===== THEME TOGGLE (OLD - HIDDEN WHEN TOP NAVBAR EXISTS) ===== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-mix);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-menu);
    transition: var(--transition);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-red);
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 6rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 700; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; margin-bottom: 1rem; }

p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

/* ===== CARDS ===== */
.card, .dashboard-card, .stat-card, .question-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover, .dashboard-card:hover, .stat-card:hover, .question-container:hover {
    transform: translateY(-4px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-red);
}

/* ===== STAT CARDS ===== */
.stat-card {
    text-align: center;
}

.stat-number {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: clamp(0.75rem, 2.5vw, 0.875rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== GRIDS ===== */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .stats-grid, .dashboard-grid {
        gap: 1rem;
    }
}

/* ===== FORMS ===== */
.form-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 1rem;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px var(--primary-red-glow);
}

/* ===== FIX FOR DARK MODE DROPDOWNS ===== */
.form-group select {
    cursor: pointer;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

[data-theme="dark"] .form-group select {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .form-group select option {
    background: #0f172a;
    color: #f8fafc;
}

[data-theme="dark"] .form-group select option:hover,
[data-theme="dark"] .form-group select option:focus,
[data-theme="dark"] .form-group select option:checked {
    background: var(--gradient-red);
    color: white;
}

/* Quiz setup page specific fixes */
.setup-form select {
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.setup-form select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .setup-form select {
    background: #1e293b;
    color: #f8fafc;
}

[data-theme="dark"] .setup-form select option {
    background: #0f172a;
    color: #f8fafc;
}

[data-theme="dark"] .setup-form select option:hover,
[data-theme="dark"] .setup-form select option:checked {
    background: var(--gradient-red);
    color: white;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px var(--primary-red-glow);
}

.btn-secondary {
    background: var(--gradient-blue);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px var(--secondary-blue-glow);
}

@media (max-width: 480px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* ===== TABLES ===== */
.table-responsive {
    overflow-x: hidden;
    margin: 1.5rem 0;
    border-radius: 1rem;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
}

.admin-table, .questions-table, .student-table, .leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
}

.admin-table th,
.questions-table th,
.student-table th,
.leaderboard-table th {
    background: var(--gradient-red);
    color: white;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    text-align: left;
    white-space: normal;
}

.admin-table td,
.questions-table td,
.student-table td,
.leaderboard-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    white-space: normal;
}

/* Make leaderboard more compact on all screens */
.leaderboard-table th,
.leaderboard-table td {
    padding: 0.6rem 0.3rem;
}

.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
    padding-left: 0.5rem;
}

.leaderboard-table th:last-child,
.leaderboard-table td:last-child {
    padding-right: 0.5rem;
}

/* Hide less important columns on mobile */
@media (max-width: 768px) {
    .leaderboard-table th:nth-child(3),
    .leaderboard-table td:nth-child(3),
    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5),
    .leaderboard-table th:nth-child(6),
    .leaderboard-table td:nth-child(6) {
        display: none;
    }
    
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) {
        font-size: 0.8rem;
    }
    
    .rank-badge {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 0.75rem;
        margin-right: 0.2rem;
    }
    
    .level-badge {
        padding: 0.15rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .badge-count {
        padding: 0.15rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) {
        display: none;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        padding-left: 0.3rem;
    }
    
    .leaderboard-table th:last-child,
    .leaderboard-table td:last-child {
        padding-right: 0.3rem;
    }
}

/* ===== BADGES ===== */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
    color: white;
}

.badge-red { background: var(--gradient-red); }
.badge-blue { background: var(--gradient-blue); }
.badge-gold { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #000; }
.badge-silver { background: linear-gradient(135deg, #c0c0c0, #e0e0e0); color: #000; }
.badge-bronze { background: linear-gradient(135deg, #cd7f32, #b87333); }

/* ===== PROGRESS BARS ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-red);
    transition: width 0.3s ease;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #10b981;
    color: white;
}

.alert-error {
    background: #ef4444;
    color: white;
}

.alert-info {
    background: #3b82f6;
    color: white;
}

/* Dark mode alerts */
[data-theme="dark"] .alert-success { background: #059669; }
[data-theme="dark"] .alert-error { background: #dc2626; }
[data-theme="dark"] .alert-info { background: #2563eb; }

/* ===== QUIZ OPTIONS ===== */
.options-grid {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.option {
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 1rem;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
}

.option:hover {
    border-color: var(--primary-red);
    background: var(--bg-menu-hover);
}

.option.selected {
    background: var(--gradient-red);
    color: white;
    border-color: transparent;
}

@media (max-width: 480px) {
    .option {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 11000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1.5rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
    }
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== NEXUS BAR ===== */
.nexus-bar {
    background: var(--gradient-blue);
    border-radius: 1.5rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-blue);
}

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

.level-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    backdrop-filter: blur(5px);
}

.nexus-progress-bg {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 1rem;
    overflow: hidden;
    margin: 1rem 0;
}

.nexus-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 1rem;
    transition: width 0.5s ease;
}

@media (max-width: 480px) {
    .nexus-bar {
        padding: 1rem;
    }
    
    .level-badge {
        padding: 0.3rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== CHALLENGE BOX ===== */
.challenge-box {
    background: var(--gradient-mix);
    border-radius: 1.5rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.challenge-box::before {
    content: '🎯';
    position: absolute;
    right: 2rem;
    bottom: 1rem;
    font-size: 5rem;
    opacity: 0.2;
}

.challenge-reward {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    display: inline-block;
    margin-top: 1rem;
    backdrop-filter: blur(5px);
}

@media (max-width: 480px) {
    .challenge-box {
        padding: 1.5rem;
    }
    
    .challenge-box::before {
        font-size: 3rem;
        right: 1rem;
        bottom: 0.5rem;
    }
    
    .challenge-reward {
        padding: 0.3rem 1rem;
        font-size: 0.8rem;
    }
}

/* ===== STREAK BOX ===== */
.streak-box {
    background: var(--gradient-red);
    border-radius: 1.5rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow-red);
}

.streak-number {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .streak-box {
        padding: 1.5rem;
    }
}

/* ===== BADGES CONTAINER ===== */
.badges-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.badge-item {
    background: var(--gradient-glow);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    min-width: 100px;
    transition: var(--transition);
}

.badge-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-red);
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .badge-item {
        min-width: 80px;
        padding: 0.8rem;
    }
    
    .badge-icon {
        font-size: 2rem;
    }
    
    .badge-name {
        font-size: 0.75rem;
    }
}

/* ===== PODIUM - AUTO FIT NO SCROLL ===== */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    width: 100%;
}

.podium-item {
    text-align: center;
    flex: 1 1 0;
    min-width: 100px;
    max-width: 200px;
    padding: 0 0.25rem;
}

.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }

.podium-rank {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.podium-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: normal;
    word-break: break-word;
    font-size: clamp(0.7rem, 3vw, 1rem);
    line-height: 1.2;
}

.podium-score {
    color: var(--primary-red);
    font-weight: 700;
    font-size: clamp(0.8rem, 3vw, 1.2rem);
}

.podium-bar {
    width: 100%;
    border-radius: 0.75rem 0.75rem 0 0;
    margin-top: 0.75rem;
    height: 80px;
}

.podium-1 .podium-bar {
    height: 100px;
    background: linear-gradient(135deg, gold, #ffd700);
    box-shadow: 0 -3px 15px rgba(255, 215, 0, 0.3);
}

.podium-2 .podium-bar {
    height: 80px;
    background: linear-gradient(135deg, silver, #c0c0c0);
    box-shadow: 0 -3px 15px rgba(192, 192, 192, 0.3);
}

.podium-3 .podium-bar {
    height: 65px;
    background: linear-gradient(135deg, #cd7f32, #b87333);
    box-shadow: 0 -3px 15px rgba(205, 127, 50, 0.3);
}

/* ===== CATEGORY GRID RESPONSIVENESS ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .category-winner {
        font-size: 0.9rem;
    }
    
    .winner-score {
        font-size: 0.9rem;
    }
}

/* ===== STREAK CARDS RESPONSIVENESS ===== */
.streak-card {
    padding: 0.75rem 1rem;
}

@media (max-width: 480px) {
    .streak-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .streak-days {
        align-self: flex-start;
    }
}

/* ===== LEADERBOARD TABS RESPONSIVENESS ===== */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 3rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
}

.tab-btn.active {
    background: var(--gradient-red);
    color: white;
    border-color: transparent;
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 0.5rem 0.8rem;
        flex: 1 1 auto;
    }
}

/* ===== LEADERBOARD HEADER ===== */
.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gradient-red);
    border-radius: 2rem;
    color: white;
}

@media (max-width: 480px) {
    .leaderboard-header {
        padding: 1rem;
    }
    
    .leaderboard-header h1 {
        font-size: 1.8rem;
    }
    
    .leaderboard-header p {
        font-size: 0.9rem;
    }
}

/* ===== ADMIN ADJUSTED BADGE ===== */
.admin-adjusted-badge {
    background: var(--gradient-mix);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    margin-left: 0.25rem;
    display: inline-block;
}

@media (max-width: 480px) {
    .admin-adjusted-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* ===== ULTRA-RESPONSIVE FINE-TUNING FOR ALL DEVICES ===== */

/* iPhone 5/SE (320px) - Smallest */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Podium */
    .podium-item {
        min-width: 85px;
    }
    
    .podium-name {
        font-size: 0.65rem;
    }
    
    .podium-score {
        font-size: 0.75rem;
    }
    
    .podium-1 .podium-bar {
        height: 70px;
    }
    
    .podium-2 .podium-bar {
        height: 55px;
    }
    
    .podium-3 .podium-bar {
        height: 40px;
    }
    
    /* Table */
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.65rem;
    }
    
    .rank-badge {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 0.6rem;
    }
    
    /* Badges */
    .badge-item {
        min-width: 70px;
        padding: 0.6rem;
    }
    
    .badge-icon {
        font-size: 1.8rem;
    }
    
    .badge-name {
        font-size: 0.65rem;
    }
    
    /* Nexus Bar */
    .nexus-bar {
        padding: 1rem;
    }
    
    .level-badge {
        padding: 0.3rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Challenge Box */
    .challenge-box {
        padding: 1.2rem;
    }
    
    .challenge-box::before {
        font-size: 2.5rem;
    }
    
    /* Streak Box */
    .streak-number {
        font-size: 2.8rem;
    }
    
    /* Mobile Menu */
    .mobile-menu-item {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .mobile-label {
        font-size: 0.65rem;
        bottom: 45px;
    }
    
    .theme-toggle-nav {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .top-logo {
        font-size: 1rem;
    }
    
    .top-logo i {
        font-size: 1.2rem;
    }
}

/* iPhone 6/7/8 (375px) */
@media (min-width: 361px) and (max-width: 390px) {
    .podium-item {
        min-width: 95px;
    }
    
    .podium-name {
        font-size: 0.75rem;
    }
    
    .podium-1 .podium-bar {
        height: 85px;
    }
    
    .podium-2 .podium-bar {
        height: 70px;
    }
    
    .podium-3 .podium-bar {
        height: 55px;
    }
    
    .badge-item {
        min-width: 85px;
    }
}

/* iPhone 12/13/14 (390px) and most Androids */
@media (min-width: 391px) and (max-width: 430px) {
    .podium-item {
        min-width: 105px;
    }
    
    .podium-name {
        font-size: 0.85rem;
    }
    
    .podium-1 .podium-bar {
        height: 95px;
    }
    
    .podium-2 .podium-bar {
        height: 80px;
    }
    
    .podium-3 .podium-bar {
        height: 65px;
    }
}

/* iPhone Pro Max / Large Androids (430px - 480px) */
@media (min-width: 431px) and (max-width: 480px) {
    .podium-item {
        min-width: 115px;
    }
    
    .podium-1 .podium-bar {
        height: 100px;
    }
    
    .podium-2 .podium-bar {
        height: 85px;
    }
    
    .podium-3 .podium-bar {
        height: 70px;
    }
}

/* Small tablets (481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
    
    .podium-item {
        min-width: 130px;
    }
    
    .podium-1 .podium-bar {
        height: 110px;
    }
    
    .podium-2 .podium-bar {
        height: 90px;
    }
    
    .podium-3 .podium-bar {
        height: 75px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .podium-item {
        min-width: 150px;
    }
    
    .podium-1 .podium-bar {
        height: 120px;
    }
    
    .podium-2 .podium-bar {
        height: 100px;
    }
    
    .podium-3 .podium-bar {
        height: 85px;
    }
}

/* Small laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        margin-left: 100px;
        width: calc(100% - 100px);
    }
    
    .desktop-menu {
        left: 1rem;
        width: 70px;
    }
    
    .desktop-menu-item {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .podium-item {
        min-width: 160px;
    }
}

/* Large laptops (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .main-content {
        margin-left: 110px;
        width: calc(100% - 110px);
    }
    
    .container {
        max-width: 1100px;
    }
}

/* Ultra-wide monitors (1281px+) */
@media (min-width: 1281px) {
    .container {
        max-width: 1400px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 480px) and (orientation: landscape) {
    .mobile-menu {
        bottom: 0.5rem;
        padding: 0.5rem;
    }
    
    .main-content {
        padding-bottom: 70px;
    }
    
    .podium {
        margin: 1rem 0;
    }
    
    .podium-item {
        min-width: 120px;
    }
}

/* High pixel density devices (Retina displays) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===== PRINT STYLES ===== */
@media print {
    .desktop-menu, .mobile-menu, .theme-toggle, .top-navbar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
}

/* ======================================= */
/* CHALLENGES SECTION */
/* ======================================= */

.challenges-section {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #1e293b;
}

.view-all {
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.challenge-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.challenge-card.joined {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.challenge-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.challenge-badge.weekly { background: #f59e0b; color: white; }
.challenge-badge.monthly { background: #3b82f6; color: white; }
.challenge-badge.special { background: #8b5cf6; color: white; }

.participants {
    font-size: 12px;
    color: #64748b;
}

.challenge-card h3 {
    margin: 10px 0 5px;
    font-size: 16px;
    color: #0f172a;
}

.challenge-card p {
    font-size: 13px;
    color: #475569;
    margin-bottom: 12px;
}

.challenge-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 15px;
}

.progress-section {
    margin: 15px 0;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #dc2626;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #475569;
    margin-top: 5px;
    display: block;
}

.challenge-actions,
.join-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-details, .btn-leaderboard,
.btn-join, .btn-view {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    flex: 1;
    text-align: center;
}

.btn-details { background: #1e293b; color: white; }
.btn-leaderboard { background: #f1f5f9; color: #0f172a; }
.btn-join { background: #dc2626; color: white; border: none; cursor: pointer; }
.btn-view { background: #f1f5f9; color: #0f172a; text-decoration: none; }

.no-challenges {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.no-challenges i {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Leaderboard Styles */
.leaderboard-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h1 {
    color: #1e293b;
    margin-bottom: 10px;
}

.leaderboard-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #64748b;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: 12px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-table tr.current-user {
    background: #fef2f2;
    font-weight: bold;
}

.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #b45309; }

.user-rank-card {
    margin-top: 20px;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-join-card {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-join-card:hover {
    background: white;
    color: var(--accent-red);
    transform: scale(1.1);
}
