/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Enhanced Light Theme - Premium Blue, Charcoal, White */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --primary-glow: rgba(59, 130, 246, 0.3);
    
    --secondary-color: #1e293b;
    --secondary-hover: #334155;
    --secondary-light: #475569;
    --secondary-dark: #0f172a;
    
    --accent-color: #06b6d4;
    --accent-hover: #0891b2;
    --accent-light: #22d3ee;
    --accent-glow: rgba(6, 182, 212, 0.3);
    
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning-color: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --danger-color: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --info-color: #3b82f6;
    
    /* Enhanced Light Theme Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-accent: #eff6ff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-gradient-1: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --bg-gradient-2: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* Enhanced Light Theme Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-inverse: #ffffff;
    --text-muted: #94a3b8;
    --text-accent: #3b82f6;
    
    /* Enhanced Light Theme Borders */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-accent: #3b82f6;
    --border-glass: rgba(255, 255, 255, 0.2);
    
    /* Enhanced Professional Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --shadow-glow-accent: 0 0 20px var(--accent-glow);
    
    /* Premium Gradients - Light Theme */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #2563eb 25%, #1d4ed8 50%, #1e293b 100%);
    --gradient-card: linear-gradient(145deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    
    /* Interactive Elements */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* 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;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;
    
    /* Animation Values */
    --hover-scale: 1.02;
    --hover-scale-sm: 1.01;
    --hover-scale-lg: 1.05;
    --hover-lift: -2px;
    --hover-lift-lg: -5px;
}

[data-theme="dark"] {
    /* Enhanced Dark Theme - Deep Black and Electric Blue */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #151515;
    --bg-hover: #1f1f1f;
    --bg-accent: #0f1419;
    --bg-glass: rgba(21, 21, 21, 0.9);
    --bg-gradient-1: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    --bg-gradient-2: linear-gradient(135deg, #151515 0%, #1a1a1a 100%);
    
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #60a5fa;
    
    --border-color: #2a2a2a;
    --border-hover: #3a3a3a;
    --border-accent: #60a5fa;
    --border-glass: rgba(255, 255, 255, 0.1);
    
    /* Enhanced Dark theme gradients */
    --gradient-hero: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #60a5fa 60%, #3b82f6 100%);
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    --gradient-card: linear-gradient(145deg, rgba(96, 165, 250, 0.12) 0%, rgba(96, 165, 250, 0.06) 100%);
    --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --gradient-success: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --gradient-glass: linear-gradient(145deg, rgba(21, 21, 21, 0.95) 0%, rgba(21, 21, 21, 0.8) 100%);
    
    /* Enhanced glows for dark theme */
    --primary-glow: rgba(96, 165, 250, 0.4);
    --accent-glow: rgba(34, 211, 238, 0.4);
    --success-glow: rgba(52, 211, 153, 0.4);
    --warning-glow: rgba(251, 191, 36, 0.4);
    --danger-glow: rgba(248, 113, 113, 0.4);
    
    /* Enhanced shadows for dark theme */
    --shadow-glow: 0 0 30px var(--primary-glow);
    --shadow-glow-accent: 0 0 30px var(--accent-glow);
    
    /* Neon primary for dark theme */
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #93c5fd;
    --primary-dark: #2563eb;
    
    --accent-color: #22d3ee;
    --accent-hover: #06b6d4;
    
    /* Enhanced colors for dark theme */
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --accent-hover: #0891b2;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all var(--transition-normal);
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--primary-light);
    color: var(--text-inverse);
}

/* Focus styling */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .header {
    background: rgba(17, 17, 17, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.logo:hover {
    color: var(--primary-hover);
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: var(--space-sm);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s ease;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateY(var(--hover-lift-sm)) scale(var(--hover-scale-sm));
    box-shadow: var(--shadow-md);
}

.nav-link.active {
    background: var(--gradient-card);
    color: var(--primary-color);
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-secondary);
}

.audio-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-secondary);
    margin-right: var(--space-sm);
}

.theme-toggle:hover,
.audio-toggle:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.audio-toggle[data-enabled="false"] {
    opacity: 0.6;
    color: var(--danger-color);
}

.audio-toggle[data-enabled="false"]:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.user-stats {
    display: flex;
    gap: var(--space-md);
}

.stat {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.stat i {
    color: var(--primary-color);
}

/* Main Content */
.main {
    margin-top: 70px;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: var(--gradient-hero);
    color: white;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--space-xl);
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    margin-bottom: var(--space-2xl);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    min-width: 160px;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.8s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(var(--hover-lift-lg)) scale(var(--hover-scale));
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: var(--space-xs);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-xl);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-xl);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(var(--hover-lift)) scale(var(--hover-scale));
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

.cta-btn:active {
    transform: translateY(0) scale(0.98);
}

/* DSA Quotes Scroll Section */
.quotes-container {
    margin: var(--space-2xl) 0;
    height: 80px;
    overflow: hidden;
    position: relative;
}

.quotes-scroll {
    position: relative;
    height: 100%;
}

.quote-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-in-out;
    text-align: center;
}

.quote-item.active {
    opacity: 1;
    transform: translateY(0);
}

.quote-item i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-sm);
}

.quote-item p {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xs);
    font-style: italic;
}

.quote-item span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Testimonials Section */
.testimonials-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.testimonial-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-bounce);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
    transition: left 0.6s ease;
}

.testimonial-card:hover::before {
    left: 100%;
}

.testimonial-card:hover {
    transform: translateY(var(--hover-lift-lg)) scale(var(--hover-scale-sm));
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    border-color: var(--primary-color);
    background: var(--gradient-card);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-bounce);
    position: relative;
}

