/* ================================================
   EduEarn Pro - Premium Design System
   Mobile-First | Dark Theme | Glassmorphism
   ================================================ */

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

/* ============ CSS VARIABLES ============ */
:root {
    /* Colors */
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1535;
    --bg-card: rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.08);
    --bg-glass: rgba(255,255,255,0.07);
    --bg-glass-strong: rgba(255,255,255,0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.45);
    --accent-purple: #6c5ce7;
    --accent-blue: #0984e3;
    --accent-green: #00b894;
    --accent-gold: #f9ca24;
    --accent-orange: #e17055;
    --accent-pink: #fd79a8;
    --accent-red: #d63031;
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #0984e3);
    --gradient-secondary: linear-gradient(135deg, #00b894, #0984e3);
    --gradient-gold: linear-gradient(135deg, #f9ca24, #e17055);
    --gradient-pink: linear-gradient(135deg, #fd79a8, #6c5ce7);
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1a1a4e 50%, #0a0e27 100%);
    --border-color: rgba(255,255,255,0.08);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow-purple: 0 0 30px rgba(108,92,231,0.3);
    --shadow-glow-blue: 0 0 30px rgba(9,132,227,0.3);
    --shadow-glow-green: 0 0 30px rgba(0,184,148,0.3);
    --shadow-glow-gold: 0 0 30px rgba(249,202,36,0.3);
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 2rem;
    --fs-4xl: 2.5rem;
    --fs-5xl: 3.5rem;
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-purple); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: var(--font-family); outline: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px rgba(108,92,231,0.3); } 50% { box-shadow: 0 0 40px rgba(108,92,231,0.6); } }
@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.5; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 1; }
    50% { transform: translateY(-40px) translateX(-10px); opacity: 0.5; }
    75% { transform: translateY(-20px) translateX(10px); opacity: 1; }
}

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-md); font-weight: 600;
    font-size: var(--fs-sm); cursor: pointer; border: none;
    transition: var(--transition); text-transform: uppercase; letter-spacing: 0.5px;
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(255,255,255,0.2); transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}
.btn:active::after { width: 300px; height: 300px; opacity: 0; }
.btn-primary {
    background: var(--gradient-primary); color: #fff;
    box-shadow: 0 4px 15px rgba(108,92,231,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108,92,231,0.5); color: #fff; }
.btn-secondary {
    background: transparent; color: var(--text-primary);
    border: 2px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { border-color: var(--accent-purple); background: rgba(108,92,231,0.1); color: #fff; }
.btn-gold { background: var(--gradient-gold); color: #1a1a2e; box-shadow: 0 4px 15px rgba(249,202,36,0.3); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(249,202,36,0.5); color: #1a1a2e; }
.btn-green { background: var(--gradient-secondary); color: #fff; box-shadow: 0 4px 15px rgba(0,184,148,0.3); }
.btn-green:hover { transform: translateY(-2px); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: var(--fs-xs); }
.btn-lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #c0392b; color: #fff; }

/* ============ CARDS ============ */
.glass-card {
    background: var(--bg-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    padding: var(--space-xl); transition: var(--transition);
}
.glass-card:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.15); transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ============ FORM ELEMENTS ============ */
.form-group { margin-bottom: var(--space-lg); }
.form-label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: var(--space-sm); color: var(--text-secondary); }
.form-control {
    width: 100%; padding: 14px 18px; background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: var(--text-primary); font-size: var(--fs-base); transition: var(--transition);
}
.form-control:focus { border-color: var(--accent-purple); box-shadow: 0 0 20px rgba(108,92,231,0.15); background: rgba(255,255,255,0.08); }
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--accent-red); }
.form-control.success { border-color: var(--accent-green); }
.form-error { color: var(--accent-red); font-size: var(--fs-xs); margin-top: 4px; }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }

/* ============ BADGES ============ */
.badge {
    display: inline-flex; align-items: center; padding: 4px 12px;
    border-radius: 20px; font-size: var(--fs-xs); font-weight: 600;
}
.badge-primary { background: rgba(108,92,231,0.2); color: var(--accent-purple); }
.badge-success { background: rgba(0,184,148,0.2); color: var(--accent-green); }
.badge-warning { background: rgba(249,202,36,0.2); color: var(--accent-gold); }
.badge-danger { background: rgba(214,48,49,0.2); color: var(--accent-red); }
.badge-info { background: rgba(9,132,227,0.2); color: var(--accent-blue); }

/* ============ ALERTS ============ */
.alert {
    padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md);
    margin-bottom: var(--space-lg); font-size: var(--fs-sm); display: flex;
    align-items: center; gap: 10px; animation: fadeInUp 0.3s ease;
}
.alert-success { background: rgba(0,184,148,0.15); border: 1px solid rgba(0,184,148,0.3); color: var(--accent-green); }
.alert-error { background: rgba(214,48,49,0.15); border: 1px solid rgba(214,48,49,0.3); color: var(--accent-red); }
.alert-warning { background: rgba(249,202,36,0.15); border: 1px solid rgba(249,202,36,0.3); color: var(--accent-gold); }
.alert-info { background: rgba(9,132,227,0.15); border: 1px solid rgba(9,132,227,0.3); color: var(--accent-blue); }
.alert .close-btn { margin-left: auto; cursor: pointer; opacity: 0.7; background: none; border: none; color: inherit; font-size: 18px; }
.alert .close-btn:hover { opacity: 1; }

