* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #080d18;
    color: white;
}

.main-screen {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 75% 45%, #34202a 0%, transparent 35%),
        linear-gradient(120deg, #080d18, #111a2b 65%, #241824);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 7%;
}

.stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white 50%, transparent),
        radial-gradient(1px 1px at 70% 20%, white 50%, transparent),
        radial-gradient(2px 2px at 40% 75%, white 50%, transparent),
        radial-gradient(1px 1px at 85% 65%, white 50%, transparent),
        radial-gradient(2px 2px at 10% 85%, white 50%, transparent),
        radial-gradient(1px 1px at 55% 45%, white 50%, transparent);
    background-size: 300px 300px;
}

.top-bar,
.bottom-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}

.brand-icon {
    color: #ef7952;
    margin-right: 8px;
}

.status {
    font-size: 11px;
    letter-spacing: 2px;
    color: #ef7952;
    border: 1px solid #ef7952;
    padding: 9px 14px;
}

.hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.hero-content {
    max-width: 620px;
    z-index: 2;
}

.eyebrow {
    color: #ef7952;
    font-size: 13px;
    letter-spacing: 4px;
    font-weight: bold;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -2px;
    font-weight: 900;
}

h1 span {
    display: inline;
    color: #ef7952;
}

.subtitle {
    color: #b9c2d1;
    font-size: 16px;
    line-height: 1.8;
    max-width: 470px;
    margin-top: 25px;
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    gap: 13px;
    max-width: 100%;
    margin-top: 35px;
}

.hero-buttons .btn {
    flex: 1;
    text-align: center;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-width: 260px;
    margin-top: 35px;
}

