

/* ==========================================================
   ASTROVIA — SPACE MISSION SIMULATOR
   Professional responsive space-interface stylesheet
   ========================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */

:root {
    color-scheme: dark;

    --bg: #030712;
    --bg-raised: #081120;
    --panel: rgba(9, 18, 34, 0.94);
    --panel-light: rgba(18, 31, 52, 0.95);

    --border: rgba(148, 180, 220, 0.17);
    --border-bright: rgba(95, 177, 255, 0.42);

    --text: #edf4ff;
    --muted: #9aaac1;
    --subtle: #687b95;

    --blue: #4aa8ff;
    --cyan: #5be4ed;
    --green: #5be3ac;
    --orange: #ffb45e;
    --red: #ff6f83;

    --radius: 12px;
    --radius-small: 7px;

    --header-height: 66px;
    --nav-width: 190px;

    --shadow:
        0 16px 44px rgba(0, 0, 0, 0.34);

    --glow:
        0 0 22px rgba(74, 168, 255, 0.12);

    --font:
        Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 2. RESET ---------- */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

::selection {
    color: white;
    background: rgba(74, 168, 255, 0.35);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2a3d57;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #456386;
}

/* ---------- 3. LOADING SCREEN ---------- */

#loading-screen {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            ellipse at center,
            #10223d 0%,
            #050b17 48%,
            #02050c 100%
        );
}

.loading-content {
    width: min(340px, calc(100% - 40px));
    text-align: center;
}

.loading-logo {
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 8px;
    text-shadow: 0 0 30px rgba(91, 228, 237, 0.3);
}

.loading-content p {
    color: var(--muted);
}

.loading-progress {
    height: 4px;
    margin: 24px 0 14px;
    overflow: hidden;
    background: #17263a;
    border-radius: 10px;
}

#loading-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: inherit;
    box-shadow: 0 0 15px rgba(91, 228, 237, 0.5);
    transition: width 0.35s ease;
}

.loading-subtitle {
    font-size: 10px;
    letter-spacing: 3px;
}

/* ---------- 4. APPLICATION AND VIEWPORT ---------- */

#app {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 450px;
    overflow: hidden;
    isolation: isolate;
    background: var(--bg);
}

#three-container {
    position: absolute;
    inset: var(--header-height) 0 0 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 55% 45%,
            #0b1b32 0%,
            #030712 65%
        );
}

#three-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Subtle viewport framing */

#three-container::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(
            180deg,
            rgba(3, 7, 18, 0.12),
            transparent 15%,
            transparent 75%,
            rgba(3, 7, 18, 0.25)
        );
}

/* ---------- 5. TOP BAR ---------- */

.top-bar {
    position: absolute;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--header-height);
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(4, 10, 21, 0.96);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 180px;
}

.brand-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--cyan);
    background: rgba(91, 228, 237, 0.09);
    border: 1px solid rgba(91, 228, 237, 0.24);
    border-radius: 10px;
    font-size: 21px;
    box-shadow: var(--glow);
}

.brand h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 3px;
}

