/* ============================================
   ARENATUBI - PURE CSS STYLESHEET
   Online Tiered Quiz Platform
   Design System: Minimalist SaaS Style
   ============================================ */

/* ============================================
   ROOT VARIABLES & RESET
   ============================================ */
:root {
    /* Brand Colors - Light Mode (Default) */
    --primary-blue: #2550AD;
    --accent-yellow: #FFBD59;
    --neutral-white: #FDFBFF;
    --light-grey: #F5F7FA;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;

    /* Background Colors */
    --bg-primary: #FDFBFF;
    --bg-secondary: #F5F7FA;
    --bg-card: #FFFFFF;

    /* Border Colors */
    --border-color: #E1E8ED;

    /* Status Colors - Light Mode */
    --success-bg: #d1fae5;
    --success-bg-alt: #a7f3d0;
    --success-text: #065f46;
    --success-border: #86efac;

    --warning-bg: #fef3c7;
    --warning-bg-alt: #fde68a;
    --warning-text: #92400e;
    --warning-border: #fbbf24;

    --error-bg: #fee2e2;
    --error-bg-alt: #fecaca;
    --error-text: #991b1b;
    --error-border: #fca5a5;

    --info-bg: #eff6ff;
    --info-bg-alt: #dbeafe;
    --info-text: #1e40af;
    --info-border: #3b82f6;

    /* Secondary Button Colors */
    --btn-secondary-bg: #f8f9fa;
    --btn-secondary-border: #dee2e6;
    --btn-secondary-hover: #e2e6ea;

    /* Border Radius */
    --radius-small: 10px;
    --radius-medium: 12px;
    --radius-large: 15px;

    /* Spacing - Compact Design */
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 28px;
    --spacing-xxl: 36px;

    /* Typography */
    --font-body: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-display: 'Outfit', 'Arial Black', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(37, 80, 173, 0.08);
    --shadow-md: 0 4px 12px rgba(37, 80, 173, 0.12);
    --shadow-lg: 0 8px 24px rgba(37, 80, 173, 0.16);
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --primary-blue: #4A7FE8;
    --accent-yellow: #FFD073;
    --neutral-white: #1A1D2E;
    --light-grey: #252837;
    --text-dark: #E8EAED;
    --text-light: #B8BBC2;

    /* Background Colors */
    --bg-primary: #1A1D2E;
    --bg-secondary: #252837;
    --bg-card: #2D3142;

    /* Border Colors */
    --border-color: #3D4153;

    /* Status Colors - Dark Mode */
    --success-bg: #1e3a2e;
    --success-bg-alt: #2d5243;
    --success-text: #86efac;
    --success-border: #34d399;

    --warning-bg: #3a2e1e;
    --warning-bg-alt: #52432d;
    --warning-text: #fbbf24;
    --warning-border: #f59e0b;

    --error-bg: #3a1e1e;
    --error-bg-alt: #522d2d;
    --error-text: #fca5a5;
    --error-border: #f87171;

    --info-bg: #1e2a3a;
    --info-bg-alt: #2d3d52;
    --info-text: #60a5fa;
    --info-border: #3b82f6;

    /* Secondary Button Colors */
    --btn-secondary-bg: #3D4153;
    --btn-secondary-border: #4A4E60;
    --btn-secondary-hover: #4A4E60;

    /* Shadows for dark mode */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-yellow);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border-color: var(--accent-yellow);
}

.btn-primary:hover {
    background-color: #FFD280;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.125rem;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xxl) 0;
}

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

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

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

/* ============================================
   GRID SYSTEM
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col {
    flex: 1;
    padding: 0 12px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
    transition: background-color 0.3s ease;
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-small);
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.nav-menu li a:hover {
    background-color: var(--light-grey);
    color: var(--primary-blue);
}

.nav-cta {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-medium);
    font-weight: 600;
    font-size: 0.875rem;
}

.nav-cta:hover {
    background-color: #FFD280;
    transform: translateY(-2px);
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

/* Create invisible bridge between trigger and menu */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    display: none;
}

.nav-dropdown:hover::after {
    display: block;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-medium);
    min-width: 220px;
    padding: var(--spacing-xs) 0;
    list-style: none;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.nav-dropdown-menu li a:hover {
    background-color: var(--light-grey);
    color: var(--primary-blue);
}

/* Profile Dropdown Styles */
.profile-dropdown .profile-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-yellow));
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.profile-avatar .avatar-initials {
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--text-dark);
}

.profile-menu {
    min-width: 220px;
}

.menu-divider {
    height: 1px;
    background-color: var(--light-grey);
    margin: 8px 0;
}

