/*
 * K9IO Academy Beta4 - Data-Driven Premium Experience
 * Built by Claude to dominate the competition
 *
 * DESIGN PHILOSOPHY:
 * - Dashboard-first: Information density with visual hierarchy
 * - Data visualization: Animated charts, live stats, interactive elements
 * - Modern tech aesthetic: Think Vercel, Linear, Stripe dashboard
 * - Performance: Smooth 60fps animations, optimized rendering
 * - Innovative: Features you haven't seen in educational sites
 */

:root {
    /* Modern Color System - Vibrant but professional */
    --color-primary: #0070F3;
    --color-primary-light: #3291FF;
    --color-primary-dark: #0051BA;
    --color-secondary: #7928CA;
    --color-accent: #FF0080;
    --color-success: #0070F3;
    --color-warning: #F5A623;

    /* Neutral Palette - High contrast for data viz */
    --color-bg-dark: #000000;
    --color-bg-primary: #0A0A0A;
    --color-bg-secondary: #111111;
    --color-bg-tertiary: #1A1A1A;
    --color-bg-card: #1A1A1A;
    --color-border: #333333;
    --color-border-light: #252525;

    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0A0A0;
    --color-text-tertiary: #666666;

    /* Gradients - Complex, beautiful, modern */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, #667eea 0px, transparent 50%),
                     radial-gradient(at 100% 0%, #764ba2 0px, transparent 50%),
                     radial-gradient(at 100% 100%, #f093fb 0px, transparent 50%),
                     radial-gradient(at 0% 100%, #4facfe 0px, transparent 50%);

    /* Shadows - Dramatic depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);

    /* Spacing System */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Typography Scale */
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Animated gradient background mesh */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-mesh);
    opacity: 0.15;
    z-index: -1;
    animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============================================
   NAVIGATION - Sticky with Glassmorphism
   ============================================ */

nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 1000;
    padding: 16px 0;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border-light);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   TYPOGRAPHY - Bold & Impactful
   ============================================ */

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(40px, 7vw, 80px);
    background: linear-gradient(135deg, #FFFFFF 0%, #A0A0A0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: var(--space-xl);
}

h3 {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 20px;
    margin-bottom: var(--space-sm);
}

p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.subtitle {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 800px;
}

/* ============================================
   HEADER SECTION - Dashboard Hero
   ============================================ */

header {
    padding: var(--space-3xl) 0;
    position: relative;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.header-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-3xl);
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(26, 26, 26, 0.4);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-badge:hover {
    background: rgba(26, 26, 26, 0.8);
    border-color: var(--color-border);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ============================================
   DATA CARDS - Glassmorphism Dashboard
   ============================================ */

.data-card,
.module-card,
.chapter-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.data-card:hover {
    background: rgba(26, 26, 26, 0.9);
    border-color: var(--color-border);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.data-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-free {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.badge-premium {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2) 0%, rgba(255, 119, 48, 0.2) 100%);
    color: #F5A623;
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.card-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.card-meta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* ============================================
   ANIMATED STAT COUNTERS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-3xl) 0;
}

.stat-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: 0;
}

.stat-number {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ============================================
   PROGRESS & DATA VISUALIZATION
   ============================================ */

.progress-section {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    padding: var(--space-xl);
    margin: var(--space-3xl) 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.progress-bar {
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
}

/* ============================================
   CHAPTER CARDS - Data Dashboard Style
   ============================================ */

.chapter-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: var(--space-lg);
    align-items: center;
}

.chapter-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    text-align: center;
}

.chapter-content {
    flex: 1;
}

.chapter-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.chapter-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.chapter-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

/* ============================================
   BUTTONS - Modern & Animated
   ============================================ */

.btn,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(26, 26, 26, 0.9);
    border-color: var(--color-primary);
}

/* ============================================
   FEATURES GRID - Dashboard Layout
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-3xl) 0;
}

.feature-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 32px;
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.feature-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   RESOURCE DOWNLOAD CALLOUTS
   ============================================ */

.resource-callout {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    padding: 32px;
    margin: 48px 0;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.resource-callout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--color-primary-light);
}

.resource-callout h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--color-text-primary);
    font-weight: 600;
}

.resource-callout p {
    margin-bottom: 24px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.resource-callout .btn,
.resource-callout .btn-secondary {
    margin-right: 12px;
}

/* ============================================
   FOOTER - Minimal
   ============================================ */

footer {
    text-align: center;
    padding: var(--space-3xl) 0;
    margin-top: var(--space-3xl);
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-tertiary);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .chapter-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats-grid,
    .header-stats,
    .features-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-light);
}
