@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;800&family=Fira+Code&display=swap');

:root {
    /* Mars Theme Primary */
    --rescue-orange: #ff6b35; 
    --mars-rust: #c1440e;
    --primary-green: var(--mars-rust); /* Mapping legacy green to rust */
    
    --limestone: #e2e8f0;
    --deep-cave: #0b0d17;
    --cave-gray: #1e293b;
    --tech-blue: #4cc9f0;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Legacy/Alias */
    --mars-orange: var(--rescue-orange); 
    --deep-space: var(--deep-cave);
    --space-gray: var(--cave-gray);
    --nebula-blue: var(--tech-blue);
}

body {
    background: var(--deep-space);
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    line-height: 1.7;
    margin: 0;
}

.lesson-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.sticky-chapter-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 13, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-chapter-num {
    background: var(--mars-rust);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-right a {
    color: var(--text-slate);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-right a:hover {
    color: white;
}

.lesson-header {
    margin-bottom: 4rem;
}

.lesson-meta {
    color: var(--mars-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: white;
}

h2 {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    color: white;
    border-left: 4px solid var(--nebula-blue);
    padding-left: 1rem;
}

h3 {
    margin: 2rem 0 1rem;
    color: var(--mars-orange);
}

p {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

strong {
    color: white;
}

blockquote {
    background: var(--glass);
    border-left: 4px solid var(--mars-rust);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}

.lab-box {
    background: var(--space-gray);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.lab-box h3 {
    margin-top: 0;
}

pre {
    background: #000;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid #334155;
    margin-bottom: 1.5rem;
}

code {
    font-family: 'Fira Code', monospace;
    color: var(--nebula-blue);
}

.view-lesson-btn {
    display: inline-block;
    background: var(--nebula-blue);
    color: var(--deep-space);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    margin-top: 3rem;
    transition: all 0.3s;
}

.view-lesson-btn:hover {
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.4);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 4rem 0;
}

#local-to-global-box {
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(193, 68, 14, 0.1), transparent);
    border-radius: 16px;
    border: 1px solid rgba(193, 68, 14, 0.2);
}