.menu-label {
    padding: 8px 20px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Theme Toggle & Language Switcher */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle, .lang-toggle {
    background: var(--light-grey);
    border: none;
    border-radius: var(--radius-medium);
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.theme-icon, .lang-icon {
    font-size: 0.875rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, #2550AD 0%, #3D6FCC 100%);
    color: white;
    padding: var(--spacing-lg) 0;
    min-height: 380px;
    display: flex;
    align-items: center;
}

.hero-content {
    flex: 1;
    padding-right: var(--spacing-lg);
}

.hero-content h1 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.hero-illustration {
    flex: 1;
    text-align: center;
    font-size: 12rem;
    line-height: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-medium);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-yellow);
}

.card-icon {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-xs);
    display: inline-block;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-blue);
}

.card-text {
    color: var(--text-light);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Subject Cards */
.subject-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-medium);
    padding: var(--spacing-sm);
    border: 2px solid var(--primary-blue);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-yellow);
}

.subject-icon {
    font-size: 2.75rem;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.subject-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.subject-progress {
    width: 100%;
    height: 6px;
    background-color: var(--light-grey);
    border-radius: 3px;
    margin-top: var(--spacing-sm);
    overflow: hidden;
}

.subject-progress-bar {
    height: 100%;
    background-color: var(--accent-yellow);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Pricing Cards */
.pricing-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-large);
    padding: var(--spacing-xl);
    border: 2px solid var(--light-grey);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-yellow);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
}

.pricing-plan-name {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

.pricing-price {
    font-size: 3rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.pricing-price span {
    font-size: 1.25rem;
    color: var(--text-light);
}

.pricing-features {
    list-style: none;
    margin: var(--spacing-lg) 0;
    padding: 0;
}

.pricing-features li {
    padding: var(--spacing-xs) 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--light-grey);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-blue);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--light-grey);
    border-radius: var(--radius-medium);
    transition: all 0.3s ease;
    background-color: var(--bg-card);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 80, 173, 0.1);
}

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

/* Auth Card */
.auth-card {
    max-width: 450px;
    margin: var(--spacing-xxl) auto;
    background-color: var(--bg-card);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background-color: var(--light-grey);
}

.auth-tab {
    flex: 1;
    padding: var(--spacing-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background-color: var(--bg-card);
    color: var(--primary-blue);
    border-bottom-color: var(--accent-yellow);
}

.auth-content {
    padding: var(--spacing-xl);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: #1e293b;
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.footer-section {
    flex: 1;
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* Minimal Footer Design */
.footer-minimal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    font-family: var(--font-display);
    letter-spacing: 0;
    word-spacing: 0;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: white;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.625rem;
}

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

/* ============================================
   FEATURES GRID
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    background-color: var(--light-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* ============================================
   SUBJECTS GRID
   ============================================ */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* ============================================
   PRICING GRID
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* ============================================
   UTILITIES
   ============================================ */
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-illustration {
        font-size: 9rem;
    }

    .footer-content {
        flex-wrap: wrap;
    }

    .footer-section {
        flex-basis: 50%;
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    /* Mobile dropdown styles */
    .nav-dropdown::after {
        display: none !important;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--light-grey);
        margin-top: 8px;
        border-left: 3px solid var(--primary-blue);
        opacity: 1;
        transform: none;
    }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-illustration {
        font-size: 6rem;
        margin-top: var(--spacing-md);
    }

    .row {
        flex-direction: column;
    }

    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .subjects-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-xs);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .footer-section {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.65rem; }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-illustration {
        font-size: 4rem;
    }

    .btn {
        padding: 9px 18px;
        font-size: 0.875rem;
    }

    .section {
        padding: var(--spacing-md) 0;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   LOADING STATES
   ============================================ */
.spinner {
    border: 3px solid var(--light-grey);
    border-top: 3px solid var(--accent-yellow);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-md) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */
.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-medium);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEAA7;
}

.alert-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 16px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
}

.flash-message {
    animation: slideInDown 0.3s ease-out;
}

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

/* ============================================
   ARENA COINS & SHOP SYSTEM
   ============================================ */

/* Coin Balance Widget (Header) */
.coin-balance-widget {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    transition: all 0.3s ease;
}

.coin-balance-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.coin-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
}

