/* ============================================
   PyMaster — Premium Dark Theme SaaS Styles
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1423;
    --bg-tertiary: #151b2e;
    --bg-card: rgba(22, 28, 48, 0.7);
    --bg-card-solid: #161c30;
    --bg-card-hover: #1c2440;
    --bg-code: #0d1117;
    --bg-sidebar: #0c1120;
    --bg-input: #151b2e;

    --text-primary: #e8ecf4;
    --text-secondary: #9ca3b8;
    --text-muted: #5d6580;
    --text-code: #c9d1d9;

    --accent-primary: #7c6cf0;
    --accent-secondary: #a89afe;
    --accent-gradient: linear-gradient(135deg, #7c6cf0 0%, #a89afe 50%, #6ec1e4 100%);
    --accent-glow: rgba(124, 108, 240, 0.25);

    --green: #00cec9;
    --green-soft: rgba(0, 206, 201, 0.12);
    --orange: #fdcb6e;
    --pink: #fd79a8;
    --red: #ff6b6b;

    --border-soft: rgba(255, 255, 255, 0.06);
    --border-active: rgba(124, 108, 240, 0.4);

    --sidebar-width: 310px;
    --nav-height: 62px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 40px rgba(124, 108, 240, 0.12);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #2a3050;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4570;
}

/* ==============================
   TOP NAVIGATION
   ============================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search */
.nav-center {
    flex: 1;
    max-width: 480px;
    margin: 0 24px;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    max-height: 380px;
    overflow-y: auto;
    display: none;
    z-index: 200;
    box-shadow: var(--shadow-lg);
}

.search-result-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-result-item .sr-topic {
    display: block;
    font-size: 0.68rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-bottom: 2px;
}

.search-result-item .sr-sub {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
}

.search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Progress */
.nav-right {
    display: flex;
    align-items: center;
}

.progress-badge {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    width: 38px;
    height: 38px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 3;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.progress-text {
    position: absolute;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-soft);
    overflow-y: auto;
    z-index: 900;
    transition: transform 0.3s var(--ease);
}

.sidebar-header {
    padding: 20px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    z-index: 2;
}

.sidebar-header h3 {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.topic-count {
    font-size: 0.65rem;
    background: var(--accent-primary);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-content {
    padding: 6px 0;
}

/* Sidebar Topic Accordion */
.sidebar-topic {
    border-bottom: 1px solid var(--border-soft);
}

.topic-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
    transition: var(--transition);
    text-align: left;
}

.topic-btn:hover {
    background: rgba(124, 108, 240, 0.05);
}

.topic-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-topic.active .topic-number {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 12px var(--accent-glow);
}

.topic-title {
    flex: 1;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
}

.chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sidebar-topic.active .chevron {
    transform: rotate(180deg);
    color: var(--accent-secondary);
}

/* Subtopic List */
.subtopic-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
    background: rgba(0, 0, 0, 0.15);
}

.subtopic-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px 10px 56px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: left;
    transition: var(--transition);
    position: relative;
}

.subtopic-btn::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-soft);
}

.subtopic-btn:hover {
    background: rgba(124, 108, 240, 0.06);
    color: var(--text-primary);
}

.subtopic-btn.current {
    background: rgba(124, 108, 240, 0.1);
    color: var(--accent-secondary);
    font-weight: 600;
}

.subtopic-btn.current::before {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

.subtopic-btn.completed {
    color: var(--green);
}

.subtopic-btn.completed::before {
    background: rgba(0, 206, 201, 0.4);
}

.subtopic-indicator {
    width: 18px;
    font-size: 0.7rem;
    color: var(--green);
    text-align: center;
    flex-shrink: 0;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 899;
}

.sidebar-overlay.active {
    display: block;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* ==============================
   HERO SECTION
   ============================== */
.hero {
    position: relative;
    padding: 80px 48px 60px;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background decoration */
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(124, 108, 240, 0.12), transparent 65%);
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(110, 193, 228, 0.08), transparent 65%);
    pointer-events: none;
    animation: heroGlow 8s ease-in-out 4s infinite;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(124, 108, 240, 0.06), transparent 60%);
    pointer-events: none;
}

@keyframes heroGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.hero-content {
    max-width: 760px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 22px;
    background: rgba(124, 108, 240, 0.1);
    border: 1px solid rgba(124, 108, 240, 0.2);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.12;
    margin-bottom: 22px;
    letter-spacing: -1.5px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

/* Stats Row */
.hero-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* CTA */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(124, 108, 240, 0.4);
    animation: fadeInUp 0.6s ease 0.4s both;
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 36px rgba(124, 108, 240, 0.55);
}

.hero-cta:hover::before {
    opacity: 1;
}

/* Topic Chips */
.hero-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 48px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.hero-topic-chip:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.chip-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    color: white;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   TOPIC CONTENT (Lesson View)
   ============================== */
