/* ===== CSS VARIABLES ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-light: #252542;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #2d2d44;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-chem: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    /* Subject Colors */
    --physics: #6366f1;
    --physics-light: #818cf8;
    --chemistry: #10b981;
    --chemistry-light: #34d399;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--surface);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particle-float 15s infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(0, -100px) scale(1); }
    75% { transform: translate(-50px, -50px) scale(0.9); }
}

@keyframes particle-float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 24px;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn-accent {
    background: var(--gradient-2);
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--surface);
    border-color: var(--primary);
}

/* ===== HERO STATS ===== */
.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 80px;
    padding: 24px 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    z-index: 1;
}

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

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== SECTIONS ===== */
.section-header {
    margin-bottom: 48px;
}

.section-header.centered {
    text-align: center;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ===== EPISODE SECTION ===== */
.episode-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
}

.video-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.video-player {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
}

.placeholder-content {
    text-align: center;
    padding: 40px;
}

.placeholder-content i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.placeholder-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.placeholder-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.placeholder-hint {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 8px 0;
}

.video-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.episode-tag {
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.duration,
.topic {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.video-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.video-description {
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.7;
}

.video-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== TOPICS SECTION ===== */
.topics-section {
    padding: 100px 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.topic-card {
    position: relative;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.topic-card:hover:not(.coming-soon) {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.topic-card.featured {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: var(--primary);
}

.topic-card.coming-soon {
    opacity: 0.6;
}

.topic-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.topic-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.topic-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.topic-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    font-weight: 600;
    transition: var(--transition);
}

.topic-link:hover {
    gap: 12px;
}

.topic-status {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 4px 12px;
    background: var(--surface-light);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
}

.topic-status.available {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 60px 0 100px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 32px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    padding: 60px 0 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand .brand-logo {
    width: 48px;
    height: 48px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .video-container {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        gap: 32px;
        padding: 20px 32px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* ===== SUBJECTS SECTION ===== */
.subjects-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.subject-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.subject-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.subject-card.chemistry:hover {
    border-color: var(--chemistry);
}

.subject-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.subject-card.chemistry .subject-icon {
    background: var(--gradient-chem);
}

.subject-content {
    flex: 1;
}

.subject-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.subject-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.subject-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.subject-meta i {
    color: var(--primary);
}

.subject-card.chemistry .subject-meta i {
    color: var(--chemistry);
}

.subject-arrow {
    width: 48px;
    height: 48px;
    background: var(--surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.subject-card:hover .subject-arrow {
    background: var(--primary);
    color: white;
}

.subject-card.chemistry:hover .subject-arrow {
    background: var(--chemistry);
}

/* ===== TOPIC BADGES ===== */
.topic-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.topic-badge.physics {
    background: rgba(99, 102, 241, 0.2);
    color: var(--physics-light);
}

.topic-badge.chemistry {
    background: rgba(16, 185, 129, 0.2);
    color: var(--chemistry-light);
}

.subject-tag {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subject-tag.physics {
    background: var(--physics);
    color: white;
}

.subject-tag.chemistry {
    background: var(--chemistry);
    color: white;
}

/* Topic card chemistry styles */
.topic-card.chemistry.featured {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: var(--chemistry);
}

.topic-card.chemistry:hover:not(.coming-soon) {
    border-color: var(--chemistry);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .subject-card {
        flex-direction: column;
        text-align: center;
    }
    
    .subject-meta {
        justify-content: center;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