/* ============ NAVIGATION ============ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 15px 0; transition: var(--transition);
    background: transparent;
}
.navbar.scrolled { background: rgba(10,14,39,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); padding: 10px 0; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { 
    font-size: var(--fs-xl); 
    font-weight: 800; 
    background: var(--gradient-primary); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo {
    max-height: 35px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.nav-menu { display: flex; align-items: center; gap: var(--space-xl); }
.nav-menu a { color: var(--text-secondary); font-weight: 500; font-size: var(--fs-sm); position: relative; }
.nav-menu a:hover, .nav-menu a.active { color: var(--text-primary); }
.nav-menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--gradient-primary); transition: var(--transition); border-radius: 2px; }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: var(--space-md); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 5px; }
.nav-toggle span { width: 25px; height: 2px; background: var(--text-primary); transition: var(--transition); border-radius: 2px; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Actions in Drawer (Desktop hidden) */
.nav-mobile-actions { display: none; }

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1005;
    }
    .nav-actions {
        position: relative;
        z-index: 1005;
    }
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: rgba(15,21,53,0.98); backdrop-filter: blur(20px);
        flex-direction: column; padding: 100px 30px 30px; gap: var(--space-md);
        transition: var(--transition); border-left: 1px solid var(--border-color);
        z-index: 1000;
    }
    .nav-menu.active { right: 0; }
    .nav-menu a { font-size: var(--fs-base); width: 100%; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-menu a::after { display: none; }
    .nav-actions .btn { display: none; } /* Hide header buttons on mobile */
    
    .nav-mobile-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: var(--space-lg);
        gap: var(--space-sm);
    }
    .nav-mobile-actions .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: var(--fs-sm);
    }
}

/* ============ HERO SECTION ============ */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 120px var(--space-md) 60px;
    position: relative; overflow: hidden;
    background: var(--gradient-bg); background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}
.hero::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(9,132,227,0.08) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 1;
}
.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-bg-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,14,39,0.45), rgba(10,14,39,0.82));
    z-index: 3;
}
.hero-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.05);
    opacity: 0;
    transition: opacity 0.9s ease;
    z-index: 2;
    transform: scale(1.02);
}
.hero-bg-layer.active { opacity: 1; }

.hero-content { position: relative; z-index: 4; max-width: 700px; }
.hero-title {
    font-size: var(--fs-4xl); font-weight: 800; margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #fff 0%, #a29bfe 50%, #74b9ff 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.1;
}
.hero-subtitle { font-size: var(--fs-lg); color: var(--text-secondary); margin-bottom: var(--space-2xl); line-height: 1.7; }
.hero-buttons { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }
.hero-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 3; }
.hero-particles span {
    position: absolute; width: 4px; height: 4px; background: rgba(108,92,231,0.5);
    border-radius: 50%; animation: particleFloat 6s infinite;
}
.hero-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 8s; }
.hero-particles span:nth-child(2) { left: 30%; top: 60%; animation-delay: 1s; animation-duration: 6s; }
.hero-particles span:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; animation-duration: 10s; }
.hero-particles span:nth-child(4) { left: 70%; top: 70%; animation-delay: 0.5s; animation-duration: 7s; }
.hero-particles span:nth-child(5) { left: 85%; top: 15%; animation-delay: 3s; animation-duration: 9s; }
.hero-particles span:nth-child(6) { left: 20%; top: 80%; animation-delay: 1.5s; animation-duration: 5s; }