.brand span {
    display: block;
    margin-top: 1px;
    color: var(--subtle);
    font-size: 9px;
    letter-spacing: 2.1px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c6d5e9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(91, 227, 172, 0.65);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- 6. BUTTONS ---------- */

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.secondary-button,
.launch-button,
.danger-button,
.button-row button,
.attitude-controls button {
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: rgba(22, 36, 57, 0.85);
    color: #dbe8f8;
    font-size: 11px;
    font-weight: 700;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.secondary-button:hover,
.button-row button:hover,
.attitude-controls button:hover {
    border-color: var(--border-bright);
    background: rgba(35, 57, 84, 0.95);
}

.launch-button {
    border-color: rgba(91, 228, 237, 0.4);
    background: linear-gradient(135deg, #1476b8, #176c9b);
    color: #fff;
    box-shadow: 0 4px 16px rgba(20, 118, 184, 0.15);
}

.launch-button:hover {
    border-color: var(--cyan);
    background: linear-gradient(135deg, #1687cf, #1987ac);
    box-shadow: 0 0 20px rgba(91, 228, 237, 0.16);
}

.danger-button {
    border-color: rgba(255, 111, 131, 0.3);
    background: rgba(125, 35, 53, 0.2);
    color: #ffabb7;
}

.danger-button:hover {
    background: rgba(160, 41, 61, 0.35);
    border-color: rgba(255, 111, 131, 0.6);
}

button:active {
    transform: translateY(1px);
}

/* ---------- 7. SIDE NAVIGATION ---------- */

.side-navigation {
    position: absolute;
    z-index: 50;
    top: calc(var(--header-height) + 20px);
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: var(--nav-width);
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(6, 14, 27, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    font-size: 11px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-button > span:first-child {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    color: #8ca5c4;
    font-size: 16px;
}

.nav-button:hover {
    background: rgba(35, 57, 84, 0.45);
    color: var(--text);
}

.nav-button.active {
    border-color: rgba(74, 168, 255, 0.2);
    background:
        linear-gradient(
            90deg,
            rgba(42, 131, 208, 0.2),
            rgba(42, 131, 208, 0.04)
        );
    color: #fff;
}

.nav-button.active > span:first-child {
    color: var(--cyan);
}

/* ---------- 8. PANELS ---------- */

.interface-panel {
    position: absolute;
    z-index: 40;
    top: calc(var(--header-height) + 20px);
    right: 18px;
    display: none;
    width: min(350px, calc(100% - 36px));
    max-height: calc(100% - var(--header-height) - 85px);
    padding: 23px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    scrollbar-gutter: stable;
}

.interface-panel.visible {
    display: block;
    animation: panel-enter 0.2s ease-out;
}

@keyframes panel-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.interface-panel h2 {
    margin: 0 0 9px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.45px;
}

.interface-panel h3 {
    margin: 21px 0 10px;
    color: #d9e6f8;
    font-size: 12px;
    font-weight: 750;
}

.interface-panel p {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan) !important;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 21px;
    line-height: 1;
}

.panel-close:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.help-text {
    color: var(--subtle) !important;
    font-size: 10px;
    line-height: 1.7;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.button-row button {
    flex: 1 1 auto;
}

/* ---------- 9. PLANET INFORMATION ---------- */

.planet-stats,
.stats-grid,
.flight-telemetry {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 65px;
    padding: 11px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(148, 180, 220, 0.12);
    border-radius: 8px;
    background: rgba(16, 29, 48, 0.8);
}

.stat-item span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 600;
}

.stat-item strong {
    color: #e7f2ff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

/* ---------- 10. ROCKET BUILDER ---------- */

.interface-panel.large-panel {
    width: min(790px, calc(100% - 36px));
    max-height: calc(100% - var(--header-height) - 85px);
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    margin-top: 17px;
}

.parts-library,
.rocket-assembly {
    min-width: 0;
}

.parts-library h3,
.rocket-assembly h3 {
    margin-top: 0;
}

.part-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.part-grid button {
    min-height: 43px;
    padding: 9px 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(20, 34, 55, 0.8);
    color: #c9d8ec;
    font-size: 10px;
    text-align: left;
    transition: 0.18s ease;
}

.part-grid button:hover {
    border-color: var(--border-bright);
    background: rgba(31, 62, 94, 0.8);
    color: white;
}

#rocket-builder-view {
    position: relative;
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background:
        radial-gradient(
            ellipse at center,
            rgba(29, 65, 100, 0.28),
            rgba(5, 12, 24, 0.8) 75%
        );
}

#rocket-builder-view::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(114, 163, 211, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(114, 163, 211, 0.12) 1px, transparent 1px);
    background-size: 20px 20px;
}

#builder-rocket {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-height: 240px;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    overflow: auto;
}

.empty-builder {
    margin: auto;
    padding: 20px 5px;
    text-align: center;
    font-size: 11px;
}

.rocket-part-item {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid rgba(95, 177, 255, 0.18);
    border-radius: 6px;
    background: rgba(29, 54, 81, 0.76);
    color: #d9eaff;
    text-align: left;
    font-size: 10px;
    transition: 0.18s ease;
}

.rocket-part-item::after {
    float: right;
    color: var(--red);
    content: "×";
    font-size: 15px;
    line-height: 12px;
}

.rocket-part-item:hover {
    border-color: rgba(255, 111, 131, 0.55);
    background: rgba(82, 38, 52, 0.7);
}

.builder-actions {
    margin-top: 12px;
}

.vehicle-data {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.vehicle-data h3 {
    margin-top: 0;
}

.vehicle-data .stat-item {
    min-height: 58px;
}

.vehicle-data .stat-item strong {
    color: var(--cyan);
}

/* ---------- 11. MISSIONS ---------- */

.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 17px;
}

.mission-card {
    display: flex;
    min-height: 120px;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background:
        linear-gradient(
            145deg,
            rgba(26, 48, 76, 0.75),
            rgba(10, 20, 36, 0.8)
        );
    text-align: left;
    transition: 0.2s ease;
}

.mission-card > span {
    color: var(--cyan);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.mission-card strong {
    color: #edf5ff;
    font-size: 12px;
}

.mission-card small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.mission-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-bright);
    box-shadow: var(--glow);
}

/* ---------- 12. SPACE STATION ---------- */

#station-view {
    position: relative;
    min-height: 170px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background:
        radial-gradient(
            ellipse at 50% 110%,
            rgba(42, 112, 182, 0.45),
            transparent 70%
        ),
        #07101f;
}

#station-view::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: 0.3;
    background-image: radial-gradient(#b9d5ff 1px, transparent 1px);
    background-size: 31px 27px;
}

#station-docking-button {
    width: 100%;
    margin-top: 14px;
}