.testimonial-avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.testimonial-card:hover .testimonial-avatar {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.testimonial-card:hover .testimonial-avatar::before {
    opacity: 0.3;
}

.testimonial-info h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.testimonial-rating i {
    color: #fbbf24;
    font-size: 0.875rem;
}

.testimonial-rating span {
    margin-left: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.testimonial-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

/* Floating Testimonials Bar */
.floating-testimonials {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-color);
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
    transition: all var(--transition-normal);
}

.floating-testimonials:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.floating-testimonials-content {
    padding: var(--space-lg);
    position: relative;
    height: 100px;
    overflow: hidden;
}

.floating-testimonial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-lg);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s ease-in-out;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.floating-testimonial.active {
    opacity: 1;
    transform: translateX(0);
}

.floating-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.floating-info {
    flex: 1;
    min-width: 0;
}

.floating-info h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: var(--space-xs);
}

.floating-rating i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.floating-rating span {
    margin-left: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.floating-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.75rem;
}

.floating-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Chapters Section */
.chapters-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3xl);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.chapter-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-bounce);
    cursor: pointer;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.chapter-card:hover::before {
    left: 100%;
}

.chapter-card:hover {
    transform: translateY(var(--hover-lift-lg)) scale(var(--hover-scale));
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    border-color: var(--primary-color);
    background: var(--gradient-card);
}

.chapter-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-bounce);
    position: relative;
}

.chapter-card:hover .chapter-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

.chapter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.chapter-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.chapter-progress {
    margin-bottom: var(--space-xl);
}

.progress-bar {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    height: 8px;
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.progress-fill {
    background: var(--gradient-primary);
    height: 100%;
    border-radius: var(--radius-md);
    transition: width var(--transition-normal);
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.chapter-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.chapter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Learning Section - Premium UI */
.learning-section {
    background: var(--bg-gradient-1);
    min-height: calc(100vh - 80px);
    position: relative;
}

.learning-container {
    display: flex;
    height: calc(100vh - 80px);
    max-width: none;
    padding: 0;
    gap: 1px;
    background: var(--border-color);
}

/* Premium Sidebar */
.sidebar {
    width: 320px;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.sidebar-header {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-gradient-2);
}

.back-btn {
    background: var(--gradient-card);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-bounce);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s ease;
}

.back-btn:hover::before {
    left: 0;
}

.back-btn:hover {
    transform: translateX(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.sidebar-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.level-progress {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.current-level {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.current-level span:nth-child(2) {
    font-size: 2rem;
    color: var(--primary-color);
}

.level-bar {
    background: var(--bg-tertiary);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.level-fill {
    background: var(--gradient-primary);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.levels-list {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.levels-list h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.level-item {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.level-item.completed {
    background: var(--gradient-secondary);
    color: white;
    border-color: var(--secondary-color);
}

.level-item.current {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.level-item:hover:not(.current) {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

/* Learning Main Area */
.learning-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.problem-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(249, 250, 251, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 0 16px 0 0;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.02);
    position: relative;
}

[data-theme="dark"] .problem-section {
    background: linear-gradient(135deg,
        rgba(13, 17, 23, 0.95) 0%,
        rgba(22, 27, 34, 0.9) 100%);
    border-right: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

.problem-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--accent-color) 50%,
        var(--primary-color) 100%);
    opacity: 0.6;
}

.problem-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(147, 197, 253, 0.15);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(249, 250, 251, 0.6) 100%);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .problem-header {
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    background: linear-gradient(135deg,
        rgba(13, 17, 23, 0.8) 0%,
        rgba(22, 27, 34, 0.6) 100%);
}

.problem-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.1),
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.problem-header h2 {
    color: var(--text-primary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg,
        var(--text-primary) 0%,
        var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.problem-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-badge, .topic-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.difficulty-badge:hover, .topic-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    box-shadow: 
        0 4px 16px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow: 
        0 4px 16px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.difficulty-badge.expert {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.topic-badge {
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.2) 0%,
        rgba(59, 130, 246, 0.1) 100%);
    color: var(--text-secondary);
    border: 1px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .topic-badge {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.problem-tabs {
    display: flex;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(147, 197, 253, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .problem-tabs {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.9) 0%,
        rgba(31, 41, 55, 0.8) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.problem-tabs::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%);
    opacity: 0.6;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1.25rem 2rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.1),
        transparent);
    transition: left 0.6s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(248, 250, 252, 0.6) 100%);
    box-shadow: 
        0 -4px 16px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

[data-theme="dark"] .tab-btn.active {
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.15) 0%,
        rgba(29, 78, 216, 0.1) 100%);
    box-shadow: 
        0 -4px 16px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.1) 0%,
        rgba(59, 130, 246, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.problem-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(248, 250, 252, 0.05) 100%);
    position: relative;
}

[data-theme="dark"] .problem-content {
    background: linear-gradient(145deg,
        rgba(17, 24, 39, 0.1) 0%,
        rgba(31, 41, 55, 0.05) 100%);
}

.problem-content::-webkit-scrollbar {
    width: 8px;
}

.problem-content::-webkit-scrollbar-track {
    background: rgba(147, 197, 253, 0.1);
    border-radius: 10px;
}

.problem-content::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.problem-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg,
        var(--accent-color) 0%,
        var(--primary-color) 100%);
    background-clip: content-box;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.problem-statement, .explanation-content, .problem-example, .hints-content {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
    border: 1px solid rgba(147, 197, 253, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .problem-statement,
[data-theme="dark"] .explanation-content,
[data-theme="dark"] .problem-example,
[data-theme="dark"] .hints-content {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.9) 0%,
        rgba(31, 41, 55, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.problem-statement:hover,
.explanation-content:hover,
.hints-content:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .problem-statement:hover,
[data-theme="dark"] .explanation-content:hover,
[data-theme="dark"] .hints-content:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.problem-example {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(147, 197, 253, 0.05) 100%);
    border-left: 5px solid var(--info-color);
    border-radius: 0 20px 20px 0;
    position: relative;
    overflow: hidden;
}

.problem-example::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg,
        var(--info-color) 0%,
        var(--primary-color) 50%,
        var(--accent-color) 100%);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px var(--info-color);
    }
    to {
        box-shadow: 0 0 20px var(--info-color), 0 0 30px var(--info-color);
    }
}

[data-theme="dark"] .problem-example {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.1) 100%);
}

