/* Python Academy Styles */

/* Register academy variables as animatable colors */
@property --academy-bg { syntax: '<color>'; inherits: true; initial-value: #0f172a; }
@property --academy-surface { syntax: '<color>'; inherits: true; initial-value: #1e293b; }
@property --academy-surface-hover { syntax: '<color>'; inherits: true; initial-value: #334155; }
@property --academy-text { syntax: '<color>'; inherits: true; initial-value: #f1f5f9; }
@property --academy-text-secondary { syntax: '<color>'; inherits: true; initial-value: #cbd5e1; }
@property --academy-border { syntax: '<color>'; inherits: true; initial-value: #334155; }
@property --academy-accent { syntax: '<color>'; inherits: true; initial-value: #38bdf8; }
@property --academy-accent-hover { syntax: '<color>'; inherits: true; initial-value: #0ea5e9; }
@property --academy-card-bg { syntax: '<color>'; inherits: true; initial-value: #1e293b; }
@property --academy-card-hover { syntax: '<color>'; inherits: true; initial-value: #334155; }
@property --lesson-h1 { syntax: '<color>'; inherits: true; initial-value: #38bdf8; }
@property --lesson-h2 { syntax: '<color>'; inherits: true; initial-value: #a78bfa; }
@property --lesson-h3 { syntax: '<color>'; inherits: true; initial-value: #34d399; }
@property --lesson-code-color { syntax: '<color>'; inherits: true; initial-value: #f472b6; }
@property --lesson-code-bg { syntax: '<color>'; inherits: true; initial-value: #1e2a3a; }

/* Theme Variables */
:root[data-theme="dark"] {
    --academy-bg: #0f172a;
    --academy-surface: #1e293b;
    --academy-surface-hover: #334155;
    --academy-text: #f1f5f9;
    --academy-text-secondary: #cbd5e1;
    --academy-border: #334155;
    --academy-accent: #38bdf8;
    --academy-accent-hover: #0ea5e9;
    --academy-card-bg: #1e293b;
    --academy-card-hover: #334155;
    /* lesson typography */
    --lesson-h1: #38bdf8;
    --lesson-h2: #a78bfa;
    --lesson-h3: #34d399;
    --lesson-code-color: #f472b6;
    --lesson-code-bg: #1e2a3a;
}

:root[data-theme="light"] {
    --academy-bg: #f8fafc;
    --academy-surface: #ffffff;
    --academy-surface-hover: #f1f5f9;
    --academy-text: #0f172a;
    --academy-text-secondary: #475569;
    --academy-border: #e2e8f0;
    --academy-accent: #0ea5e9;
    --academy-accent-hover: #0284c7;
    --academy-card-bg: #ffffff;
    --academy-card-hover: #f8fafc;
    /* lesson typography */
    --lesson-h1: #0284c7;
    --lesson-h2: #6d28d9;
    --lesson-h3: #059669;
    --lesson-code-color: #be185d;
    --lesson-code-bg: #f1f5f9;
}

:root[data-theme="eye-saver"] {
    --academy-bg: #f5f3e8;
    --academy-surface: #fdfcf5;
    --academy-surface-hover: #ebe9d9;
    --academy-text: #2d2a1f;
    --academy-text-secondary: #5a5647;
    --academy-border: #d4d0c0;
    --academy-accent: #7c9885;
    --academy-accent-hover: #6a8573;
    --academy-card-bg: #fdfcf5;
    --academy-card-hover: #f5f3e8;
    /* lesson typography */
    --lesson-h1: #4a7c65;
    --lesson-h2: #6b5b95;
    --lesson-h3: #4a7c65;
    --lesson-code-color: #8b4513;
    --lesson-code-bg: #eae8d8;
}

/* Transition academy variables on :root during theme switch */
:root[data-theme-transitioning] {
    transition:
        --bg-body 0.3s ease, --bg-main 0.3s ease, --bg-panel 0.3s ease,
        --bg-secondary 0.3s ease, --bg-tertiary 0.3s ease,
        --text-primary 0.3s ease, --text-secondary 0.3s ease, --text-muted 0.3s ease,
        --accent-primary 0.3s ease, --border-main 0.3s ease,
        --academy-bg 0.3s ease, --academy-surface 0.3s ease,
        --academy-surface-hover 0.3s ease, --academy-text 0.3s ease,
        --academy-text-secondary 0.3s ease, --academy-border 0.3s ease,
        --academy-accent 0.3s ease, --academy-accent-hover 0.3s ease,
        --academy-card-bg 0.3s ease, --academy-card-hover 0.3s ease,
        --lesson-h1 0.3s ease, --lesson-h2 0.3s ease, --lesson-h3 0.3s ease,
        --lesson-code-color 0.3s ease, --lesson-code-bg 0.3s ease;
}

/* Disable all transitions during page load */
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
    transition: none !important;
    animation: none !important;
}

html, body {
    touch-action: manipulation;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--academy-bg);
    color: var(--academy-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.academy-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    box-sizing: border-box;
}

/* No results message */
.no-results-msg {
    text-align: center;
    padding: 48px 20px;
    color: var(--academy-text-secondary);
    font-size: 1rem;
    display: none;
}
.no-results-msg.visible {
    display: block;
}

/* Header */
.academy-header {
    background: var(--academy-surface);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--academy-border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--academy-surface-hover);
    border: 1px solid var(--academy-border);
    border-radius: 8px;
    color: var(--academy-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--academy-accent);
    border-color: var(--academy-accent);
    color: white;
    transform: translateX(-4px);
}

.theme-toggles {
    display: flex;
    gap: 8px;
}

.theme-btn {
    padding: 10px;
    background: var(--academy-surface-hover);
    border: 1px solid var(--academy-border);
    border-radius: 8px;
    color: var(--academy-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background: var(--academy-accent);
    border-color: var(--academy-accent);
    color: white;
}

.theme-btn.active {
    background: var(--academy-accent);
    border-color: var(--academy-accent);
    color: white;
}

.academy-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    display: inline-block;
    background: linear-gradient(135deg, var(--academy-accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.academy-subtitle {
    font-size: 1.125rem;
    color: var(--academy-text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--academy-accent), #8b5cf6);
    border-radius: 20px;
    padding: 48px 32px;
    margin-bottom: 48px;
    text-align: center;
    color: white;
}

.hero-heading {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.hero-text {
    font-size: 1.125rem;
    margin: 0 0 32px 0;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Search */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--academy-text-secondary);
}

.search-input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    background: white;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

/* Paths Container */
.paths-container {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 32px 0;
    text-align: center;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Path Card */
.path-card {
    background: var(--academy-card-bg);
    border: 2px solid var(--academy-border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.path-card:hover {
    background: var(--academy-card-hover);
    border-color: var(--academy-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.path-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.path-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.path-subtitle {
    font-size: 1rem;
    color: var(--academy-text-secondary);
    margin: 0 0 20px 0;
}

.path-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.path-level {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.path-level.beginner {
    background: #10b981;
    color: white;
}

.path-level.intermediate {
    background: #f59e0b;
    color: white;
}

.path-level.advanced {
    background: #ef4444;
    color: white;
}

.path-level.practical {
    background: #8b5cf6;
    color: white;
}

.path-level.professional {
    background: #ec4899;
    color: white;
}

/* ─── New Path Badge ─────────────────────────────────────────────────────── */
.path-card-new {
    position: relative;
}

.path-new-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── Academy Category Legend ────────────────────────────────────────────── */
.academy-category-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.legend-python {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

.legend-ds {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.legend-ml {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

.legend-ai {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

:root[data-theme="light"] .legend-python {
    color: #2563eb;
}

:root[data-theme="light"] .legend-ds {
    color: #059669;
}

:root[data-theme="light"] .legend-ml {
    color: #7c3aed;
}

:root[data-theme="light"] .legend-ai {
    color: #d97706;
}

.path-lessons {
    padding: 6px 12px;
    background: var(--academy-surface-hover);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Progress */
.path-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: var(--academy-surface-hover);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--academy-accent), #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--academy-text-secondary);
}

.path-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--academy-accent);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.path-btn:hover {
    background: var(--academy-accent-hover);
    transform: scale(1.02);
}

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    touch-action: none;
    /* Blocks backdrop scroll — children override with their own touch-action */
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--academy-surface);
    width: 95%;
    max-width: 1500px;
    height: 90vh;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--academy-border);
    overscroll-behavior: contain;
    touch-action: pan-y;
    /* Re-enable vertical scroll inside modal content */
}

#lesson-body {
    flex: 1;
    display: flex;
    min-height: 0;
    /* Critical for flex scrolling */
}


/* Responsive */
@media (max-width: 768px) {
    /* Ensure natural page scroll on mobile — override styles.css body overflow */
    body {
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    .academy-title {
        font-size: 2rem;
    }

    .hero-heading {
        font-size: 1.75rem;
    }

    .paths-grid {
        grid-template-columns: 1fr;
    }

    .lesson-content {
        padding: 24px;
    }
}

/* Lesson Viewer Styles */
.lesson-viewer {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Contains the sidebar and main scrollable area */
}

.lesson-sidebar {
    width: 320px;
    background: var(--academy-surface-hover);
    border-right: 1px solid var(--academy-border);
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.lesson-sidebar h3 {
    font-size: 1.25rem;
    margin: 0 0 8px 0;
}

.path-description {
    font-size: 0.875rem;
    color: var(--academy-text-secondary);
    margin: 0 0 24px 0;
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lesson-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--academy-surface);
    border: 1px solid var(--academy-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lesson-item:hover {
    background: var(--academy-card-hover);
    border-color: var(--academy-accent);
}

.lesson-item.active {
    background: var(--academy-accent);
    border-color: var(--academy-accent);
    color: white;
}

.lesson-item.active .lesson-duration {
    color: rgba(255, 255, 255, 0.9);
}

.lesson-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--academy-accent);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.lesson-item.active .lesson-number {
    background: white;
    color: var(--academy-accent);
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--academy-text-secondary);
}

.lesson-main {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--academy-accent) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling (Webkit) */
.lesson-main::-webkit-scrollbar {
    width: 10px;
}

.lesson-main::-webkit-scrollbar-track {
    background: transparent;
}

.lesson-main::-webkit-scrollbar-thumb {
    background: var(--academy-accent);
    border-radius: 10px;
    border: 3px solid var(--academy-surface);
    /* Creates a "floating" effect */
}

.lesson-main::-webkit-scrollbar-thumb:hover {
    background: var(--academy-accent-hover);
}

.lesson-placeholder {
    text-align: center;
    padding: 80px 20px;
    color: var(--academy-text-secondary);
}

.lesson-placeholder h2 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--academy-border);
}

.lesson-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.lesson-content-text {
    line-height: 1.8;
    margin-bottom: 32px;
    font-size: 1rem;
    color: var(--academy-text);
}

.lesson-content-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--lesson-h1);
    letter-spacing: -0.02em;
}

.lesson-content-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--academy-border);
    padding-bottom: 8px;
    color: var(--lesson-h2);
    letter-spacing: -0.01em;
}

.lesson-content-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--lesson-h3);
}

.lesson-content-text p {
    margin-bottom: 16px;
}

.lesson-content-text ul,
.lesson-content-text ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.lesson-content-text li {
    margin-bottom: 8px;
    position: relative;
    list-style-type: disc;
    line-height: 1.75;
}

.lesson-content-text strong {
    color: var(--academy-text);
    font-weight: 700;
}

.lesson-content-text code {
    background: var(--lesson-code-bg);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--lesson-code-color);
    font-weight: 500;
}

.lesson-content-text pre {
    background: #0d1117;
    padding: 18px 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-left: 3px solid var(--academy-accent);
    overflow-x: auto;
}

.lesson-content-text pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
    font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Lesson Content Layout Classes ─────────────────────────────────────── */

/* Intro paragraph — slightly larger lead text */
.lesson-content-text .lesson-intro {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--academy-text);
    font-weight: 400;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--academy-border);
}

/* Concept block — each major idea gets breathing room */
.lesson-content-text .concept-block {
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--academy-border);
}

.lesson-content-text .concept-block:last-of-type {
    border-bottom: none;
}

/* Practice Lab — teal callout box */
.lesson-content-text .practice-lab {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 2rem 0;
}

.lesson-content-text .practice-lab h3 {
    color: #10b981;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

:root[data-theme="light"] .lesson-content-text .practice-lab {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

:root[data-theme="eye-saver"] .lesson-content-text .practice-lab {
    background: rgba(74, 124, 101, 0.08);
    border-color: rgba(74, 124, 101, 0.25);
}

/* Lab exercise — individual exercise within practice lab */
.lesson-content-text .lab-exercise {
    padding: 12px 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
}

.lesson-content-text .lab-exercise:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lesson-content-text hr {
    border: none;
    border-top: 1px solid var(--academy-border);
    margin: 24px 0;
    opacity: 0.5;
}

.lesson-content-text blockquote {
    border-left: 3px solid #a78bfa;
    background: rgba(167, 139, 250, 0.08);
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
    color: var(--academy-text-secondary);
    font-style: italic;
}

.code-example {
    background: var(--academy-surface-hover);
    border: 1px solid var(--academy-border);
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--academy-surface);
    border-bottom: 1px solid var(--academy-border);
}

.code-header span {
    font-weight: 600;
    font-size: 0.875rem;
}

.copy-code-btn {
    padding: 6px 12px;
    background: var(--academy-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    background: var(--academy-accent-hover);
}

.code-example pre {
    margin: 0;
    padding: 16px 18px;
    background: #0d1117;
}

.code-example code {
    font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #e2e8f0;
}

.key-points {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid var(--academy-accent);
    padding: 20px 24px;
    border-radius: 8px;
    margin: 32px 0;
}

.key-points h3 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
}

.key-points ul {
    margin: 0;
    padding-left: 24px;
}

.key-points li {
    margin-bottom: 8px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .lesson-viewer {
        flex-direction: column;
    }

    .lesson-sidebar {
        width: 100%;
        max-height: 250px;
        /* v12: Limit sidebar height to show content sooner */
        border-right: none;
        border-bottom: 1px solid var(--academy-border);
        padding: 16px;
    }

    .lesson-main {
        padding: 24px;
    }

    .lesson-content h1 {
        font-size: 1.75rem;
    }

    .lesson-content h2 {
        font-size: 1.5rem;
    }

    .lesson-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .lesson-sidebar {
        max-height: 200px;
    }

    .lesson-main {
        padding: 16px;
    }
}


.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--academy-surface-hover);
    color: var(--academy-text);
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--academy-accent);
    color: white;
    transform: rotate(90deg);
}

/* Lesson Footer */
.lesson-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 64px;
    padding: 32px;
    background: var(--academy-surface-hover);
    border-radius: 16px;
    border: 1px solid var(--academy-border);
}

.next-lesson-teaser span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--academy-accent);
    letter-spacing: 0.05em;
}

.next-lesson-teaser h3 {
    margin: 4px 0 0 0;
    font-size: 1.25rem;
}

.next-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--academy-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.next-btn:hover {
    background: var(--academy-accent-hover);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .lesson-footer {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
}