/* ---------- 13. FLIGHT CONTROL PANEL ---------- */

.interface-panel.flight-panel {
    width: min(360px, calc(100% - 36px));
}

.flight-panel h2 {
    font-size: 18px;
}

.flight-panel > p:not(.eyebrow) {
    margin: 4px 0 14px;
    font-size: 11px;
}

.flight-telemetry {
    gap: 7px;
}

.flight-telemetry .stat-item {
    min-height: 57px;
    padding: 9px;
}

.flight-telemetry .stat-item strong {
    font-size: 11px;
}

#flight-hud label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

#throttle {
    width: 100%;
    height: 6px;
    margin: 8px 0 16px;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 10px;
    background: #23364e;
    cursor: pointer;
}

#throttle::-webkit-slider-thumb {
    width: 17px;
    height: 17px;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(74, 168, 255, 0.45);
}

#throttle::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--blue);
}

.flight-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flight-actions button {
    min-height: 37px;
}

.attitude-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 10px 0;
}

.attitude-controls button {
    min-height: 42px;
    font-size: 19px;
}

/* ---------- 14. COUNTDOWN ---------- */

#countdown-overlay {
    position: absolute;
    z-index: 300;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(2, 7, 16, 0.58);
    backdrop-filter: blur(4px);
    text-align: center;
}

#countdown-overlay[hidden],
#event-message[hidden],
#notification[hidden] {
    display: none !important;
}

#countdown-overlay p {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 4px;
}

#countdown-number {
    color: white;
    font-size: clamp(76px, 15vw, 150px);
    font-weight: 900;
    line-height: 1.1;
    text-shadow:
        0 0 20px rgba(74, 168, 255, 0.5),
        0 0 65px rgba(74, 168, 255, 0.24);
    animation: countdown-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes countdown-pulse {
    from {
        transform: scale(0.96);
        opacity: 0.8;
    }

    to {
        transform: scale(1.03);
        opacity: 1;
    }
}

/* ---------- 15. EVENT MESSAGE ---------- */

#event-message {
    position: absolute;
    z-index: 200;
    top: calc(var(--header-height) + 18px);
    left: 50%;
    width: max-content;
    max-width: calc(100% - 30px);
    padding: 12px 19px;
    transform: translateX(-50%);
    border: 1px solid rgba(91, 228, 237, 0.4);
    border-radius: 8px;
    background: rgba(4, 19, 33, 0.93);
    color: var(--cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-align: center;
    box-shadow: var(--glow);
    backdrop-filter: blur(12px);
}

/* ---------- 16. NOTIFICATIONS ---------- */

#notification {
    position: absolute;
    z-index: 500;
    right: 20px;
    bottom: 56px;
    max-width: min(370px, calc(100% - 40px));
    padding: 12px 16px;
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    background: rgba(8, 21, 38, 0.97);
    color: #e5f2ff;
    font-size: 11px;
    line-height: 1.7;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

