/* ══════════════════════════════════════════════════════════════
   RETROSPEED — ORIGINAL APP DESIGN SYSTEM (Neo-Brutalist Arcade Pop)
   Directly ported from c:\Projects\KSM x Tech - Projects\RETROSPEED:
   - Palette: #B9D2E8 (wallpaper), #FDF8EE (paper), #FAF3E0 (alt), #2D2319 (ink),
              #C3A6E8 (lilac), #F6C445 (accent/mustard), #48B89F (mint/teal), #F28B82 (coral)
   - Outlines: 2px - 2.5px solid #2D2319
   - Shadows: 4px - 6px solid retro offset #2D2319
   - Radius: 12px - 20px (rounded neo-brutalist)
   ══════════════════════════════════════════════════════════════ */

:root {
    --rs-wallpaper: #B9D2E8;
    --rs-paper: #FDF8EE;
    --rs-paper-alt: #FAF3E0;
    --rs-ink: #2D2319;
    --rs-titlebar: #C3A6E8;
    --rs-accent: #F6C445;
    --rs-mint: #48B89F;
    --rs-mint-light: #C7E8CA;
    --rs-coral: #F28B82;
    --rs-sky: #4BA3E3;
    --rs-sky-light: #BAE6FD;
    --rs-lilac: #C3A6E8;
    --rs-shadow: #2D2319;
}

body.rs-page {
    background-color: var(--rs-wallpaper);
    color: var(--rs-ink);
    font-family: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* ─── SCATTERED SPARKLE STARS (✦) ────────────────────────── */
.rs-sparkles-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.rs-sparkle {
    position: absolute;
    color: #2D2319;
    font-weight: 900;
    pointer-events: none;
    user-select: none;
}
.rs-sparkle-1 { top: 30px; left: 40px; font-size: 28px; opacity: 0.75; }
.rs-sparkle-2 { top: 90px; right: 80px; font-size: 22px; opacity: 0.6; }
.rs-sparkle-3 { top: 380px; left: 5%; font-size: 24px; opacity: 0.45; }
.rs-sparkle-4 { top: 520px; right: 6%; font-size: 32px; opacity: 0.8; }
.rs-sparkle-5 { top: 820px; left: 8%; font-size: 20px; opacity: 0.5; }

/* ─── RETRO CONTAINER ───────────────────────────────────── */
.rs-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ─── RETRO HERO BANNER ─────────────────────────────────── */
.rs-hero-section {
    padding: 120px 0 40px;
    position: relative;
}

.rs-hero-card {
    background: var(--rs-paper);
    border: 2.5px solid var(--rs-ink);
    border-radius: 20px;
    box-shadow: 6px 6px 0px var(--rs-shadow);
    padding: 44px 40px;
    margin-bottom: 40px;
    position: relative;
}
@media (max-width: 768px) {
    .rs-hero-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
}

.rs-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--rs-accent);
    color: var(--rs-ink);
    border: 1.5px solid var(--rs-ink);
    box-shadow: 2px 2px 0px var(--rs-ink);
    border-radius: 8px;
    padding: 4px 12px;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.rs-hero-deva {
    font-family: var(--display, 'Eczar', serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: #B33A2B;
    margin-bottom: 6px;
}

.rs-hero-title {
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 12px;
    color: var(--rs-ink);
}
.rs-hero-title span.accent {
    color: #B33A2B;
    font-style: italic;
}

.rs-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rs-ink);
    opacity: 0.85;
    margin-bottom: 18px;
}

.rs-hero-desc {
    font-size: 1.12rem;
    line-height: 1.7;
    color: #4A3E31;
    max-width: 68ch;
    margin-bottom: 32px;
}

.rs-hero-cta-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ─── RETRO BUTTONS (PHYSICAL POP) ──────────────────────── */
.rs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid var(--rs-ink);
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.rs-btn:hover {
    transform: translate(-2px, -2px);
}
.rs-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--rs-ink) !important;
}

.rs-btn-mustard {
    background: var(--rs-accent);
    color: var(--rs-ink);
    box-shadow: 4px 4px 0px var(--rs-shadow);
}
.rs-btn-mustard:hover {
    box-shadow: 6px 6px 0px var(--rs-shadow);
}