.coin-icon {
    font-size: 0.875rem;
    animation: coinSpin 3s ease-in-out infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.coin-amount {
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
}

/* Shop Header & Navigation */
.shop-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3D6FCC 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.shop-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.shop-nav-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.shop-nav-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.shop-nav-item.active {
    background: white;
    color: var(--primary-blue);
    border-color: var(--accent-yellow);
}

/* Add alias for shop-nav-link to match header.php */
.shop-nav-link {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.shop-nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.shop-nav-link.active {
    background: white;
    color: var(--primary-blue);
    border-color: var(--accent-yellow);
}

/* Shop Header Content Layout */
.shop-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.shop-title-section {
    flex: 1;
    min-width: 300px;
}

.shop-title {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.shop-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0;
}

.shop-balance-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
}

.balance-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: white;
    font-size: 0.85rem;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.balance-link:hover {
    opacity: 1;
}

/* Shop Container */
.shop-container {
    padding-bottom: 3rem;
}

/* Section Header (used in shop pages) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.item-count {
    font-size: 0.95rem;
    color: var(--text-light);
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Shop Balance Display */
.balance-display-card {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    margin-bottom: 2rem;
}

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Shop Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.category-tab:hover {
    background: var(--bg-secondary);
    color: var(--text-dark);
}

.category-tab.active {
    background: var(--primary-blue);
    color: white;
    position: relative;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
}

/* Shop Item Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.shop-item-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.shop-item-card.featured {
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.shop-item-card.featured::before {
    content: '⭐ Featured';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.item-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.item-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.item-description {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1rem;
    min-height: 3rem;
}

.item-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.item-type-theme {
    background: #E0E7FF;
    color: #4338CA;
}

.item-type-avatar {
    background: #FCE7F3;
    color: #BE185D;
}

.item-type-badge {
    background: #FEF3C7;
    color: #92400E;
}

.item-type-powerup {
    background: #D1FAE5;
    color: #065F46;
}

.item-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.item-price .coin-icon {
    font-size: 1.5rem;
}

.item-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-purchase {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3D6FCC 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-purchase:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 80, 173, 0.3);
}

.btn-purchase:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-preview {
    background: var(--bg-secondary);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Inventory Styles */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.inventory-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.inventory-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.inventory-item.equipped {
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.inventory-item.equipped::before {
    content: '✓ Equipped';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.btn-equip {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.65rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-equip:hover {
    background: #1e40af;
}

.btn-unequip {
    background: #F59E0B;
}

.btn-unequip:hover {
    background: #D97706;
}

/* Power-ups Page */
.powerup-card {
    background: var(--bg-card);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.powerup-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.powerup-icon-large {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 12px;
}

.powerup-details {
    flex: 1;
}

.powerup-quantity {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
}

.powerup-quantity-value {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.powerup-quantity-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Transaction History */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

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

.transaction-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.transaction-earn .transaction-icon {
    background: #D1FAE5;
}

.transaction-spend .transaction-icon {
    background: #FEE2E2;
}

.transaction-details {
    flex: 1;
}

.transaction-description {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.transaction-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.transaction-amount {
    text-align: right;
}

.transaction-amount-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.transaction-earn .transaction-amount-value {
    color: #10b981;
}

.transaction-spend .transaction-amount-value {
    color: #ef4444;
}

.transaction-balance {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Theme Preview Modal */
.theme-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.theme-preview-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.theme-color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

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

.color-box {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 2px solid var(--border-color);
}

.color-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .shop-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .shop-title {
        font-size: 1.5rem;
    }

    .shop-subtitle {
        font-size: 0.95rem;
    }

    .shop-balance-card {
        width: 100%;
    }

    .shop-nav {
        flex-direction: column;
        width: 100%;
    }

    .shop-nav-link,
    .shop-nav-item {
        width: 100%;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .powerup-card {
        flex-direction: column;
        text-align: center;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .coin-balance-widget {
        padding: 0.4rem 0.8rem;
    }

    .coin-amount {
        font-size: 0.9rem;
    }
}

/* ============================================
   HEALTH & LEVELING SYSTEM STYLES
   ============================================ */

/* Health Widget (Header) */
.health-widget {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.health-widget:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.health-icon {
    font-size: 0.875rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.health-bar {
    width: 60px;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.health-text {
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    min-width: 40px;
    text-align: center;
}

/* Level Widget (Header) */
.level-widget {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.level-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.level-icon {
    font-size: 0.875rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(15deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.level-text {
    font-size: 0.625rem;
    font-weight: 700;
}

/* XP Progress Bar */
.xp-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Health Bar Large (Dashboard) */
.health-bar-large {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

/* Navigation Items */
.nav-item-health,
.nav-item-level,
.nav-item-coins {
    list-style: none;
}

/* Responsive adjustments for health/level widgets */
@media (max-width: 768px) {
    .health-widget,
    .level-widget {
        padding: 0.4rem 0.8rem;
    }

    .health-bar {
        width: 80px;
    }

    .health-text,
    .level-text {
        font-size: 0.75rem;
    }

    .health-icon,
    .level-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .health-bar {
        width: 60px;
    }

    .health-text {
        display: none;
    }
}

/* ============================================
   MODERN COMPACT DASHBOARD DESIGN
   ============================================ */

/* Full-width dashboard container */
.dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
}

/* Dashboard Grid Layout (Main + Sidebar) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 320px;
    }
}

/* Center content for guest users (no sidebar) */
.dashboard-grid.guest-mode {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.dashboard-grid.guest-mode .main-content {
    max-width: 100%;
}

@media (max-width: 768px) {
    .dashboard-grid.guest-mode {
        padding: 0 1rem;
    }
}

/* Compact Welcome Card */
.welcome-card {
    background: white;
    border-radius: var(--radius-medium);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.welcome-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .welcome-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.welcome-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
}

.admin-mode-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-small);
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.admin-mode-btn:hover {
    background: var(--btn-secondary-hover);
}

/* Compact Stats Grid */
.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .compact-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.compact-stat-card {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: var(--radius-small);
    border: 1px solid #BFDBFE;
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.compact-stat-card.accent {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-color: #C7D2FE;
}

.compact-stat-card.orange {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-color: #FED7AA;
}

.compact-stat-card.green {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-color: #BBF7D0;
}

.compact-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.compact-stat-card.accent .compact-stat-value {
    color: #6366F1;
}

.compact-stat-card.orange .compact-stat-value {
    color: #EA580C;
}

.compact-stat-card.green .compact-stat-value {
    color: #059669;
}

.compact-stat-label {
    font-size: 0.5625rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Quiz Configuration Card */
.quiz-config-card {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.quiz-config-header {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(248, 250, 252, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-config-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.quiz-config-reset {
    font-size: 0.625rem;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}

.quiz-config-reset:hover {
    color: var(--primary-blue);
}

.quiz-config-body {
    padding: 1rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.config-grid-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .config-grid-full {
        grid-template-columns: 4fr 8fr;
    }
}

.config-section {
    margin-bottom: 1rem;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-label {
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Level/Standard Buttons */
.level-buttons {
    display: flex;
    gap: 0.5rem;
}

.level-btn-compact {
    flex: 1;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
}

.level-btn-compact:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.level-btn-compact.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* Standard Number Buttons */
.standard-numbers {
    display: flex;
    gap: 0.375rem;
}

.standard-num-btn {
    flex: 1;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    height: 1.75rem;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.standard-num-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.standard-num-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* Quantity Buttons */
.quantity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.quantity-btn {
    padding: 0.375rem 0;
    border-radius: var(--radius-small);
    border: 1px solid var(--border-color);
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.quantity-btn:hover {
    border-color: var(--primary-blue);
}

.quantity-btn.active {
    border-color: var(--primary-blue);
    background: rgba(37, 80, 173, 0.05);
}

.quantity-btn.disabled-for-guests {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.quantity-btn.disabled-for-guests:hover {
    border-color: var(--border-color);
}

.member-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.625rem;
    background: var(--accent-yellow);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
}

.quantity-btn.active .quantity-value {
    color: var(--primary-blue);
}

/* Subject Cards Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .subjects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.subject-card-mini {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    padding: 0.375rem 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    position: relative;
    min-height: 3.5rem;
}

.subject-card-mini:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.subject-card-mini.active {
    border-color: var(--primary-blue);
    background: rgba(37, 80, 173, 0.05);
    box-shadow: var(--shadow-sm);
}

.subject-card-mini.active::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.375rem;
    height: 0.375rem;
    background: var(--primary-blue);
    border-radius: 50%;
}

.subject-card-mini.disabled {
    opacity: 0.6;
    background: var(--bg-secondary);
    cursor: not-allowed;
    filter: grayscale(1);
}

.subject-icon-mini {
    width: 1.25rem;
    height: 1.25rem;
    background: rgba(37, 80, 173, 0.1);
    color: var(--primary-blue);
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.subject-card-mini.active .subject-icon-mini {
    background: rgba(37, 80, 173, 0.2);
}

.subject-name-mini {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.subject-card-mini.active .subject-name-mini {
    color: var(--primary-blue);
}

.subject-count-mini {
    font-size: 0.5rem;
    color: var(--text-light);
}

.subject-card-mini.active .subject-count-mini {
    color: rgba(37, 80, 173, 0.7);
}

/* Topic Scroll */
.topics-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.topics-scroll::-webkit-scrollbar {
    display: none;
}

.topic-btn {
    flex-shrink: 0;
    min-width: 7.5rem;
    max-width: 8.75rem;
    min-height: 2.75rem;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: var(--radius-small);
    padding: 0.375rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.125rem;
}

.topic-btn:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-blue);
}

.topic-btn.all-topics {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
    border-color: #22C55E;
    box-shadow: var(--shadow-sm);
    flex-direction: row;
    gap: 0.375rem;
}

.topic-btn.all-topics:hover {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
}

.topic-text {
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topic-count {
    font-size: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Start Button */
.start-learning-btn {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-small);
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.start-learning-btn:hover {
    background: #1E3F8C;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Sidebar Components */
.sidebar-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .sidebar-quick-links {
        grid-template-columns: 1fr;
    }
}

.quick-link-card {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.quick-link-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.quick-link-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.quick-link-icon {
    padding: 0.375rem;
    background: rgba(37, 80, 173, 0.1);
    color: var(--primary-blue);
    border-radius: var(--radius-small);
    transition: all 0.2s ease;
}

.quick-link-card:hover .quick-link-icon {
    background: var(--primary-blue);
    color: white;
}

.quick-link-card.purple .quick-link-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.quick-link-card.purple:hover .quick-link-icon {
    background: #8B5CF6;
    color: white;
}

.quick-link-info h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.quick-link-info p {
    font-size: 0.5625rem;
    color: var(--text-light);
    margin: 0;
}

.quick-link-arrow {
    color: var(--border-color);
    font-size: 0.875rem;
}

/* Analytics+ Premium Card */
.analytics-premium {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #E2E8F0 100%);
    padding: 0.75rem;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.analytics-premium::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2rem;
    height: 2rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 0 0 0 100%;
}

.analytics-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    z-index: 1;
}

.analytics-icon {
    padding: 0.375rem;
    background: white;
    color: var(--text-light);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-sm);
}

.analytics-info h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pro-badge {
    background: var(--accent-yellow);
    color: white;
    font-size: 0.5rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.analytics-info p {
    font-size: 0.5625rem;
    color: var(--text-light);
    margin: 0;
}

/* Gamification Widget */
.gamification-widget {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.coins-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: var(--radius-small);
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border: 1px solid #FED7AA;
    margin-bottom: 0.75rem;
}

.coins-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coins-icon-wrapper {
    background: rgba(251, 191, 36, 0.2);
    padding: 0.25rem;
    border-radius: 50%;
    color: #D97706;
}

.coins-info {
    display: flex;
    flex-direction: column;
}

.coins-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: rgba(217, 119, 6, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.coins-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
}

.shop-link {
    font-size: 0.625rem;
    font-weight: 700;
    color: #D97706;
    text-decoration: none;
}

.shop-link:hover {
    text-decoration: underline;
}

.progress-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.progress-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
}

.progress-value {
    font-size: 0.5625rem;
    color: var(--text-light);
}

.progress-bar-wrapper {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 9999px;
    height: 0.25rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-bar-fill.indigo {
    background: #6366F1;
}

.progress-bar-fill.red {
    background: #EF4444;
}

/* Recent Activity Widget */
.recent-activity-widget {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.activity-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(248, 250, 252, 0.5);
}

.activity-header h2 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.view-all-link {
    font-size: 0.625rem;
    color: var(--primary-blue);
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    padding: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(248, 250, 252, 0.5);
}

.activity-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.activity-icon-wrapper {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-small);
    background: rgba(37, 80, 173, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.activity-details {
    min-width: 0;
    flex: 1;
}

.activity-name {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 6rem;
}

.activity-time {
    font-size: 0.5rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-score {
    text-align: right;
}

.activity-score-value {
    font-size: 0.75rem;
    font-weight: 700;
}

.activity-score-value.success {
    color: #22C55E;
}

.activity-score-value.danger {
    color: #EF4444;
}

/* ============================================
   RESPONSIVE FIXES - MOBILE
   ============================================ */

/* Fix topics overflow on mobile */
@media (max-width: 768px) {
    /* Make topics wrap instead of horizontal scroll */
    .topics-scroll {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    /* Adjust topic button sizing for mobile */
    .topic-btn {
        flex-shrink: 1;
        min-width: auto;
        width: calc(50% - 0.25rem); /* 2 columns on mobile */
        max-width: none;
    }

    /* Full width for "All Topics" button on mobile */
    .topic-btn.all-topics {
        width: 100%;
    }

    /* Adjust topic text sizing */
    .topic-text {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .topic-count {
        font-size: 0.625rem;
    }
}

/* ============================================
   END OF STYLESHEET
   ============================================ */
