/* ==========================================================================
   MODULE: MULTI-PHASE ORBITAL MECHANICS SIMULATOR
   NASA Mission Control Dashboard — Dark, Precise, Professional
   ========================================================================== */

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes pulse-glow {
    0%   { box-shadow: 0 0 8px rgba(255, 68, 68, 0.4), inset 0 0 8px rgba(255, 68, 68, 0.1); }
    50%  { box-shadow: 0 0 20px rgba(255, 107, 53, 0.7), inset 0 0 12px rgba(255, 107, 53, 0.2); }
    100% { box-shadow: 0 0 8px rgba(255, 68, 68, 0.4), inset 0 0 8px rgba(255, 68, 68, 0.1); }
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-60px, -40px); }
}

@keyframes alert-pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ==========================================================================
   BODY & GLOBAL MODULE OVERRIDES
   ========================================================================== */

body.module-body {
    background-color: var(--color-cosmic-tertiary, #021034);
    color: var(--color-neutral-secondary, #FFFFFF);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

/* ==========================================================================
   ANIMATED STAR BACKGROUND
   ========================================================================== */

.stargazer-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star-layer {
    position: absolute;
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    background-repeat: repeat;
}

.star-layer-1 {
    background-image:
        radial-gradient(1px 1px at 50px 120px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 180px 320px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 400px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 620px 450px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 800px 200px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 950px 550px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 1100px 100px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 1300px 380px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 1500px 250px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 1700px 500px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 1920px 720px;
    animation: drift 80s linear infinite alternate;
}

.star-layer-2 {
    background-image:
        radial-gradient(1.2px 1.2px at 100px 200px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 350px 450px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1.2px 1.2px at 550px 150px, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 750px 380px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.2px 1.2px at 1000px 300px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 1200px 520px, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1.2px 1.2px at 1400px 100px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 1600px 420px, rgba(222, 235, 255, 0.4), transparent);
    background-size: 1800px 680px;
    animation: drift 50s linear infinite alternate-reverse;
}

.star-layer-3 {
    background-image:
        radial-gradient(1.5px 1.5px at 200px 350px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 500px 100px, rgba(222, 235, 255, 0.65), transparent),
        radial-gradient(1.5px 1.5px at 800px 480px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 1100px 220px, rgba(222, 235, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 1450px 350px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 1700px 150px, rgba(222, 235, 255, 0.65), transparent);
    background-size: 1920px 640px;
    animation: drift 30s linear infinite alternate;
}

/* ==========================================================================
   LAB HEADER
   ========================================================================== */

.lab-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(2, 16, 52, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(18, 93, 255, 0.2);
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Override glass-panel pseudo-elements for the header */
.lab-header.glass-panel::before,
.lab-header.glass-panel::after {
    display: none;
}

.lab-header.glass-panel:hover {
    transform: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(18, 93, 255, 0.2);
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-neutral-base, #C4C4C4);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

.back-link:hover {
    color: var(--color-neutral-secondary, #FFFFFF);
    background: rgba(18, 93, 255, 0.1);
}

.back-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.back-link:hover svg {
    opacity: 1;
    transform: translateX(-3px);
}

/* Title Group */
.lab-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.lab-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-neutral-secondary, #FFFFFF);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    margin: 0;
}

.complexity-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-cosmic-secondary, #DEEBFF);
    background: rgba(18, 93, 255, 0.15);
    border: 1px solid rgba(18, 93, 255, 0.35);
    padding: 2px 10px;
    border-radius: 99px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Header Controls Group */
.header-controls-group {
    display: flex;
    align-items: center;
}

/* Mission Tabs */
.mission-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mission-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-neutral-base, #C4C4C4);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 16px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mission-tab:hover {
    color: var(--color-neutral-secondary, #FFFFFF);
    background: rgba(18, 93, 255, 0.06);
}

.mission-tab.active {
    color: var(--color-neutral-secondary, #FFFFFF);
    border-bottom-color: var(--color-cosmic-base, #125DFF);
}

.tab-icon {
    font-size: 0.95rem;
    line-height: 1;
}

/* ==========================================================================
   MAIN WORKSPACE LAYOUT
   ========================================================================== */

.lab-workspace {
    display: flex;
    flex-direction: row;
    flex: 1;
    height: calc(100vh - 56px);
    margin-top: 56px;
    gap: 0;
    overflow: hidden;
}

/* Simulation Pane (Left / 3D Viewport) */
.sim-pane {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* Analysis Pane (Right / Telemetry) */
.analysis-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 420px;
    background: rgba(2, 16, 52, 0.5);
    border-left: 1px solid rgba(222, 235, 255, 0.08);
    overflow: hidden;
}

/* ==========================================================================
   3D VIEWPORT
   ========================================================================== */

.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.webgl-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.webgl-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   VIEWPORT HUD (Top Strip)
   ========================================================================== */

.viewport-hud.top-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-evenly;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(2, 16, 52, 0.75) 0%, transparent 100%);
    z-index: 10;
    pointer-events: none;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 12px;
}

.hud-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(196, 196, 196, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hud-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-cosmic-secondary, #DEEBFF);
    text-shadow: 0 0 6px rgba(18, 93, 255, 0.3);
    white-space: nowrap;
}

/* ==========================================================================
   FLIGHT DIRECTOR OVERLAY
   ========================================================================== */

.flight-director-overlay {
    position: absolute;
    top: 60px;
    right: 16px;
    width: 320px;
    z-index: 15;
    background: rgba(10, 14, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(222, 235, 255, 0.08);
    border-radius: 6px;
    padding: 16px 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.director-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.director-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-cosmic-base, #125DFF);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Status Indicator */
.status-indicator {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-preflight {
    color: #ffd000;
}

.status-preflight::before {
    background: #ffd000;
    box-shadow: 0 0 6px rgba(255, 208, 0, 0.6);
}

.status-active {
    color: #00e676;
}

.status-active::before {
    background: #00e676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.6);
    animation: alert-pulse 1.5s ease-in-out infinite;
}

.status-alert {
    color: #ff4444;
}

.status-alert::before {
    background: #ff4444;
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.6);
    animation: alert-pulse 0.8s ease-in-out infinite;
}

/* Director Content */
.director-step-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-neutral-secondary, #FFFFFF);
    margin: 0 0 6px 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.director-step-desc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    color: var(--color-neutral-base, #C4C4C4);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* Director Progress Bar */
.director-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.director-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #125DFF, #00d4ff);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   NAVBALL & AUTOPILOT
   ========================================================================== */

.navball-container {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 15;
    pointer-events: auto;
}

#navball-canvas {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(222, 235, 255, 0.15);
    box-shadow:
        0 0 16px rgba(0, 0, 0, 0.5),
        inset 0 0 12px rgba(18, 93, 255, 0.1);
    background: rgba(2, 16, 52, 0.6);
}

.autopilot-group {
    display: flex;
    gap: 4px;
}

.ap-btn {
    width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 30, 0.75);
    border: 1px solid rgba(222, 235, 255, 0.1);
    border-radius: 4px;
    color: var(--color-neutral-base, #C4C4C4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ap-btn:hover {
    color: var(--color-neutral-secondary, #FFFFFF);
    border-color: rgba(18, 93, 255, 0.4);
    background: rgba(18, 93, 255, 0.1);
}

.ap-btn.active {
    color: var(--color-neutral-secondary, #FFFFFF);
    border-color: var(--color-cosmic-base, #125DFF);
    background: rgba(18, 93, 255, 0.2);
    box-shadow: 0 0 10px rgba(18, 93, 255, 0.3);
}

/* Camera Mode Toggle */
.cam-mode-group {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 2px;
    background: rgba(10, 14, 30, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(222, 235, 255, 0.1);
    border-radius: 99px;
    padding: 3px;
    pointer-events: auto;
}

.cam-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-neutral-base, #C4C4C4);
    background: transparent;
    border: none;
    border-radius: 99px;
    padding: 5px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cam-btn:hover {
    color: var(--color-neutral-secondary, #FFFFFF);
    background: rgba(18, 93, 255, 0.15);
}

.cam-btn.active {
    color: #FFFFFF;
    background: rgba(18, 93, 255, 0.35);
    box-shadow: 0 0 10px rgba(18, 93, 255, 0.3);
}

/* Tab Divider */
.tab-divider {
    width: 1px;
    height: 20px;
    background: rgba(222, 235, 255, 0.15);
    align-self: center;
    margin: 0 4px;
}

/* Demo Tab */
.demo-tab {
    background: rgba(68, 255, 136, 0.08) !important;
    border-color: rgba(68, 255, 136, 0.2) !important;
}
.demo-tab:hover {
    background: rgba(68, 255, 136, 0.15) !important;
    border-color: rgba(68, 255, 136, 0.4) !important;
}
.demo-tab .tab-icon {
    color: #44ff88;
}

/* Demo Running Indicator */
.demo-indicator {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 250;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 14, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(68, 255, 136, 0.3);
    border-radius: 99px;
    padding: 8px 20px;
    box-shadow: 0 4px 24px rgba(68, 255, 136, 0.15);
}

.demo-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #44ff88;
    animation: alert-pulse 1s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(68, 255, 136, 0.6);
}

.demo-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #44ff88;
    letter-spacing: 2px;
}

.demo-step {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--color-neutral-base, #C4C4C4);
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-stop-demo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 99px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-stop-demo:hover {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.5);
}

/* ==========================================================================
   CONTROLS DOCK (Bottom Bar)
   ========================================================================== */

.controls-dock {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    background: rgba(2, 16, 52, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(222, 235, 255, 0.08);
    flex-shrink: 0;
}

/* Control Groups */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 120px;
    max-width: 220px;
}

.control-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-neutral-base, #C4C4C4);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.control-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--color-cosmic-base, #125DFF);
    font-size: 0.65rem;
}

/* ==========================================================================
   CUSTOM RANGE SLIDERS
   ========================================================================== */

.sim-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

.sim-slider:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* WebKit Thumb (default cosmic-base) */
.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-cosmic-base, #125DFF);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(18, 93, 255, 0.5), 0 0 2px rgba(18, 93, 255, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sim-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 14px rgba(18, 93, 255, 0.7), 0 0 4px rgba(18, 93, 255, 0.9);
}

/* Firefox Thumb */
.sim-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-cosmic-base, #125DFF);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(18, 93, 255, 0.5);
}

.sim-slider::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    border: none;
}

/* Throttle Slider — Orange */
.slider-throttle::-webkit-slider-thumb {
    background: #ff6b35;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.5), 0 0 2px rgba(255, 107, 53, 0.8);
}

.slider-throttle::-webkit-slider-thumb:hover {
    box-shadow: 0 0 14px rgba(255, 107, 53, 0.7), 0 0 4px rgba(255, 107, 53, 0.9);
}

.slider-throttle::-moz-range-thumb {
    background: #ff6b35;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

/* Pitch Slider — Cyan */
.slider-pitch::-webkit-slider-thumb {
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5), 0 0 2px rgba(0, 212, 255, 0.8);
}

.slider-pitch::-webkit-slider-thumb:hover {
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.7), 0 0 4px rgba(0, 212, 255, 0.9);
}

.slider-pitch::-moz-range-thumb {
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ==========================================================================
   CONTROL ACTIONS
   ========================================================================== */

.control-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Ignition Button */
.btn-ignition {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-neutral-secondary, #FFFFFF);
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 16px rgba(255, 68, 68, 0.25);
    white-space: nowrap;
}

.btn-ignition:hover {
    background: linear-gradient(135deg, #ff5555, #ff7b45);
    box-shadow: 0 6px 24px rgba(255, 68, 68, 0.45);
    transform: translateY(-1px);
}

.btn-ignition:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 68, 68, 0.3);
}

.btn-ignition.ready {
    animation: pulse-glow 1.8s ease-in-out infinite;
}

/* Control Buttons (Pause, Reset) */
.btn-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--color-neutral-base, #C4C4C4);
    background: rgba(10, 14, 30, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(222, 235, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

.btn-control:hover {
    color: var(--color-neutral-secondary, #FFFFFF);
    border-color: rgba(18, 93, 255, 0.3);
    background: rgba(18, 93, 255, 0.1);
}

/* ==========================================================================
   ANALYSIS PANE — Header
   ========================================================================== */

.pane-header {
    padding: 16px 20px;
    background: rgba(2, 16, 52, 0.95);
    border-bottom: 1px solid rgba(222, 235, 255, 0.08);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.pane-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-neutral-secondary, #FFFFFF);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 2px 0;
    font-variant: small-caps;
}

.pane-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(196, 196, 196, 0.6);
    letter-spacing: 0.5px;
    margin: 0;
}

/* ==========================================================================
   ANALYSIS PANE — Scrollable Content
   ========================================================================== */

.pane-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(18, 93, 255, 0.3) transparent;
}

.pane-scroll-content::-webkit-scrollbar {
    width: 6px;
}

.pane-scroll-content::-webkit-scrollbar-track {
    background: transparent;
}

.pane-scroll-content::-webkit-scrollbar-thumb {
    background: rgba(18, 93, 255, 0.25);
    border-radius: 3px;
}

.pane-scroll-content::-webkit-scrollbar-thumb:hover {
    background: rgba(18, 93, 255, 0.45);
}

/* ==========================================================================
   TELEMETRY GRID
   ========================================================================== */

.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tel-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.tel-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(10, 14, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(222, 235, 255, 0.08);
    border-radius: 6px;
    padding: 12px 16px;
    transition: border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tel-box:hover {
    border-color: rgba(18, 93, 255, 0.2);
}

.tel-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-neutral-base, #C4C4C4);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.tel-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-neutral-secondary, #FFFFFF);
    line-height: 1.2;
}

/* ==========================================================================
   RENDEZVOUS PANEL
   ========================================================================== */

.rendezvous-panel {
    border-top: 1px solid rgba(222, 235, 255, 0.08);
    margin-top: 16px;
    padding-top: 16px;
}

.subsection-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-cosmic-base, #125DFF);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

/* ==========================================================================
   PROPULSION CARD
   ========================================================================== */

.propulsion-card {
    background: rgba(10, 14, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(222, 235, 255, 0.08);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prop-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--color-neutral-base, #C4C4C4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prop-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-neutral-secondary, #FFFFFF);
}

/* Fuel Bar */
.fuel-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}

.fuel-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #125DFF);
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fuel-bar-fill.warning {
    background: linear-gradient(90deg, #ffaa00, #ff6600);
}

.fuel-bar-fill.critical {
    background: linear-gradient(90deg, #ff0044, #ff4444);
    animation: alert-pulse 0.8s ease-in-out infinite;
}

/* Propulsion Details Grid */
.prop-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.prop-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ==========================================================================
   CHART CARD
   ========================================================================== */

.chart-card {
    margin-top: 16px;
    background: transparent;
}

.chart-container {
    height: 180px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   EDUCATIONAL CARD
   ========================================================================== */

.edu-card {
    margin-top: 16px;
    padding: 20px;
}

/* Override glass-panel hover for edu-card to avoid unwanted transform */
.edu-card.glass-panel:hover {
    transform: translateY(-1px);
}

.edu-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-cosmic-secondary, #DEEBFF);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.edu-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-neutral-base, #C4C4C4);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   MODAL OVERLAYS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-card {
    max-width: 440px;
    width: 90%;
    padding: 40px;
    text-align: center;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(18, 93, 255, 0.08);
}

.modal-crash {
    border-color: rgba(255, 68, 68, 0.3);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 68, 68, 0.1);
}

.modal-crash.glass-panel::before {
    border-color: #ff4444;
}

.modal-crash.glass-panel::after {
    border-color: #ff4444;
}

.modal-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-neutral-secondary, #FFFFFF);
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.modal-desc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: var(--color-neutral-base, #C4C4C4);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