#notification.visible {
    animation: notification-enter 0.2s ease-out;
}

@keyframes notification-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 17. BOTTOM STATUS ---------- */

#bottom-status {
    position: absolute;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 35px;
    padding: 0 20px;
    border-top: 1px solid var(--border);
    background: rgba(4, 10, 21, 0.88);
    color: var(--subtle);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.2px;
    backdrop-filter: blur(10px);
}

#simulation-status {
    color: var(--green);
}

/* ---------- 18. SPACE SCIENCE CONTENT ---------- */

#theories-panel article {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(18, 31, 51, 0.6);
}

#theories-panel article h3 {
    margin: 0 0 8px;
    color: var(--cyan);
}

#theories-panel article p {
    margin: 0;
    font-size: 11px;
    line-height: 1.8;
}

/* ---------- 19. RESPONSIVE LAYOUT ---------- */

@media (max-width: 1000px) {
    :root {
        --nav-width: 165px;
    }

    .top-bar {
        padding: 0 15px;
    }

    .side-navigation {
        left: 10px;
    }

    .interface-panel {
        right: 10px;
        width: min(335px, calc(100% - 20px));
        padding: 19px;
    }

    .interface-panel.large-panel {
        width: min(690px, calc(100% - 20px));
    }

    .builder-layout {
        grid-template-columns: 1fr;
    }

    #rocket-builder-view {
        min-height: 180px;
    }

    #builder-rocket {
        max-height: 160px;
    }
}

@media (max-width: 700px) {
    :root {
        --header-height: 59px;
    }

    body {
        font-size: 12px;
    }

    #app {
        min-height: 500px;
    }

    .top-bar {
        gap: 8px;
        padding: 0 10px;
    }

    .brand {
        min-width: 0;
        gap: 7px;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 17px;
    }

    .brand h1 {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .brand span {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .header-status {
        gap: 6px;
        font-size: 8px;
        letter-spacing: 0.8px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions button {
        min-height: 31px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .side-navigation {
        top: auto;
        right: 8px;
        bottom: 43px;
        left: 8px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        gap: 5px;
        width: auto;
        padding: 6px;
        overflow-x: auto;
        border-radius: 10px;
        scrollbar-width: none;
    }

    .side-navigation::-webkit-scrollbar {
        display: none;
    }

    .nav-button {
        display: flex;
        width: auto;
        min-width: 65px;
        min-height: 51px;
        flex: 0 0 auto;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 5px 9px;
        text-align: center;
        font-size: 8px;
    }

    .nav-button > span:first-child {
        width: 20px;
        height: 20px;
        font-size: 15px;
    }

    .interface-panel {
        top: calc(var(--header-height) + 9px);
        right: 8px;
        width: min(350px, calc(100% - 16px));
        max-height: calc(100% - var(--header-height) - 115px);
        padding: 17px;
    }

    .interface-panel.large-panel {
        width: calc(100% - 16px);
    }

    .interface-panel h2 {
        font-size: 18px;
    }

    .mission-card {
        min-height: 105px;
        padding: 11px;
    }

    .part-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #bottom-status {
        min-height: 35px;
        padding: 0 10px;
        font-size: 8px;
        letter-spacing: 0.6px;
    }

    #notification {
        right: 8px;
        bottom: 108px;
        max-width: calc(100% - 16px);
    }

    #event-message {
        top: calc(var(--header-height) + 8px);
        padding: 9px 12px;
        font-size: 9px;
        letter-spacing: 0.7px;
    }

    .flight-telemetry .stat-item {
        min-height: 52px;
    }

    .builder-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .builder-actions #launch-rocket {
        grid-column: 1 / -1;
    }
}

@media (max-width: 390px) {
    .brand h1 {
        font-size: 11px;
    }

    .brand span {
        font-size: 7px;
    }

    .header-status {
        font-size: 7px;
    }

    .header-actions button {
        padding: 5px 6px;
        font-size: 9px;
    }

    .interface-panel {
        padding: 14px;
    }

    .mission-grid {
        gap: 7px;
    }

    .mission-card strong {
        font-size: 11px;
    }

    .stat-item {
        padding: 8px;
    }
}

/* ---------- 20. REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