.problem-actions {
    padding: 2rem 2.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(147, 197, 253, 0.2);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(248, 250, 252, 0.6) 100%);
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .problem-actions {
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.8) 0%,
        rgba(31, 41, 55, 0.6) 100%);
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 16px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.action-btn:active {
    transform: translateY(0) scale(0.98);
}

.action-btn.primary {
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%);
    color: white;
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.action-btn.secondary {
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.2) 0%,
        rgba(59, 130, 246, 0.1) 100%);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .action-btn.secondary {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn.info {
    background: var(--info-color);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Resizer */
.resizer {
    width: 4px;
    background: var(--border-color);
    cursor: col-resize;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.resizer:hover {
    background: var(--primary-color);
    width: 6px;
}

.resizer:active {
    background: var(--primary-hover);
}

/* Add visual indicator for horizontal resizer */
.resizer::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: var(--text-tertiary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resizer:hover::before {
    opacity: 1;
}

/* Vertical Resizer for Editor/Output */
.vertical-resizer {
    height: 4px;
    background: var(--border-color);
    cursor: row-resize;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.vertical-resizer:hover {
    background: var(--primary-color);
    height: 6px;
}

.vertical-resizer:active {
    background: var(--primary-hover);
}

/* Add visual indicator */
.vertical-resizer::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 2px;
    background: var(--text-tertiary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vertical-resizer:hover::before {
    opacity: 1;
}

/* Resizing states */
body.resizing-vertical {
    cursor: row-resize;
    user-select: none;
}

body.resizing-vertical * {
    pointer-events: none;
}

body.resizing-vertical .vertical-resizer {
    pointer-events: all;
}

body.resizing-horizontal {
    cursor: col-resize;
    user-select: none;
}

body.resizing-horizontal * {
    pointer-events: none;
}

body.resizing-horizontal .resizer {
    pointer-events: all;
}

/* Smooth transitions when not resizing */
.editor-main:not(.resizing),
.output-section:not(.resizing) {
    transition: height 0.2s ease;
}

.problem-section:not(.resizing),
.editor-section:not(.resizing) {
    transition: width 0.2s ease;
}

/* Code Editor Section */
.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    min-width: 480px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.editor-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.editor-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.editor-title h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-title h3:before {
    content: "⚡";
    font-size: 1.2rem;
}

.language-selector select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

/* Premium Editor Buttons */
.editor-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-bounce);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.editor-btn:hover::before {
    left: 100%;
}

.editor-btn.run {
    background: var(--gradient-secondary);
    color: white;
    border-color: var(--secondary-light);
}

.editor-btn.run:hover {
    background: var(--secondary-hover);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(30, 41, 59, 0.4);
    transform: translateY(var(--hover-lift)) scale(var(--hover-scale-sm));
}

.editor-btn.submit {
    background: var(--gradient-success);
    color: white;
    border-color: var(--success-color);
}

.editor-btn.submit:hover {
    background: var(--success-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(var(--hover-lift)) scale(var(--hover-scale-sm));
}

.editor-btn.reset {
    background: var(--gradient-primary);
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    border-color: var(--danger-color);
}

.editor-btn.reset:hover {
    background: #dc2626;
    box-shadow: var(--shadow-lg), var(--danger-glow);
    transform: translateY(var(--hover-lift)) scale(var(--hover-scale-sm));
}

.editor-btn.fullscreen {
    background: var(--bg-gradient-1);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.editor-btn.fullscreen:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(var(--hover-lift)) scale(var(--hover-scale-sm));
}

.editor-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Premium Code Editor */
.code-editor {
    flex: 1;
    background: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    color: #f0f6fc;
    border: 2px solid #21262d;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 15px;
    line-height: 1.7;
    resize: none;
    outline: none;
    overflow-y: auto;
    min-height: 300px;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.code-editor:focus {
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-glow);
}

/* Light theme code editor */
[data-theme="light"] .code-editor {
    background: linear-gradient(145deg, #fafbfc 0%, #f6f8fa 100%);
    color: #24292f;
    border-color: #d0d7de;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .code-editor:focus {
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05), 0 0 20px var(--primary-glow);
}

/* Premium Output Section */
.output-section {
    height: 180px;
    min-height: 120px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    background: var(--bg-gradient-1);
    transition: height var(--transition-normal);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.output-tabs {
    display: flex;
    background: var(--bg-gradient-2);
    border-bottom: 2px solid var(--border-color);
    padding: 0 var(--space-lg);
    position: relative;
}

.output-tabs::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.output-tab {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-right: var(--space-sm);
    position: relative;
}

.output-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.output-tab:hover::before {
    opacity: 0.1;
}

.output-tab:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.output-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--gradient-card);
    font-weight: 700;
}

.output-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.output-content {
    flex: 1;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    background: var(--bg-card);
}

.output-tab-content {
    display: none;
}

.output-tab-content.active {
    display: block;
}

.output-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    padding: 1rem;
}

/* About Section */
.about-section {
    padding: 8rem 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 50%,
        rgba(241, 245, 249, 0.85) 100%);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .about-section {
    background: linear-gradient(135deg,
        rgba(3, 7, 18, 0.95) 0%,
        rgba(15, 23, 42, 0.9) 50%,
        rgba(30, 41, 59, 0.85) 100%);
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%,
        rgba(59, 130, 246, 0.1) 0%,
        transparent 50%),
        radial-gradient(circle at 70% 80%,
        rgba(147, 51, 234, 0.08) 0%,
        transparent 50%);
    pointer-events: none;
}

.about-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    line-height: 1.8;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.vision-panel {
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--accent-color) 50%,
        #7c3aed 100%);
    color: #ffffff;
    padding: 4rem;
    border-radius: 28px;
    margin: 4rem 0;
    box-shadow: 
        0 20px 60px rgba(59, 130, 246, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vision-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 3s infinite ease-in-out;
}

.vision-panel:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 32px 80px rgba(59, 130, 246, 0.4),
        0 16px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.vision-panel h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.vision-panel h3 i {
    font-size: 2rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.vision-panel p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.feature-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(147, 197, 253, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .feature-card {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.9) 0%,
        rgba(31, 41, 55, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.1),
        transparent);
    transition: left 0.6s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.12),
        0 8px 32px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: white;
    font-size: 2rem;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotateY(10deg);
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Progress Section */
.progress-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.progress-dashboard {
    display: grid;
    gap: 3rem;
}

.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.overview-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.overview-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.overview-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.overview-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.chapters-progress {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.chapters-progress h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.footer-section p {
    line-height: 1.6;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
    cursor: pointer;
}

.footer-section li:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-xl);
    text-align: center;
}

.footer-bottom p {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.footer-bottom p:last-child {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Test Results Styling */
.test-results {
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.test-cases-list {
    margin: 0.5rem 0;
    max-height: 120px;
    overflow-y: auto;
}

.test-case {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 0.25rem 0;
    overflow: hidden;
    border-left: 3px solid var(--secondary-color);
}

.test-case.failed {
    border-left-color: var(--danger-color);
}

.test-case.passed {
    border-left-color: var(--secondary-color);
}

.test-header {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
}

.test-status {
    color: var(--text-primary);
    font-weight: 600;
}

.test-time {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.test-details {
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    font-size: 0.75rem;
}

.test-input, .test-output {
    margin: 0.25rem 0;
}

.test-input pre {
    background: var(--bg-secondary);
    padding: 0.4rem;
    border-radius: 4px;
    margin: 0.15rem 0;
    font-size: 0.7rem;
    white-space: pre-wrap;
    line-height: 1.3;
}

.expected {
    color: var(--secondary-color);
    font-weight: 600;
    font-family: monospace;
}

.actual {
    color: var(--danger-color);
    font-weight: 600;
    font-family: monospace;
}

.test-summary {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.test-summary p {
    margin: 0.15rem 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.next-level-btn, .hint-btn, .retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.hint-btn {
    background: var(--accent-color);
}

.retry-btn {
    background: var(--info-color);
}

.next-level-btn:hover, .hint-btn:hover, .retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.example-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
}

.hint-level {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-color);
}

.hint-level h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Solution Display */
.solution-display {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.solution-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solution-code {
    padding: 1rem;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .learning-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
        order: 2;
    }
    
    .learning-main {
        flex-direction: column;
        order: 1;
    }
    
    .problem-section, .editor-section {
        width: 100%;
        height: auto;
        min-height: 400px;
    }
    
    .resizer {
        display: none;
    }
    
    .hero-stats {
        gap: var(--space-lg);
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-lg);
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .levels-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .nav {
        display: none;
    }
    
    .user-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .editor-sidebar {
        display: none;
    }
    
    .problem-actions {
        flex-direction: column;
    }
    
    .editor-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .problem-section,
    .editor-header {
        padding: 1rem;
    }
    
    .sidebar-header,
    .level-progress,
    .levels-list {
        padding: 1rem;
    }
}

/* Enhanced Professional Styling */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
    opacity: 0.7;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
    opacity: 1;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Donate Menu Link */
.donate-link {
    color: var(--danger-color) !important;
    font-weight: 600;
}

.donate-link:hover {
    color: var(--primary-color) !important;
}

/* Donate Section */
.donate-section {
    padding: 8rem 0;
    background: linear-gradient(135deg,
        rgba(248, 250, 252, 0.95) 0%,
        rgba(241, 245, 249, 0.9) 50%,
        rgba(230, 237, 243, 0.85) 100%);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .donate-section {
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(51, 65, 85, 0.85) 100%);
}

.donate-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%,
        rgba(139, 92, 246, 0.08) 0%,
        transparent 50%),
        radial-gradient(circle at 80% 70%,
        rgba(59, 130, 246, 0.06) 0%,
        transparent 50%);
    pointer-events: none;
}

.donate-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 5rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.creator-story {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(20px);
    padding: 4rem;
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .creator-story {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.9) 0%,
        rgba(31, 41, 55, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.creator-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.1),
        transparent);
    animation: shimmer 4s infinite ease-in-out;
}

.creator-story:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .creator-story:hover {
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.story-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.story-icon {
    font-size: 2rem;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    padding: 1rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}

.creator-story h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg,
        var(--text-primary) 0%,
        var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.creator-story p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

.creator-story p:last-of-type {
    margin-bottom: 3rem;
}

.impact-message {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(147, 197, 253, 0.05) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border-left: 5px solid var(--primary-color);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .impact-message {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.1) 100%);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.impact-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%);
    animation: glow 2s ease-in-out infinite alternate;
}

.impact-message i {
    color: var(--primary-color);
    margin-top: 4px;
    font-size: 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.impact-message p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.donate-action {
    position: sticky;
    top: 3rem;
}

.donate-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(147, 197, 253, 0.2);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .donate-card {
    background: linear-gradient(135deg,
        rgba(17, 24, 39, 0.95) 0%,
        rgba(31, 41, 55, 0.9) 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.donate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(147, 197, 253, 0.1),
        transparent);
    transition: left 0.8s ease;
}

.donate-card:hover::before {
    left: 100%;
}

.donate-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.12),
        0 16px 40px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .donate-card:hover {
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.4),
        0 16px 40px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.donate-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.donate-header i {
    font-size: 2.5rem;
    color: #8B4513;
    background: rgba(139, 69, 19, 0.1);
    padding: 1.25rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.donate-card:hover .donate-header i {
    transform: scale(1.1) rotateZ(5deg);
    box-shadow: 0 12px 40px rgba(139, 69, 19, 0.3);
}

.donate-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg,
        var(--text-primary) 0%,
        #8B4513 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.donate-card p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg,
        #8B4513 0%,
        #D2691E 50%,
        #CD853F 100%);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(139, 69, 19, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.donate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    transition: left 0.6s ease;
}

.donate-btn:hover::before {
    left: 100%;
}

.donate-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 16px 50px rgba(139, 69, 19, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.donate-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.donate-note {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-color);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-normal);
}

.popup-overlay.show .popup-content {
    transform: scale(1) translateY(0);
}

.popup-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.popup-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.donation-popup .popup-icon {
    background: var(--gradient-primary);
}

.mastery-popup .popup-icon {
    background: var(--gradient-secondary);
}

.popup-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.popup-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.popup-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.popup-body {
    padding: var(--space-xl);
}

.popup-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.popup-body p:last-child {
    margin-bottom: 0;
}

.popup-highlight {
    color: var(--primary-color) !important;
    font-weight: 600;
    text-align: center;
}

.mastery-highlight {
    background: var(--bg-accent);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    border-left: 4px solid var(--primary-color);
}

.mastery-highlight i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.popup-actions {
    padding: var(--space-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.popup-btn {
    flex: 1;
    min-width: 120px;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.popup-btn.primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.popup-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.popup-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.popup-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.popup-btn.tertiary {
    background: none;
    color: var(--text-secondary);
    border: none;
    font-size: 0.8rem;
    flex: none;
    min-width: auto;
}

.popup-btn.tertiary:hover {
    color: var(--text-primary);
}

/* Cookie Consent Styling */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-icon {
    font-size: 2rem;
    color: #8B4513;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-text h4 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: var(--space-md);
    flex-shrink: 0;
}

.cookie-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.cookie-btn.accept {
    background: var(--gradient-primary);
    color: white;
}

.cookie-btn.accept:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cookie-btn.decline {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn.decline:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.cookie-btn.manage {
    background: transparent;
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-btn.manage:hover {
    color: var(--primary-hover);
}

/* Cookie Modal Styling */
.cookie-modal {
    max-width: 500px;
}

.cookie-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.cookie-category h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.cookie-category p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    transition: var(--transition-fast);
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: var(--transition-fast);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Cookie Consent */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        padding: var(--space-md);
    }
}

/* Simplified Hints Styling - Clean Format */
.hint-item {
    background: transparent;
    border-left: 4px solid var(--primary-color);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
}

.hint-item h4 {
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
}

.hint-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Responsive Design for Donate Section */
@media (max-width: 768px) {
    .donate-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .donate-action {
        position: static;
    }
    
    .popup-content {
        margin: var(--space-lg);
        width: calc(100% - 2rem);
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-btn {
        flex: none;
    }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
    /* Quotes container mobile */
    .quotes-container {
        height: 100px;
        margin: var(--space-lg) 0;
    }
    
    .quote-item p {
        font-size: 1.125rem;
        padding: 0 var(--space-md);
    }
    
    /* Testimonials grid mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .testimonial-card {
        padding: var(--space-lg);
    }
    
    /* Floating testimonials mobile */
    .floating-testimonials {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
    
    .floating-testimonials-content {
        height: 80px;
    }
    
    .floating-testimonial {
        padding: var(--space-md);
    }
    
    .floating-info h5 {
        font-size: 0.8rem;
    }
    
    .floating-info p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .quotes-container {
        height: 120px;
    }
    
    .quote-item p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .testimonials-section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: var(--space-xl);
    }
    
    .floating-testimonials {
        bottom: 60px; /* Account for mobile browser chrome */
    }
}

/* Dark theme specific adjustments */
[data-theme="dark"] .floating-testimonials {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .testimonial-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .testimonial-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Animation improvements for better performance */
@media (prefers-reduced-motion: reduce) {
    .quote-item,
    .floating-testimonial,
    .testimonial-card {
        transition: none;
        animation: none;
    }
    
    .floating-testimonials {
        animation: none;
    }
}

/* Enhanced UI/UX Micro-interactions */
@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: var(--shadow-lg); 
    }
    50% { 
        box-shadow: var(--shadow-xl), var(--shadow-glow); 
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3) translateY(50px); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05) translateY(-10px); 
    }
    70% { 
        transform: scale(0.9) translateY(5px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

@keyframes slideInFromLeft {
    0% { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideInFromRight {
    0% { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes fadeInUp {
    0% { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Enhanced Card Hover Effects */
.chapter-card,
.testimonial-card,
.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

.chapter-card:nth-child(odd) {
    animation: slideInFromLeft 0.6s ease-out;
}

.chapter-card:nth-child(even) {
    animation: slideInFromRight 0.6s ease-out;
}

/* Interactive Button Effects */
.cta-btn:focus,
.chapter-btn:focus {
    outline: none;
    animation: pulseGlow 1.5s infinite;
}

/* Smooth Section Transitions */
.hero,
.chapters-section,
.testimonials-section,
.about-section,
.donate-section {
    animation: fadeInUp 0.8s ease-out;
}

/* Enhanced Loading States */
.chapter-card:not(:hover) {
    animation: fadeInUp 0.6s ease-out;
}

/* Interactive Star Ratings */
.testimonial-rating i,
.floating-rating i,
.about-testimonial-rating i,
.donate-testimonial-rating i {
    transition: all var(--transition-fast);
}

.testimonial-card:hover .testimonial-rating i,
.floating-testimonial:hover .floating-rating i,
.about-testimonial-content:hover .about-testimonial-rating i,
.donate-testimonial-content:hover .donate-testimonial-rating i {
    transform: scale(1.1);
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Enhanced Theme Toggle */
.theme-toggle {
    transition: all var(--transition-bounce);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-glow);
}

/* Enhanced User Stats */
.user-stats .stat {
    transition: all var(--transition-bounce);
}

.user-stats .stat:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

/* Progress Bar Enhancements */
.progress-fill {
    background: var(--gradient-primary);
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Enhanced Navigation */
.nav {
    display: flex;
    gap: var(--space-sm);
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
    display: none;
}

/* Mobile Navigation - Hidden on Desktop */
.mobile-nav {
    display: none;
}

/* Logo Enhancement */
.logo {
    transition: all var(--transition-bounce);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    transition: all var(--transition-bounce);
}

.logo:hover .logo-icon {
    transform: rotate(10deg);
    color: var(--primary-color);
}

/* Section Title Enhancement */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Enhanced Footer */
.footer {
    background: var(--bg-gradient-2);
    border-top: 1px solid var(--border-color);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .chapter-card:nth-child(n) {
        animation: fadeInUp 0.6s ease-out;
    }
    
    .cta-btn {
        padding: var(--space-md) var(--space-xl);
        font-size: 1rem;
    }
    
    .stat-card {
        min-width: 120px;
        padding: var(--space-lg) var(--space-md);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* About Page Floating Testimonials */
.about-testimonials-section {
    margin-top: var(--space-3xl);
    padding: var(--space-3xl) 0;
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.about-testimonials-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.about-testimonials-title i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.about-testimonials-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.about-floating-testimonial {
    position: absolute;
    width: 280px;
    animation: floatAround 20s infinite linear;
    opacity: 0;
    animation-fill-mode: forwards;
}

.about-floating-testimonial:nth-child(1) { top: 10%; left: 5%; animation-duration: 25s; }
.about-floating-testimonial:nth-child(2) { top: 60%; right: 10%; animation-duration: 30s; animation-direction: reverse; }
.about-floating-testimonial:nth-child(3) { top: 20%; left: 50%; animation-duration: 28s; }
.about-floating-testimonial:nth-child(4) { bottom: 10%; left: 20%; animation-duration: 32s; animation-direction: reverse; }
.about-floating-testimonial:nth-child(5) { top: 40%; right: 25%; animation-duration: 27s; }
.about-floating-testimonial:nth-child(6) { bottom: 30%; right: 5%; animation-duration: 29s; animation-direction: reverse; }
.about-floating-testimonial:nth-child(7) { top: 70%; left: 60%; animation-duration: 26s; }
.about-floating-testimonial:nth-child(8) { top: 5%; right: 40%; animation-duration: 31s; animation-direction: reverse; }

.about-testimonial-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .about-testimonial-content {
    background: rgba(17, 17, 17, 0.95);
    border-color: var(--border-color);
}

.about-testimonial-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.about-testimonial-avatar {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.about-testimonial-info h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.about-testimonial-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: var(--space-sm);
}

.about-testimonial-rating i {
    color: #fbbf24;
    font-size: 0.8rem;
}

.about-testimonial-rating span {
    margin-left: var(--space-xs);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.about-testimonial-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    font-style: italic;
}

/* Donate Page Floating Testimonials */
.donate-testimonials-section {
    margin-top: var(--space-2xl);
    padding: var(--space-2xl) 0;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.donate-testimonials-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.donate-testimonials-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.donate-testimonials-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.donate-floating-testimonial {
    position: absolute;
    width: 300px;
    animation: gentleFloat 15s infinite ease-in-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.donate-floating-testimonial:nth-child(1) { top: 15%; left: 8%; animation-duration: 18s; }
.donate-floating-testimonial:nth-child(2) { top: 45%; right: 12%; animation-duration: 22s; animation-direction: reverse; }
.donate-floating-testimonial:nth-child(3) { bottom: 20%; left: 35%; animation-duration: 20s; }
.donate-floating-testimonial:nth-child(4) { top: 25%; right: 35%; animation-duration: 19s; animation-direction: reverse; }

.donate-testimonial-content {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    backdrop-filter: blur(15px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    position: relative;
}

[data-theme="dark"] .donate-testimonial-content {
    background: linear-gradient(145deg, rgba(17, 17, 17, 0.98) 0%, rgba(17, 17, 17, 0.95) 100%);
    border-color: var(--primary-color);
}

.donate-testimonial-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0.3;
}

.donate-testimonial-content:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-2xl);
}

.donate-testimonial-content:hover::before {
    opacity: 0.6;
}

.donate-testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-md);
}

.donate-testimonial-info h5 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.donate-testimonial-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: var(--space-sm);
}

.donate-testimonial-rating i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.donate-testimonial-rating span {
    margin-left: var(--space-xs);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.donate-testimonial-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
    font-weight: 500;
}

/* Floating Animations */
@keyframes floatAround {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    25% { transform: translateY(-20px) translateX(15px) rotate(2deg); }
    50% { transform: translateY(-10px) translateX(-10px) rotate(-1deg); }
    75% { transform: translateY(-25px) translateX(20px) rotate(1deg); }
    90% { opacity: 1; }
    100% { transform: translateY(0px) translateX(0px) rotate(0deg); opacity: 0; }
}

@keyframes gentleFloat {
    0% { transform: translateY(0px) translateX(0px); opacity: 0; }
    15% { opacity: 1; }
    25% { transform: translateY(-15px) translateX(10px); }
    50% { transform: translateY(-8px) translateX(-8px); }
    75% { transform: translateY(-18px) translateX(12px); }
    85% { opacity: 1; }
    100% { transform: translateY(0px) translateX(0px); opacity: 0; }
}

/* Mobile Responsive for About/Donate Testimonials */
@media (max-width: 768px) {
    .about-testimonials-container,
    .donate-testimonials-container {
        height: 250px;
    }
    
    .about-floating-testimonial,
    .donate-floating-testimonial {
        width: 240px;
        position: relative !important;
        animation: none !important;
        opacity: 1 !important;
        margin-bottom: var(--space-lg);
    }
    
    .about-testimonials-container,
    .donate-testimonials-container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        padding: var(--space-lg);
    }
    
    .about-floating-testimonial:nth-child(n),
    .donate-floating-testimonial:nth-child(n) {
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
}

/* ===============================================
   🚀 ULTRA MOBILE RESPONSIVE - ANDROID APP FEEL
   =============================================== */

/* Mobile-First Touch Optimizations */
* {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, [contenteditable] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Enhanced Mobile Scrolling */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

/* Mobile Container */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Ultra Mobile Header */
    .header {
        padding: 0.75rem 0;
        backdrop-filter: blur(20px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
        position: sticky;
        top: 0;
        z-index: 1000;
        border-bottom: 1px solid rgba(147, 197, 253, 0.1);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
        font-weight: 800;
    }
    
    .nav {
        display: none;
    }
    
    .user-profile {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .user-stats {
        display: none;
    }
    
    .theme-toggle,
    .audio-toggle {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 0;
    }
    
    .audio-toggle {
        margin-right: 0.5rem;
    }
    
    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    .mobile-menu-btn span {
        width: 2rem;
        height: 0.25rem;
        background: var(--text-primary);
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        transform-origin: 1px;
    }
    
    .mobile-menu-btn.open span:first-child {
        transform: rotate(45deg);
    }
    
    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }
    
    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg);
    }
    
    /* Mobile Navigation Overlay */
    .mobile-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.9) 100%);
        backdrop-filter: blur(30px);
        z-index: 999;
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }
    
    [data-theme="dark"] .mobile-nav {
        background: linear-gradient(135deg,
            rgba(17, 24, 39, 0.95) 0%,
            rgba(31, 41, 55, 0.9) 100%);
    }
    
    .mobile-nav.open {
        left: 0;
    }
    
    .mobile-nav-link {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
        text-decoration: none;
        padding: 1rem 2rem;
        border-radius: 20px;
        transition: all 0.3s ease;
        background: rgba(59, 130, 246, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(59, 130, 246, 0.2);
        transform: translateY(20px);
        opacity: 0;
        animation: slideInUp 0.6s ease forwards;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-nav-link i {
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
    }
    
    .mobile-nav-link.active {
        background: linear-gradient(135deg,
            var(--primary-color) 0%,
            var(--accent-color) 100%);
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    }
    
    .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
    .mobile-nav-link:nth-child(2) { animation-delay: 0.2s; }
    .mobile-nav-link:nth-child(3) { animation-delay: 0.3s; }
    .mobile-nav-link:nth-child(4) { animation-delay: 0.4s; }
    .mobile-nav-link:nth-child(5) { animation-delay: 0.5s; }
    
    @keyframes slideInUp {
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .mobile-nav-link:hover {
        background: rgba(59, 130, 246, 0.2);
        transform: scale(1.05);
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
    }
    
    .mobile-nav-link.active:hover {
        background: linear-gradient(135deg,
            var(--accent-color) 0%,
            var(--primary-color) 100%);
        box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
    }
    
    /* Ultra Mobile Hero Section */
    .hero {
        padding: 2rem 0;
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 16px;
    }
    
    /* Mobile Learning Quotes Carousel */
    .learning-quotes-carousel {
        padding: 1rem;
        margin: 2rem 0;
    }
    
    .quote-slide {
        padding: 1.5rem;
        border-radius: 16px;
        text-align: center;
    }
    
    .quote-slide blockquote {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .quote-slide footer {
        font-size: 0.8rem;
    }
    
    /* Mobile Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Mobile Chapters Grid */
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .chapter-card {
        padding: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    
    .chapter-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .chapter-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .chapter-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .difficulty-badge {
        font-size: 0.7rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Ultra Mobile Learning Interface */
    .learning-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 60px);
        padding: 0;
        margin: 0;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .sidebar-header {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .back-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .sidebar-title {
        font-size: 1rem;
        margin: 0.75rem 0;
    }
    
    .problems-list {
        max-height: 200px;
        overflow-y: auto;
        padding: 0.5rem;
    }
    
    .problem-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        border-radius: 12px;
        font-size: 0.9rem;
    }
    
    /* Mobile Problem Section */
    .problem-section {
        border-right: none;
        border-radius: 0;
        flex: none;
    }
    
    .problem-header {
        padding: 1rem;
    }
    
    .problem-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .problem-badges {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .problem-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .problem-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        min-width: 80px;
    }
    
    .problem-content {
        padding: 1rem;
    }
    
    .problem-statement,
    .explanation-content,
    .problem-example,
    .hints-content {
        padding: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1rem;
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .problem-actions {
        padding: 1rem;
        gap: 0.75rem;
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    /* Ultra Mobile Code Editor */
    .code-editor {
        margin-top: 1rem;
        border-radius: 0;
    }
    
    .editor-header {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .editor-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .editor-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .editor-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: 60px;
    }
    
    .editor-content {
        height: 300px;
        font-size: 0.8rem;
    }
    
    .editor-controls {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .editor-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 8px;
        flex: 1;
        min-width: 70px;
    }
    
    /* Mobile Output Section */
    .output-section {
        margin-top: 0;
        border-radius: 0;
    }
    
    .output-tabs {
        overflow-x: auto;
        padding: 0 0.5rem;
    }
    
    .output-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        min-width: 80px;
    }
    
    .output-content {
        height: 200px;
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    /* Mobile Testimonials */
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .testimonial-card .rating {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .testimonial-card blockquote {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .testimonial-card footer {
        font-size: 0.8rem;
    }
    
    .floating-testimonials {
        display: none;
    }
    
    /* Mobile About Section */
    .about-section {
        padding: 3rem 0;
    }
    
    .about-content {
        padding: 0 1rem;
        text-align: center;
    }
    
    .about-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .vision-panel {
        padding: 2rem;
        border-radius: 16px;
        margin: 2rem 0;
    }
    
    .vision-panel h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .vision-panel p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .about-floating-testimonial {
        position: relative !important;
        animation: none !important;
        opacity: 1 !important;
        margin-bottom: 1rem;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .about-testimonials-container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin-top: 2rem;
    }
    
    /* Mobile Donate Section */
    .donate-section {
        padding: 3rem 0;
    }
    
    .donate-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .creator-story {
        padding: 2rem;
        border-radius: 16px;
        order: 2;
    }
    
    .story-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .story-icon {
        font-size: 2rem;
        padding: 1rem;
        border-radius: 16px;
    }
    
    .creator-story h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .creator-story p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .impact-message {
        padding: 1.5rem;
        border-radius: 16px;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .impact-message i {
        font-size: 1.5rem;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .donate-action {
        position: static;
        order: 1;
    }
    
    .donate-card {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .donate-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .donate-header i {
        font-size: 2rem;
        padding: 1rem;
        border-radius: 16px;
    }
    
    .donate-card h3 {
        font-size: 1.25rem;
    }
    
    .donate-card p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .donate-btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    
    .donate-floating-testimonial {
        position: relative !important;
        animation: none !important;
        opacity: 1 !important;
        margin-bottom: 1rem;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    .donate-testimonials-container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin-top: 2rem;
    }
    
    /* Mobile Footer */
    .footer {
        padding: 2rem 0;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        border-radius: 12px;
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .learning-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .problems-list {
        max-height: 250px;
    }
    
    .code-editor {
        margin-top: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donate-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Large Mobile (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn {
        width: auto;
        min-width: 160px;
    }
    
    .editor-controls {
        flex-wrap: nowrap;
    }
    
    .editor-btn {
        flex: 1;
        min-width: 80px;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .problem-header {
        padding: 0.75rem;
    }
    
    .problem-content {
        padding: 0.75rem;
    }
    
    .problem-statement,
    .explanation-content,
    .problem-example,
    .hints-content {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .editor-content {
        height: 250px;
        font-size: 0.75rem;
    }
    
    .output-content {
        height: 150px;
        font-size: 0.75rem;
    }
    
    .feature-card,
    .creator-story,
    .donate-card {
        padding: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .chapter-card:hover,
    .feature-card:hover,
    .testimonial-card:hover,
    .donate-card:hover,
    .creator-story:hover {
        transform: none;
    }
    
    .btn:hover,
    .action-btn:hover,
    .editor-btn:hover,
    .donate-btn:hover {
        transform: none;
    }
    
    .btn:active,
    .action-btn:active,
    .editor-btn:active,
    .donate-btn:active {
        transform: scale(0.95);
    }
    
    .chapter-card:active,
    .feature-card:active,
    .testimonial-card:active {
        transform: scale(0.98);
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-content h1,
    .chapter-card h3,
    .feature-card h3 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
        min-height: 50vh;
    }
    
    .learning-container {
        height: calc(100vh - 50px);
    }
    
    .sidebar {
        height: auto;
        max-height: 150px;
    }
    
    .problems-list {
        max-height: 100px;
    }
    
    .editor-content {
        height: 200px;
    }
    
    .output-content {
        height: 120px;
    }
}