.topic-content {
    padding: 36px 56px 80px;
    max-width: 880px;
    margin: 0 auto;
    animation: fadeInContent 0.35s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.content-header {
    margin-bottom: 32px;
}

.breadcrumb {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bread-home {
    cursor: pointer;
    color: var(--accent-secondary);
    transition: var(--transition);
}

.bread-home:hover {
    text-decoration: underline;
}

.bread-topic {
    color: var(--text-secondary);
}

.bread-sub {
    color: var(--text-muted);
}

.content-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-nav-btns {
    display: flex;
    gap: 10px;
}

/* Nav Buttons */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}

.nav-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

/* ==============================
   SECTION BLOCKS
   ============================== */
.section-block {
    margin-bottom: 44px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
}

.section-icon {
    font-size: 1.15rem;
}

/* --- Explanation --- */
.explanation-text {
    font-size: 0.98rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.explanation-text p {
    margin-bottom: 14px;
}

.explanation-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.explanation-text code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84em;
    background: var(--bg-code);
    padding: 2px 8px;
    border-radius: 5px;
    color: var(--accent-secondary);
    border: 1px solid var(--border-soft);
}

.explanation-text ul,
.explanation-text ol {
    margin: 10px 0 14px 22px;
}

.explanation-text li {
    margin-bottom: 6px;
}

.key-point {
    background: rgba(124, 108, 240, 0.06);
    border-left: 3px solid var(--accent-primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.key-point code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84em;
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-secondary);
}

/* --- Code Examples --- */
.example-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 22px;
    transition: var(--transition);
}

.example-card:hover {
    border-color: rgba(124, 108, 240, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-soft);
}

.example-number {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-secondary);
    background: rgba(124, 108, 240, 0.12);
    padding: 3px 10px;
    border-radius: 6px;
}

.example-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-active);
}

/* Code Block */
.code-block {
    position: relative;
    background: var(--bg-code);
    overflow-x: auto;
}

.code-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block pre {
    padding: 12px 20px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--text-code);
    white-space: pre;
    margin: 0;
}

/* Output Block */
.output-block {
    padding: 14px 20px;
    background: rgba(0, 206, 201, 0.03);
    border-top: 1px solid var(--border-soft);
}

.output-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.output-block pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--green);
    white-space: pre-wrap;
    line-height: 1.65;
    margin: 0;
}

/* Example Explanation */
.example-explanation {
    padding: 14px 20px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.example-explanation strong {
    color: var(--text-primary);
}

.example-explanation code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
    background: var(--bg-code);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent-secondary);
}

/* --- Practice Problems --- */
.practice-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    transition: var(--transition);
}

.practice-card:hover {
    border-color: rgba(124, 108, 240, 0.15);
}

.practice-header {
    padding: 14px 20px 0;
}

.practice-number {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--orange);
    background: rgba(253, 203, 110, 0.1);
    padding: 3px 10px;
    border-radius: 6px;
}

.practice-question {
    padding: 12px 20px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.6;
}

.reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 20px 16px;
    padding: 8px 18px;
    background: rgba(124, 108, 240, 0.08);
    border: 1px solid rgba(124, 108, 240, 0.2);
    border-radius: 8px;
    color: var(--accent-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.reveal-btn:hover {
    background: rgba(124, 108, 240, 0.15);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Practice Answer */
.practice-answer {
    border-top: 1px solid var(--border-soft);
    animation: fadeInContent 0.3s ease;
}

.practice-answer .code-block {
    border-radius: 0;
}

.practice-explanation {
    padding: 14px 20px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--border-soft);
}

.practice-explanation code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
    background: var(--bg-code);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent-secondary);
}

/* ==============================
   BOTTOM NAV & MARK COMPLETE
   ============================== */
.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    gap: 12px;
}

.mark-complete-btn {
    padding: 11px 24px;
    background: var(--green-soft);
    border: 1px solid rgba(0, 206, 201, 0.2);
    border-radius: var(--radius-sm);
    color: var(--green);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.mark-complete-btn:hover {
    background: rgba(0, 206, 201, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 206, 201, 0.15);
}

.mark-complete-btn.done {
    background: var(--green);
    color: var(--bg-primary);
    border-color: var(--green);
    font-weight: 700;
}

/* ==============================
   ANIMATION HELPER
   ============================== */
.anim-in {
    animation: fadeInUp 0.4s ease both;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 60px 28px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .topic-content {
        padding: 28px 24px 60px;
    }

    .nav-center {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 0.92rem;
    }

    .stat-card {
        padding: 14px 18px;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .hero-topics {
        gap: 8px;
    }

    .hero-topic-chip {
        font-size: 0.72rem;
        padding: 7px 14px;
    }

    .content-title {
        font-size: 1.5rem;
    }

    .bottom-nav {
        flex-direction: column;
    }

    .content-nav-btns {
        flex-wrap: wrap;
    }

    .code-block pre {
        font-size: 0.76rem;
    }
}