.rs-btn-white {
    background: #FFFFFF;
    color: var(--rs-ink);
    box-shadow: 3px 3px 0px var(--rs-shadow);
}
.rs-btn-white:hover {
    box-shadow: 5px 5px 0px var(--rs-shadow);
}

/* ─── RETRO OS WINDOW SHELL (EXACT APP CLONE) ───────────── */
.rs-os-window {
    background: var(--rs-paper);
    border: 2.5px solid var(--rs-ink);
    border-radius: 18px;
    box-shadow: 8px 8px 0px var(--rs-shadow);
    overflow: hidden;
    margin: 40px 0 60px;
}

.rs-os-titlebar {
    background: var(--rs-titlebar);
    border-bottom: 2px solid var(--rs-ink);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-weight: 900;
    font-size: 13px;
    color: var(--rs-ink);
}

.rs-os-title {
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rs-os-controls {
    display: flex;
    gap: 6px;
}
.rs-os-ctrl-btn {
    width: 20px;
    height: 20px;
    border: 2px solid var(--rs-ink);
    background: #FDF8EE;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 1.5px 1.5px 0px var(--rs-ink);
}
.rs-os-ctrl-btn.close {
    background: var(--rs-coral);
}

.rs-os-menubar {
    background: var(--rs-paper-alt);
    border-bottom: 2px solid var(--rs-ink);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--rs-ink);
    flex-wrap: wrap;
    gap: 8px;
}
.rs-os-menubar-left {
    display: flex;
    gap: 16px;
}
.rs-os-menubar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.rs-pill-badge {
    padding: 3px 10px;
    border: 1.5px solid var(--rs-ink);
    border-radius: 8px;
    box-shadow: 1.5px 1.5px 0px var(--rs-ink);
    font-size: 11px;
    font-weight: 900;
}
.rs-pill-yellow { background: var(--rs-accent); }
.rs-pill-white { background: #FFFFFF; }

/* Window Body: Sidebar + Main Stage */
.rs-os-body {
    display: grid;
    grid-template-columns: 210px 1fr;
    min-height: 540px;
}
@media (max-width: 900px) {
    .rs-os-body {
        grid-template-columns: 1fr;
    }
    .rs-os-sidebar {
        display: none;
    }
}

.rs-os-sidebar {
    background: var(--rs-paper-alt);
    border-right: 2px solid var(--rs-ink);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rs-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rs-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid var(--rs-ink);
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    background: #FAF3E0;
    box-shadow: 2px 2px 0px var(--rs-ink);
    text-decoration: none;
    color: var(--rs-ink);
}
.rs-sidebar-item.active {
    background: var(--rs-mint-light);
    box-shadow: 3px 3px 0px var(--rs-ink);
    transform: translate(1px, 1px);
}

.rs-sidebar-player {
    background: #FFFFFF;
    border: 2px solid var(--rs-ink);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 3px 3px 0px var(--rs-ink);
}
.rs-player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.rs-player-avatar {
    width: 32px;
    height: 32px;
    background: var(--rs-coral);
    border: 1.5px solid var(--rs-ink);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.rs-player-meta {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}
.rs-player-lvl {
    display: inline-block;
    background: var(--rs-accent);
    padding: 1px 6px;
    border: 1px solid var(--rs-ink);
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 900;
}
.rs-xp-track {
    width: 100%;
    height: 8px;
    background: var(--rs-paper);
    border: 1.5px solid var(--rs-ink);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.rs-xp-fill {
    width: 18%;
    height: 100%;
    background: #10B981;
}

/* Main Stage */
.rs-os-stage {
    padding: 24px;
    background: var(--rs-paper);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Banner 1: Zero-to-Hero Header */
.rs-stage-card-curriculum {
    background: var(--rs-paper-alt);
    border: 2px solid var(--rs-ink);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 4px 4px 0px var(--rs-ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.rs-curriculum-badge {
    display: inline-block;
    background: var(--rs-accent);
    border: 1px solid var(--rs-ink);
    box-shadow: 1.5px 1.5px 0px var(--rs-ink);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 900;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    margin-right: 8px;
}
.rs-curriculum-title {
    font-size: 1.45rem;
    font-weight: 900;
    margin: 4px 0 0;
    color: var(--rs-ink);
}

/* Banner 2: Active Unit Card */
.rs-stage-card-unit {
    background: var(--rs-paper-alt);
    border: 2px solid var(--rs-ink);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 4px 4px 0px var(--rs-ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.rs-unit-meta {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    color: #4A3E31;
    margin-bottom: 6px;
}
.rs-unit-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0 0 6px;
}
.rs-unit-desc {
    font-size: 12.5px;
    color: #4A3E31;
    margin: 0;
    max-width: 520px;
    line-height: 1.5;
}

/* Path Tiles Matrix */
.rs-tiles-header {
    display: flex;
    justify-content: space-between;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 900;
    color: #6B5B49;
    padding: 0 4px;
}
.rs-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 640px) {
    .rs-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.rs-tile {
    border: 2px solid var(--rs-ink);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 3px 3px 0px var(--rs-ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    background: #FFFFFF;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.rs-tile:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px var(--rs-ink);
}
.rs-tile.active-coach {
    background: var(--rs-accent);
    box-shadow: 4px 4px 0px var(--rs-ink);
}
.rs-tile-num {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 900;
}
.rs-tile-badge {
    padding: 2px 7px;
    border: 1px solid var(--rs-ink);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 900;
    font-family: 'Roboto Mono', monospace;
    box-shadow: 1px 1px 0px var(--rs-ink);
}
.rs-tile-center {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}
.rs-tile-keys {
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    font-weight: 900;
    padding: 8px 18px;
    background: #FFFFFF;
    border: 2px solid var(--rs-ink);
    border-radius: 10px;
    box-shadow: 0 3px 0 var(--rs-ink);
}

/* ─── THE 8 WORKSHOP GAMES (ARCADE CARTRIDGE POP) ───────── */
.rs-section-card {
    background: var(--rs-paper);
    border: 2.5px solid var(--rs-ink);
    border-radius: 20px;
    box-shadow: 6px 6px 0px var(--rs-shadow);
    padding: 44px 40px;
    margin-bottom: 40px;
}
@media (max-width: 768px) {
    .rs-section-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
}

.rs-section-header {
    margin-bottom: 36px;
}
.rs-section-num {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 900;
    text-transform: uppercase;
    color: #B33A2B;
    display: block;
    margin-bottom: 8px;
}
.rs-section-h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 12px;
}
.rs-section-h2 span.accent {
    color: #B33A2B;
    font-style: italic;
}

.rs-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.rs-game-card {
    background: #FFFFFF;
    border: 2px solid var(--rs-ink);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 4px 4px 0px var(--rs-ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 140ms ease, box-shadow 140ms ease;
}
.rs-game-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--rs-ink);
}
.rs-game-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.rs-game-icon-box {
    width: 44px;
    height: 44px;
    border: 2px solid var(--rs-ink);
    border-radius: 12px;
    background: var(--rs-paper-alt);
    box-shadow: 2px 2px 0px var(--rs-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.rs-game-tag {
    font-family: 'Roboto Mono', monospace;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1.5px solid var(--rs-ink);
    border-radius: 6px;
    box-shadow: 1.5px 1.5px 0px var(--rs-ink);
}
.rs-game-title {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 8px;
    color: var(--rs-ink);
}
.rs-game-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #4A3E31;
    margin: 0;
}

/* ─── TELEMETRY MATRIX ──────────────────────────────────── */
.rs-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.rs-telemetry-card {
    background: #FFFFFF;
    border: 2px solid var(--rs-ink);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 4px 4px 0px var(--rs-ink);
}
.rs-telemetry-formula {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 900;
    background: var(--rs-paper-alt);
    border: 1.5px solid var(--rs-ink);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 12px 0;
    color: #B33A2B;
}

/* ─── SYNTAX TERMINAL ───────────────────────────────────── */
.rs-code-terminal {
    background: #18121E;
    color: #FAF4E8;
    border: 2.5px solid var(--rs-ink);
    border-radius: 16px;
    box-shadow: 5px 5px 0px var(--rs-ink);
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}
.rs-term-bar {
    background: #2D2319;
    padding: 8px 14px;
    border-bottom: 2px solid #18121E;
    font-size: 11px;
    font-weight: 900;
    color: var(--rs-accent);
}
.rs-term-body {
    padding: 20px;
    overflow-x: auto;
}