.btn {
    padding: 16px 22px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

.btn-primary {
    background: #e66b47;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary:hover {
    background: #ff8059;
    transform: translateX(5px);
}

.btn-secondary {
    color: #d7deea;
    background: transparent;
    border: 1px solid #536075;
}

.btn-secondary:hover {
    border-color: #ef7952;
    color: #ef7952;
}

.footer-note {
    margin-top: 35px;
    color: #718097;
    font-size: 10px;
    letter-spacing: 3px;
}

.mars-container {
    position: absolute;
    width: min(45vw, 540px);
    aspect-ratio: 1;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.mars {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 35% 30%, #f1a078 0%, transparent 25%),
        radial-gradient(ellipse at 70% 65%, #873c30 0%, transparent 30%),
        radial-gradient(circle at 35% 35%, #d66c48, #9a4334 55%, #3b2029 100%);
    box-shadow:
        inset -35px -20px 65px #160f1b,
        0 0 80px rgba(216, 91, 58, 0.22);
}

.mars-orbit {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(239, 121, 82, 0.22);
    border-radius: 50%;
    transform: rotate(-25deg) scaleY(0.35);
}

.mars-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 100px rgba(211, 83, 54, 0.12);
}

.bottom-bar {
    color: #66758c;
    font-size: 10px;
    letter-spacing: 2px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    background: #172337;
    border: 1px solid #e66b47;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    line-height: 1.8;
}

.modal-content h2 {
    color: #ef7952;
    margin-bottom: 15px;
}

.modal-content p {
    color: #c1cad8;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    color: white;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.mission-screen {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, #45242b, transparent 40%),
        #0b1220;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;
}

.mission-card {
    max-width: 700px;
    width: 100%;
    padding: 45px;
    background: #172337;
    border: 1px solid #3b4b63;
}

.mission-card h1 {
    font-size: 36px;
    margin-bottom: 25px;
}

.mission-card p,
.mission-card li {
    color: #c1cad8;
    line-height: 1.8;
}

.mission-card h3 {
    color: #ef7952;
    margin: 25px 0 12px;
}

.mission-card ul {
    padding-left: 22px;
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

@media (max-width: 750px) {
    .main-screen {
        padding: 25px 6%;
    }

    .hero {
        min-height: 75vh;
        align-items: flex-end;
        padding-bottom: 40px;
    }

    .mars-container {
        width: 85vw;
        right: -30%;
        top: 20%;
        transform: none;
        opacity: 0.45;
    }

    .hero-content {
        max-width: 100%;
    }

    .subtitle {
        font-size: 14px;
    }

    .bottom-bar {
        font-size: 8px;
        gap: 15px;
    }

    .mission-card {
        padding: 25px;
    }

    .mission-card h1 {
        font-size: 28px;
    }
}

.game-screen {
    min-height: 100vh;
    padding: 25px;
    background:
        radial-gradient(ellipse at 50% 40%, #172b45 0%, transparent 55%),
        #070c17;
    color: white;
}

.game-shell {
    max-width: 1450px;
    margin: auto;
}

.game-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 22px;
    border-bottom: 1px solid #263950;
}

.game-brand {
    font-weight: 900;
    letter-spacing: 2px;
}

.game-brand span {
    color: #ef7952;
}

.mission-status {
    color: #b9c2d1;
    font-size: 11px;
    letter-spacing: 2px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5de0a0;
    margin-right: 8px;
}

.game-level {
    color: #ef7952;
    font-size: 10px;
    letter-spacing: 2px;
}

.game-hud {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 22px 0;
}

.hud-stat {
    background: rgba(23, 39, 60, 0.85);
    border: 1px solid #30445e;
    border-left: 3px solid #ef7952;
    padding: 15px;
    min-width: 0;
}

.hud-stat span {
    display: block;
    color: #8fa4bd;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hud-stat strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.game-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 15px;
    margin-bottom: 20px;
}

.mission-objectives,
.systems-panel {
    background: rgba(17, 29, 47, 0.95);
    border: 1px solid #30445e;
    padding: 20px;
}

.panel-label {
    color: #ef7952;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 12px;
}

.mission-objectives h2,
.systems-panel h2 {
    font-size: 17px;
    margin-bottom: 15px;
}

.mission-description,
.systems-panel > p:not(.panel-label) {
    color: #aebbd0;
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.objective {
    padding: 12px 0;
    border-bottom: 1px solid #293b53;
    color: #cbd5e3;
    font-size: 11px;
    line-height: 1.5;
}

.objective span {
    color: #ef7952;
    margin-right: 7px;
}

.hangar-panel {
    background: #101c2d;
    border: 1px solid #3b506b;
    min-width: 0;
}

.hangar-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    background: #192a40;
    color: #aebbd0;
    font-size: 10px;
    letter-spacing: 1px;
}

.hangar-heading span:first-child {
    color: #ef7952;
}

.planet-decoration {
    position: absolute;
    width: 175px;
    height: 175px;
    border-radius: 50%;
    right: 8%;
    top: 15%;
    background:
        radial-gradient(circle at 35% 30%, #e79b70, transparent 30%),
        linear-gradient(130deg, #b95d43, #512b3b 75%);
    box-shadow: 0 0 65px rgba(220, 105, 70, 0.2);
    opacity: 0.75;
}

.ship-stage {
    min-height: 310px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at 50% 45%, #263d59, transparent 45%),
        linear-gradient(140deg, #0b1524, #101f35);
}

.ship-orbit {
    position: absolute;
    width: 75%;
    height: 120px;
    border: 1px solid rgba(239, 121, 82, 0.35);
    border-radius: 50%;
    transform: rotate(-20deg);
}

.ship-art {
    position: relative;
    width: 190px;
    height: 115px;
    z-index: 2;
    transform: rotate(-15deg);
    filter: drop-shadow(0 0 12px rgba(100, 185, 255, 0.35));
}

.ship-body {
    position: absolute;
    width: 55px;
    height: 110px;
    left: 68px;
    top: 2px;
    border-radius: 50% 50% 35% 35%;
    background: linear-gradient(90deg, #778da5, #e1e9f0, #647d99);
    clip-path: polygon(50% 0, 100% 75%, 70% 100%, 30% 100%, 0 75%);
}

.ship-window {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ef7952;
    top: 40px;
    left: 20px;
    box-shadow: 0 0 12px #ef7952;
}

.ship-wing {
    position: absolute;
    width: 65px;
    height: 45px;
    top: 37px;
    background: linear-gradient(135deg, #47749d, #182f4c);
    border: 1px solid #81a9cf;
}

.left-wing {
    left: 0;
    clip-path: polygon(0 0, 100% 30%, 100% 100%, 15% 80%);
}

.right-wing {
    right: 0;
    clip-path: polygon(0 30%, 100% 0, 85% 80%, 0 100%);
}

.ship-antenna {
    position: absolute;
    height: 35px;
    width: 2px;
    background: #ef7952;
    left: 94px;
    top: -25px;
}

.ship-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ship-caption span,
.ship-caption small {
    color: #8198b2;
    font-size: 9px;
    letter-spacing: 2px;
}

.ship-caption strong {
    color: white;
    font-size: 13px;
    letter-spacing: 2px;
}

.selected-section {
    padding: 15px;
    background: #142238;
}

.subheading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #ef7952;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #30445e;
    font-size: 12px;
}

.selected-section p {
    color: #91a3bb;
    font-size: 12px;
}

.selected-item button {
    background: transparent;
    color: #ef7952;
    border: 1px solid #ef7952;
    padding: 7px 10px;
    font-size: 9px;
    cursor: pointer;
}

.system-info {
    padding: 13px 0;
    border-bottom: 1px solid #293b53;
}

.system-info span,
.system-info strong {
    display: block;
}

.system-info span {
    color: #8198b2;
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.system-info strong {
    font-size: 12px;
}

.system-state {
    color: #e9a35c;
}

.game-back {
    margin-top: 25px;
    width: 100%;
    padding: 11px;
    background: transparent;
    color: #aebbd0;
    border: 1px solid #536075;
    cursor: pointer;
    font-size: 10px;
}

.game-back:hover {
    border-color: #ef7952;
    color: #ef7952;
}

.workshop-panel {
    padding: 20px;
    background: rgba(17, 29, 47, 0.95);
    border: 1px solid #30445e;
}

.workshop-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.workshop-heading h2 {
    font-size: 19px;
}

.workshop-heading > span {
    color: #8198b2;
    font-size: 10px;
    letter-spacing: 1px;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 12px;
}

.component-card {
    padding: 18px;
    background: linear-gradient(145deg, #1c3049, #101c2d);
    border: 1px solid #3b506b;
    transition: 0.25s;
}

.component-card:hover {
    border-color: #ef7952;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.component-icon {
    font-size: 30px;
    margin-bottom: 12px;
}

.component-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.component-card p {
    color: #aebbd0;
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 7px;
}

.component-card button {
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    background: #e66b47;
    border: none;
    color: white;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
}

.component-card button:hover {
    background: #ff8059;
}

.component-card button:disabled {
    background: #46566c;
    cursor: not-allowed;
}

.mission-evaluation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-top: 15px;
    background: #17283e;
    border: 1px solid #3b506b;
}

#evaluationMessage {
    color: #aebbd0;
    font-size: 12px;
    line-height: 1.6;
}

#evaluateMissionBtn {
    width: auto;
    min-width: 190px;
    padding: 15px 20px;
    margin: 0;
}

@media (max-width: 950px) {
    .game-layout {
        grid-template-columns: 1fr 1fr;
    }

    .hangar-panel {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

@media (max-width: 650px) {
    .game-screen {
        padding: 15px;
    }

    .game-topbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .game-level {
        display: none;
    }

    .game-hud {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-layout {
        grid-template-columns: 1fr;
    }

    .hangar-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .mission-evaluation,
    .workshop-heading {
        flex-direction: column;
        align-items: stretch;
    }

    #evaluateMissionBtn {
        width: 100%;
    }
}
