* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #02111a;
    color: #f3fbff;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #02111a;
}

button,
kbd {
    font: inherit;
}

.simulator,
#ocean {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.simulator {
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(#08778d, #02111a);
}

#ocean {
    display: block;
    touch-action: none;
}

.hud {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1rem, 3vw, 2rem);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 16px rgba(0, 15, 24, 0.75);
}

.brand__mark {
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(214, 249, 255, 0.65);
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.35rem rgba(119, 232, 242, 0.09), 0 0 1.5rem rgba(39, 222, 227, 0.2);
}

.brand__mark::after {
    content: "";
    display: block;
    width: 0.42rem;
    height: 0.42rem;
    margin: 0.48rem 0 0 1.15rem;
    border-radius: 50%;
    background: #b7f7f7;
    box-shadow: -0.55rem 0.55rem 0 -0.08rem rgba(183, 247, 247, 0.75);
}

.eyebrow {
    margin: 0 0 0.15rem;
    color: #9eeaf0;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.telemetry {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(185, 239, 245, 0.16);
    border-radius: 0.85rem;
    background: rgba(1, 20, 29, 0.42);
    box-shadow: 0 0.8rem 2.5rem rgba(0, 11, 18, 0.16);
    backdrop-filter: blur(10px);
}

.telemetry__item {
    min-width: 6.3rem;
    padding: 0.7rem 0.9rem;
    border-left: 1px solid rgba(185, 239, 245, 0.13);
}

.telemetry__item:first-child {
    border-left: 0;
}

.telemetry__item span,
.telemetry__item strong {
    display: block;
}

.telemetry__item span {
    margin-bottom: 0.15rem;
    color: rgba(220, 247, 249, 0.65);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.telemetry__item strong {
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.reticle {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 2.8rem;
    height: 2.8rem;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(220, 252, 255, 0.24);
    border-radius: 50%;
    pointer-events: none;
}

.reticle::before,
.reticle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(224, 253, 255, 0.55);
    transform: translate(-50%, -50%);
}

.reticle::before {
    width: 0.34rem;
    height: 1px;
}

.reticle::after {
    width: 1px;
    height: 0.34rem;
}

.reticle span {
    position: absolute;
    inset: 0.35rem;
    border-top: 1px solid rgba(220, 252, 255, 0.3);
    border-bottom: 1px solid rgba(220, 252, 255, 0.3);
    border-radius: 50%;
}

.instructions {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: min(31rem, calc(100% - 2rem));
    padding: clamp(1.4rem, 4vw, 2.2rem);
    border: 1px solid rgba(177, 240, 245, 0.23);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(4, 34, 45, 0.88), rgba(1, 18, 27, 0.78));
    box-shadow: 0 2rem 6rem rgba(0, 8, 13, 0.45), inset 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(18px);
    transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
}

.instructions.is-hidden {
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 1rem));
}

.instructions h2 {
    margin: 0.35rem 0 0.7rem;
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.instructions > p:not(.eyebrow) {
    max-width: 25rem;
    margin: 0 auto;
    color: rgba(225, 247, 249, 0.72);
    line-height: 1.6;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.6rem 0;
}

.key-grid {
    display: grid;
    grid-template-columns: repeat(3, 2rem);
    gap: 0.25rem;
}

kbd {
    display: grid;
    min-width: 2rem;
    min-height: 2rem;
    place-items: center;
    border: 1px solid rgba(212, 248, 251, 0.26);
    border-bottom-color: rgba(212, 248, 251, 0.45);
    border-radius: 0.4rem;
    background: rgba(218, 250, 252, 0.08);
    box-shadow: inset 0 -2px rgba(0, 5, 8, 0.15);
    color: #e5fcfd;
    font-size: 0.75rem;
}

.space-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: rgba(225, 247, 249, 0.6);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.space-control kbd {
    width: 6.5rem;
}

#startButton {
    padding: 0.85rem 1.35rem;
    border: 1px solid rgba(199, 252, 252, 0.4);
    border-radius: 999px;
    background: #b5f1ee;
    box-shadow: 0 0.8rem 2.5rem rgba(24, 220, 215, 0.16);
    color: #04232b;
    cursor: pointer;
    font-weight: 750;
    transition: transform 160ms ease, background 160ms ease;
}

#startButton:hover {
    background: #d7ffff;
    transform: translateY(-2px);
}

#startButton:focus-visible {
    outline: 3px solid rgba(181, 241, 238, 0.35);
    outline-offset: 4px;
}

.notice {
    position: absolute;
    z-index: 4;
    top: calc(50% + 3.2rem);
    left: 50%;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 222, 169, 0.25);
    border-radius: 999px;
    background: rgba(30, 22, 13, 0.5);
    color: #ffe2b6;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.5rem);
    transition: opacity 180ms ease, transform 180ms ease;
}

.notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.control-hint {
    position: absolute;
    z-index: 3;
    bottom: 1.4rem;
    left: 50%;
    margin: 0;
    color: rgba(218, 244, 246, 0.5);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    pointer-events: none;
    transform: translateX(-50%);
}

.control-hint span {
    margin-left: 0.7rem;
    color: rgba(237, 253, 254, 0.86);
    font-weight: 700;
}

.control-hint span:first-child {
    margin-left: 0;
}

.vignette {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: radial-gradient(circle at center, transparent 38%, rgba(0, 10, 17, 0.16) 72%, rgba(0, 5, 10, 0.55) 120%);
    pointer-events: none;
}

@media (max-width: 620px) {
    .hud {
        display: block;
    }

    .telemetry {
        width: max-content;
        margin-top: 0.75rem;
    }

    .telemetry__item {
        min-width: 5.4rem;
        padding: 0.55rem 0.7rem;
    }

    .control-hint {
        width: 100%;
        text-align: center;
    }
}

@media (max-height: 620px) {
    .instructions {
        padding: 1.1rem 1.5rem;
    }

    .instructions h2 {
        margin-bottom: 0.35rem;
    }

    .controls {
        margin: 0.8rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .instructions,
    .notice,
    #startButton {
        transition: none;
    }
}