/* Page Hero (shorter) */
.page-hero {
    padding: 120px var(--space-md) 60px; text-align: center;
    background: var(--gradient-bg); background-size: 400% 400%;
    animation: gradientShift 15s ease infinite; position: relative;
}
.page-hero h1 { font-size: var(--fs-3xl); margin-bottom: var(--space-md); }
.page-hero p { color: var(--text-secondary); font-size: var(--fs-lg); }

@media (min-width: 768px) {
    .hero-title { font-size: var(--fs-5xl); }
}

/* ============ SECTIONS ============ */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: var(--space-3xl); }
.section-title {
    font-size: var(--fs-3xl); font-weight: 700; margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #fff, #a29bfe);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-subtitle { color: var(--text-secondary); font-size: var(--fs-lg); max-width: 600px; margin: 0 auto; }

/* ============ STATS COUNTER ============ */
.stats-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding: var(--space-xl) 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.stat-item {
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}
.stat-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(108, 92, 231, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.stat-number {
    font-size: clamp(1.35rem, 5.5vw, 2.25rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    white-space: nowrap;
}
.stat-label {
    color: var(--text-secondary);
    font-size: clamp(0.7rem, 3vw, 0.875rem);
    margin-top: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 576px) {
    .stats-grid {
        gap: var(--space-lg);
    }
    .stat-item {
        padding: var(--space-xl) var(--space-md);
    }
}

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

/* ============ COURSE CARDS ============ */
.course-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 576px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .course-grid { grid-template-columns: repeat(3, 1fr); } }

.course-card {
    background: var(--bg-glass); backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    overflow: hidden; transition: var(--transition);
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow-purple); border-color: rgba(108,92,231,0.3); }
.course-card-thumb {
    height: 180px; display: flex; align-items: center; justify-content: center;
    font-size: 48px; position: relative;
}
.course-card-thumb.cat-1 { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.course-card-thumb.cat-2 { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.course-card-thumb.cat-3 { background: linear-gradient(135deg, #00b894, #55efc4); }
.course-card-thumb.cat-4 { background: linear-gradient(135deg, #e17055, #fab1a0); }
.course-card-thumb.cat-5 { background: linear-gradient(135deg, #fd79a8, #e84393); }
.course-card-body { padding: var(--space-lg); }
.course-card-category { display: inline-block; padding: 4px 12px; background: rgba(108,92,231,0.2); color: var(--accent-purple); border-radius: 20px; font-size: var(--fs-xs); font-weight: 600; margin-bottom: var(--space-sm); }
.course-card h3 { font-size: var(--fs-lg); margin-bottom: var(--space-sm); }
.course-card-meta { display: flex; gap: var(--space-md); color: var(--text-muted); font-size: var(--fs-xs); margin-bottom: var(--space-md); flex-wrap: wrap; }
.course-card-meta span { display: flex; align-items: center; gap: 4px; }
.course-card .btn { width: 100%; }

/* ============ CATEGORY CARDS ============ */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .category-grid { grid-template-columns: repeat(5, 1fr); } }
.category-card {
    text-align: center; padding: var(--space-xl) var(--space-md);
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); transition: var(--transition); cursor: pointer;
}
.category-card:hover { transform: translateY(-5px); border-color: var(--accent-purple); box-shadow: var(--shadow-glow-purple); }
.category-card .icon { font-size: 40px; margin-bottom: var(--space-md); display: block; }
.category-card h4 { font-size: var(--fs-sm); color: var(--text-secondary); }

/* ============ HOW IT WORKS ============ */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }
.step-card { text-align: center; position: relative; }
.step-number {
    width: 60px; height: 60px; border-radius: 50%; background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center; font-size: var(--fs-xl);
    font-weight: 700; margin: 0 auto var(--space-md); box-shadow: var(--shadow-glow-purple);
}
.step-card h4 { font-size: var(--fs-lg); margin-bottom: var(--space-sm); }
.step-card p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ============ TESTIMONIALS ============ */
.testimonial-carousel { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-card {
    min-width: 100%; padding: var(--space-xl);
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
@media (min-width: 768px) { .testimonial-card { min-width: 33.333%; padding: var(--space-md); margin: 0 10px; } }
.testimonial-card .quote { color: var(--text-secondary); font-style: italic; margin-bottom: var(--space-lg); font-size: var(--fs-sm); line-height: 1.8; }
.testimonial-card .author { display: flex; align-items: center; gap: var(--space-md); }
.testimonial-card .avatar {
    width: 45px; height: 45px; border-radius: 50%; background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-sm);
}
.testimonial-card .author-info h5 { font-size: var(--fs-sm); }
.testimonial-card .author-info span { font-size: var(--fs-xs); color: var(--text-muted); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-xl); }
.carousel-dots .dot {
    width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.2);
    border: none; cursor: pointer; transition: var(--transition);
}
.carousel-dots .dot.active { background: var(--accent-purple); width: 30px; border-radius: 5px; }

/* ============ INCOME/COMMISSION SECTION ============ */
.income-highlight {
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); padding: var(--space-2xl); text-align: center;
    position: relative; overflow: hidden;
}
.income-highlight::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(108,92,231,0.05) 0%, transparent 70%);
}
.commission-box {
    display: inline-flex; flex-direction: column; align-items: center; padding: var(--space-xl);
    background: var(--bg-glass-strong); border-radius: var(--radius-lg); margin: var(--space-md);
    border: 1px solid var(--border-color);
}
.commission-amount { font-size: var(--fs-3xl); font-weight: 800; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.commission-label { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ============ EARNING PLAN ============ */
.tree-diagram { text-align: center; padding: var(--space-xl) 0; }
.tree-node {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; background: var(--gradient-primary); border-radius: var(--radius-md);
    font-weight: 600; margin: var(--space-sm); position: relative;
}
.tree-node.you { background: var(--gradient-gold); color: #1a1a2e; }
.tree-node.level1 { background: var(--gradient-secondary); }
.tree-node.level2 { background: var(--gradient-pink); }
.tree-connector { width: 2px; height: 30px; background: var(--border-color); margin: 0 auto; }
.tree-level { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; }

.rank-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
@media (min-width: 768px) { .rank-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .rank-cards { grid-template-columns: repeat(6, 1fr); } }
.rank-card {
    text-align: center; padding: var(--space-xl) var(--space-md);
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); transition: var(--transition);
}
.rank-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.rank-card .rank-icon { font-size: 40px; margin-bottom: var(--space-sm); display: block; }
.rank-card h4 { font-size: var(--fs-sm); margin-bottom: 4px; }
.rank-card .target { font-size: var(--fs-xs); color: var(--text-muted); }
.rank-card .reward { font-size: var(--fs-xs); color: var(--accent-gold); margin-top: var(--space-sm); }

/* ============ FAQ ACCORDION ============ */
.accordion { max-width: 700px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-header {
    width: 100%; padding: var(--space-lg); display: flex; justify-content: space-between;
    align-items: center; cursor: pointer; background: none; border: none;
    color: var(--text-primary); font-size: var(--fs-base); font-weight: 500;
    text-align: left; font-family: var(--font-family); transition: var(--transition);
}
.accordion-header:hover { color: var(--accent-purple); }
.accordion-header .icon { transition: var(--transition); font-size: 20px; }
.accordion-item.active .accordion-header .icon { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-body-inner { padding: 0 var(--space-lg) var(--space-lg); color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.8; }

/* ============ CTA SECTION ============ */
.cta-section {
    text-align: center; padding: 80px var(--space-md);
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(9,132,227,0.15));
    border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
}
.cta-section h2 { font-size: var(--fs-3xl); margin-bottom: var(--space-md); }
.cta-section p { color: var(--text-secondary); margin-bottom: var(--space-xl); }

/* ============ RECENT STUDENTS (HOME) ============ */
.recent-students-section { padding-top: 60px; padding-bottom: 60px; }
.recent-students-marquee {
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    padding: 8px 2px;
    scroll-behavior: auto;
}
.recent-students-marquee { scrollbar-width: none; }
.recent-students-marquee::-webkit-scrollbar { display: none; }
.recent-students-track {
    display: flex;
    gap: 18px;
    width: max-content;
    padding: 4px 2px;
}
.recent-student-card {
    text-align: center;
    padding: 18px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex: 0 0 160px;
}
.recent-student-card:hover { border-color: rgba(253,121,168,0.6); transform: translateY(-3px); }
.recent-student-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    border-radius: var(--radius-full);
    padding: 3px;
    background: linear-gradient(135deg, #fd79a8, #6c5ce7);
}
.recent-student-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: rgba(10,14,39,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.recent-student-avatar-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-student-initials { font-weight: 800; letter-spacing: 1px; font-size: 22px; color: #fff; }
.recent-student-name {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 420px) {
    .recent-student-card { flex-basis: 145px; padding: 16px 12px; }
    .recent-student-avatar { width: 82px; height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
    .recent-students-marquee { overflow-x: auto; }
}

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info-cards { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 520px) { .contact-info-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
    text-align: center; padding: var(--space-xl);
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); transition: var(--transition);
}
.contact-card:hover { border-color: var(--accent-purple); }
.contact-card .icon { font-size: 28px; margin-bottom: var(--space-sm); display: block; }
.contact-card h4 { font-size: var(--fs-sm); margin-bottom: 4px; }
.contact-card p, .contact-card a {
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ============ AUTH PAGES ============ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: var(--space-xl) var(--space-md);
    background: var(--gradient-bg); background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow-y: auto;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-glass); backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: var(--radius-xl);
    padding: var(--space-2xl); animation: scaleIn 0.3s ease;
}
.auth-card .logo { text-align: center; margin-bottom: var(--space-xl); }
.auth-logo-img{
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 10px;
    border-radius: 12px;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}
.auth-card .logo h2 { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: var(--fs-2xl); }
.auth-card h3 { text-align: center; margin-bottom: var(--space-xl); font-size: var(--fs-xl); }
.auth-links { text-align: center; margin-top: var(--space-lg); font-size: var(--fs-sm); color: var(--text-secondary); }
.auth-links a { color: var(--accent-purple); font-weight: 600; }
.password-toggle { position: relative; }
.password-toggle .toggle-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }

/* Auth page responsive fixes */
@media (max-width: 520px) {
    /* Better spacing on small screens and ensure vertical scrolling works well */
    .auth-page {
        align-items: flex-start;
        padding-top: 60px;
        padding-bottom: 40px;
    }
    .auth-card {
        max-width: 100%;
        padding: var(--space-xl);
        border-radius: var(--radius-lg);
    }
    .auth-card h3 { margin-bottom: var(--space-lg); }
    .auth-links { font-size: var(--fs-xs); }
}

/* ============ PAYMENT PAGE ============ */
.payment-card { max-width: 520px; margin: 0 auto; }
.payment-info { text-align: center; padding: var(--space-xl); background: rgba(108,92,231,0.1); border-radius: var(--radius-lg); margin-bottom: var(--space-xl); }
.payment-amount { font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 800; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.payment-details { text-align: left; }
.payment-detail-row { display: flex; justify-content: space-between; padding: var(--space-md) 0; border-bottom: 1px solid var(--border-color); font-size: var(--fs-sm); }
.payment-detail-row .label { color: var(--text-muted); }
.payment-detail-row .value { font-weight: 600; color: var(--accent-gold); }

/* UPI QR Section */
.payment-qr{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.03);
}
.payment-qr-box{
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    flex: 0 0 auto;
}
.payment-qr-box .qr-code img,
.payment-qr-box .qr-code canvas{
    display: block;
    width: 170px !important;
    height: 170px !important;
}
.payment-qr-meta{ flex: 1 1 auto; }
.payment-qr-title{ font-weight: 800; font-size: var(--fs-lg); margin-bottom: 6px; }
.payment-qr-sub{ color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: 12px; }

@media (max-width: 520px){
    .payment-info{
        padding: var(--space-lg);
        margin-bottom: var(--space-lg);
    }
    .payment-qr{
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }
    .payment-qr-box .qr-code img,
    .payment-qr-box .qr-code canvas{
        width: 150px !important;
        height: 150px !important;
    }
    .payment-detail-row{
        gap: 12px;
    }
    .payment-detail-row .value{
        text-align: right;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}
.file-upload { position: relative; }
.file-upload input[type="file"] { display: none; }
.file-upload-label {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 40px; border: 2px dashed var(--border-color); border-radius: var(--radius-lg);
    cursor: pointer; transition: var(--transition); text-align: center;
    color: var(--text-secondary); font-size: var(--fs-sm);
}
.file-upload-label:hover { border-color: var(--accent-purple); background: rgba(108,92,231,0.05); }

/* ============ FOOTER ============ */
.footer {
    background: var(--bg-secondary); border-top: 2px solid;
    border-image: var(--gradient-primary) 1; padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col h4 { font-size: var(--fs-base); margin-bottom: var(--space-lg); color: var(--text-primary); }
.footer-col p, .footer-col a { color: var(--text-muted); font-size: var(--fs-sm); }
.footer-col ul li { margin-bottom: var(--space-sm); }
.footer-col ul a:hover { color: var(--accent-purple); padding-left: 5px; }
.footer-social { display: flex; gap: var(--space-md); margin-top: var(--space-md); }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    transition: var(--transition); color: var(--text-secondary);
}
.footer-social a:hover { background: var(--gradient-primary); color: #fff; transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: var(--space-2xl); margin-top: var(--space-2xl); border-top: 1px solid var(--border-color); }
.footer-bottom p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ============ WHATSAPP BUTTON ============ */
.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px; z-index: 999;
    width: 55px; height: 55px; border-radius: 50%; background: #25D366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4); transition: var(--transition);
    font-size: 28px; color: #fff; animation: pulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 25px rgba(37,211,102,0.6); color: #fff; }

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; }
.toast {
    padding: 14px 24px; border-radius: var(--radius-md); margin-bottom: 10px;
    font-size: var(--fs-sm); font-weight: 500; display: flex; align-items: center; gap: 10px;
    animation: fadeInRight 0.3s ease; min-width: 280px; max-width: 400px;
    backdrop-filter: blur(20px); border: 1px solid;
}
.toast-success { background: rgba(0,184,148,0.15); border-color: rgba(0,184,148,0.3); color: var(--accent-green); }
.toast-error { background: rgba(214,48,49,0.15); border-color: rgba(214,48,49,0.3); color: var(--accent-red); }
.toast-info { background: rgba(9,132,227,0.15); border-color: rgba(9,132,227,0.3); color: var(--accent-blue); }

/* ============ MODALS ============ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    z-index: 9999; display: none; align-items: center; justify-content: center; padding: var(--space-md);
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); padding: var(--space-2xl);
    max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
    animation: scaleIn 0.3s ease;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-xl); }
.modal-header h3 { font-size: var(--fs-xl); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 24px; }
.modal-close:hover { color: var(--text-primary); }

/* ============ TABLES ============ */
.table-responsive { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: rgba(255,255,255,0.05); padding: 14px 16px; text-align: left; font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-top: 1px solid var(--border-color); font-size: var(--fs-sm); white-space: nowrap; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ============ FEATURE CARDS ============ */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 576px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
    padding: var(--space-2xl); background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); text-align: center; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent-purple); box-shadow: var(--shadow-glow-purple); }
.feature-card .icon { font-size: 48px; margin-bottom: var(--space-lg); display: block; }
.feature-card h4 { font-size: var(--fs-lg); margin-bottom: var(--space-sm); }
.feature-card p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ============ TABS ============ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-color); margin-bottom: var(--space-xl); overflow-x: auto; }
.tab-btn {
    padding: var(--space-md) var(--space-lg); background: none; border: none;
    color: var(--text-muted); font-weight: 500; cursor: pointer;
    font-family: var(--font-family); font-size: var(--fs-sm);
    transition: var(--transition); position: relative; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent-purple); border-bottom-color: var(--accent-purple); }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

/* ============ FILTER BUTTONS ============ */
.filter-bar { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-xl); }
.filter-btn {
    padding: 8px 20px; border-radius: 30px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color); color: var(--text-secondary);
    font-size: var(--fs-xs); cursor: pointer; transition: var(--transition);
    font-family: var(--font-family); font-weight: 500;
}
.filter-btn:hover, .filter-btn.active { background: var(--gradient-primary); color: #fff; border-color: transparent; }

/* ============ INCOME CALCULATOR ============ */
.calculator-card {
    max-width: 500px; margin: 0 auto; padding: var(--space-2xl);
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); text-align: center;
}
.calc-result { margin-top: var(--space-xl); padding: var(--space-xl); background: rgba(108,92,231,0.1); border-radius: var(--radius-lg); }
.calc-result .amount { font-size: var(--fs-3xl); font-weight: 800; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ============ PENDING STATUS ============ */
.pending-message {
    text-align: center; padding: var(--space-3xl);
    background: var(--bg-glass); border: 1px solid rgba(249,202,36,0.2);
    border-radius: var(--radius-xl);
}
.pending-message .icon { font-size: 64px; margin-bottom: var(--space-lg); display: block; }
.pending-message h3 { margin-bottom: var(--space-md); }
.pending-message p { color: var(--text-secondary); max-width: 400px; margin: 0 auto; }

/* ============ MISC ============ */
.text-center { text-align: center; }
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gold { color: var(--accent-gold); }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-xl); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108,92,231,0.5); }
