@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Rajdhani:wght@500;600;700&display=swap");

:root {
    --bg: #05070c;
    --panel: #111723;
    --panel-2: rgba(17, 23, 35, 0.82);
    --panel-3: rgba(10, 14, 20, 0.72);
    --stroke: #2b3648;
    --stroke-2: rgba(180, 220, 255, 0.18);
    --text: rgba(255, 255, 255, 0.95);
    --muted: #bcc9d8;
    --chip: #141c2a;
    --danger: #ff5b5b;
    --warning: #ffd672;
    --success: #5aff96;
    --accent: #90c9ff;
    --accent-2: #8cfff0;
    --accent-grad: linear-gradient(90deg, var(--accent), var(--accent-2));
    --glow-cyan: rgba(120, 190, 255, 0.18);
    --glow-amber: rgba(255, 220, 130, 0.12);

    --radius-lg: 18px;
    --radius-md: 14px;

    --dur-fast: 140ms;
    --dur-med: 260ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.65);
    --shadow-inset: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    --shadow-glow: 0 0 42px rgba(120, 190, 255, 0.12);
    /* Touch targets align with Android 48dp and Apple 44pt guidance. */
    --touch-target: 48px;
    --touch-target-tight: 44px;
}

* {
    box-sizing: border-box;
    touch-action: none;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Rajdhani", "Trebuchet MS", "Segoe UI", sans-serif;
}

#root {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

canvas {
    display: block;
}

.hidden {
    display: none !important;
}

.panel {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    max-width: 920px;
    margin: auto;
    padding: 18px;
    border: 1px solid var(--stroke-2);
    background:
        radial-gradient(900px 520px at 14% 10%, rgba(140, 200, 255, 0.14), transparent 62%),
        radial-gradient(740px 520px at 92% 92%, rgba(255, 220, 130, 0.10), transparent 58%),
        linear-gradient(180deg, rgba(17, 23, 35, 0.92), rgba(9, 12, 18, 0.88));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel), var(--shadow-inset), var(--shadow-glow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    animation: panelIn 380ms var(--ease-out) both;
}

#loader {
    z-index: 2500;
}

.flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.progress-bar {
    width: min(60%, 340px);
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #7aa9ff, #8cfff0);
    transition: width 0.1s ease;
}

.title {
    margin-bottom: 10px;
}

.h1 {
    font-size: clamp(24px, 4.3vw, 32px);
    letter-spacing: 0.09em;
    font-weight: 800;
    font-family: "Orbitron", "Rajdhani", sans-serif;
}

.h2 {
    font-size: 12px;
    opacity: 0.8;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 220px;
}

.field span {
    font-size: 12px;
    color: var(--muted);
}

select,
input[type="range"] {
    width: 100%;
    min-height: var(--touch-target-tight);
    padding: 10px;
    background: #1a2433;
    color: var(--text);
    border: 1px solid var(--stroke);
    border-radius: 12px;
}

.btn {
    min-height: var(--touch-target-tight);
    border: 1px solid #4a607f;
    background: #27364d;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--dur-fast) ease, background var(--dur-med) ease, border-color var(--dur-med) ease, box-shadow var(--dur-med) ease, filter var(--dur-med) ease;
}

.btn:hover {
    background: #304665;
    border-color: #5f7ba0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid rgba(140, 200, 255, 0.55);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.25);
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    background: #27364d;
    border-color: #4a607f;
    box-shadow: none;
}

.btn.small {
    min-height: var(--touch-target-tight);
    padding: 9px 10px;
    border-radius: 12px;
    min-width: 102px;
}

.btn.primary {
    border-color: #446790;
    background: #204f80;
}

.btn.danger {
    border-color: #8f4545;
    background: #6f2f2f;
}

.menuPanel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menuPanel,
.menuPanel * {
    touch-action: manipulation;
}

.menuHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.menuBrand .h2 {
    margin-top: 2px;
    opacity: 0.85;
}

.menuBadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(9, 12, 18, 0.65);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
    opacity: 0.95;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.menuBadge::after {
    content: "";
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle at 30% 30%, rgba(140, 200, 255, 0.18), transparent 55%);
    animation: badgeGlow 2.6s ease-in-out infinite;
}

.menuBadge>* {
    position: relative;
    z-index: 1;
}

.menuGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.menuCard {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background:
        radial-gradient(700px 360px at 20% 10%, rgba(120, 190, 255, 0.10), transparent 60%),
        rgba(15, 22, 36, 0.62);
    padding: 14px;
    box-shadow: 0 14px 46px rgba(0, 0, 0, 0.28);
}

.menuCardTitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.92;
    margin-bottom: 10px;
}

.menuCardWide {
    grid-column: 1;
}

.roleRow {
    display: flex;
    gap: 10px;
    align-items: center;
}

.roleBtn {
    flex: 1;
    justify-content: center;
    border-radius: 16px;
}

.roleBtn.is-selected {
    border-color: rgba(200, 246, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(200, 246, 255, 0.10) inset, 0 12px 38px rgba(120, 190, 255, 0.14);
    filter: saturate(1.12);
}

.roleHint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.hintChip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(9, 12, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.featureRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.featurePill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(20, 28, 42, 0.65);
    border: 1px solid rgba(151, 202, 255, 0.20);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
}

.ctaRow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ctaStart {
    flex: 1;
    min-width: 160px;
    background: linear-gradient(180deg, rgba(32, 79, 128, 0.95), rgba(18, 50, 86, 0.95));
    border-color: rgba(120, 180, 255, 0.45);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32), 0 0 22px rgba(120, 190, 255, 0.14);
    position: relative;
    overflow: hidden;
}

.ctaStart::after {
    content: "";
    position: absolute;
    inset: -60px;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 55%);
    animation: ctaPulse 2.4s ease-in-out infinite;
}

.ctaStart>* {
    position: relative;
    z-index: 1;
}

.ctaFullscreen {
    min-width: 190px;
    justify-content: center;
    border-color: rgba(151, 202, 255, 0.30);
    background: rgba(24, 34, 51, 0.7);
}

.ctaFullscreen[data-state="on"] {
    border-color: rgba(255, 220, 130, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 220, 130, 0.10) inset, 0 14px 46px rgba(255, 220, 130, 0.10);
}

.ctaFsIcon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(9, 12, 18, 0.35);
}

.hint {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(220, 235, 255, 0.82);
    letter-spacing: 0.02em;
    opacity: 0.95;
}

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

.helpBlock {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(9, 12, 18, 0.36);
    padding: 12px;
}

.helpTitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 1000;
    letter-spacing: 0.12em;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.9;
}

.helpText {
    margin-top: 6px;
    color: rgba(220, 235, 255, 0.82);
    font-size: 13px;
    line-height: 1.35;
}

.helpNote {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(220, 235, 255, 0.76);
    font-size: 13px;
    line-height: 1.35;
}

.help {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.help .note {
    margin-top: 8px;
    opacity: 0.86;
}

#hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#topbar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    pointer-events: none;
    z-index: 1200;
}

.chip {
    padding: 9px 12px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: var(--chip);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.chip.subtle {
    opacity: 0.78;
    margin-left: auto;
}

#objective,
#fps {
    display: none !important;
}

.minimap {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: transparent;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1201;
    opacity: 0.7;
}

.minimap.expanded {
    position: fixed;
    inset: 0;
    width: 85vw;
    height: 85vh;
    max-width: none;
    max-height: none;
    margin: auto;
    z-index: 2000;
    background: transparent;
    border: 2px solid rgba(120, 180, 255, 0.6);
    border-radius: 24px;
}

.echo {
    position: absolute;
    right: 12px;
    top: 56px;
    width: 130px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: #121a27;
    pointer-events: none;
}

.echoLabel {
    font-size: 11px;
    opacity: 0.72;
    letter-spacing: 0.18em;
}

.echoArrow {
    font-size: 34px;
    text-align: center;
    margin: 6px 0 4px 0;
    opacity: 0.86;
}

.echoText {
    font-size: 12px;
    text-align: center;
    opacity: 0.82;
}

.abilities {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 10px;
    width: min(92vw, 560px);
    justify-content: center;
    display: flex;
    pointer-events: auto;
    z-index: 1250;
}

.abilityCard {
    --ability-color: #78aaff;
    min-width: 84px;
    width: clamp(82px, 22vw, 112px);
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 5px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px;
    background: rgb(24, 34, 51, 0.5);
    box-shadow: none;
    transition: transform 0.12s ease, box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

.abilityCard:hover {
    transform: translateY(-1px);
    box-shadow: none;
    border-color: #506a8d;
}

.abilityCard.is-ready {
    border-color: rgba(180, 233, 255, 0.52);
    filter: saturate(1.18);
}

.abilityCard.is-cooldown {
    border-color: rgba(255, 220, 120, 0.46);
}

.abilityCardIcon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: #0f1624;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 17px;
    color: var(--ability-color);
    grid-column: 1;
    justify-self: start;
    box-shadow: none;
}

.abilityCardInfo {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    opacity: 0.95;
    align-self: center;
}

.abilityCard[data-state="locked"] .abilityCardInfo {
    font-size: 10px;
    opacity: 0.78;
}

.abilityCard[data-state="cooldown"] .abilityCardInfo {
    color: rgba(255, 224, 140, 0.98);
}

.abilityCard[data-state="ready"] .abilityCardInfo {
    color: rgba(200, 246, 255, 0.98);
}

.ghostAction {
    --ring-deg: 0deg;
    position: absolute;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    pointer-events: auto;
    z-index: 1320;
    cursor: pointer;
}

.ghostActionRing {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    border: 3px solid #7b96c4;
    box-shadow: none;
    transition: filter 0.18s ease;
}

.ghostActionInner {
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    background: rgb(15, 22, 36, 0.3);
    display: grid;
    place-items: center;
    gap: 2px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    color: #7d95c7;
}

.ghostAction[data-mode="spark"] .ghostActionRing {
    background: conic-gradient(#ffd672 var(--ring-deg), rgba(255, 255, 255, 0.16) 0deg);
}

.ghostAction[data-ready="1"] .ghostActionRing {
    filter: saturate(1.15);
}

.ghostActionIcon {
    font-size: 20px;
    line-height: 1;
}

.ghostActionLabel {
    font-size: 10px;
    letter-spacing: 0.08em;
    font-weight: 800;
    opacity: 0.9;
}

.interact {
    position: absolute;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    pointer-events: auto;
    min-height: var(--touch-target);
    padding: 12px 16px;
    border-radius: 16px;
}

.toast {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 12px);
    bottom: calc(max(92px, env(safe-area-inset-bottom) + 74px));
    min-width: 220px;
    max-width: min(88vw, 440px);
    display: flex;
    align-items: center;
    gap: 10px;
    background: #111a28;
    border: 1px solid rgba(151, 202, 255, 0.32);
    border-radius: 14px;
    padding: 9px 12px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    z-index: 3600;
    box-shadow: none;
}

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

.toastIcon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.toastText {
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.toast[data-tone="success"] {
    border-color: rgba(88, 255, 161, 0.5);
}

.toast[data-tone="success"] .toastIcon {
    color: rgba(120, 255, 178, 0.95);
}

.toast[data-tone="warning"] {
    border-color: rgba(255, 212, 111, 0.5);
}

.toast[data-tone="warning"] .toastIcon {
    color: rgba(255, 219, 127, 0.95);
}

.toast[data-tone="error"] {
    border-color: rgba(255, 111, 111, 0.52);
}

.toast[data-tone="error"] .toastIcon {
    color: rgba(255, 130, 130, 0.95);
}

.sticks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1300;
}

.stick {
    position: absolute;
    width: 136px;
    height: 136px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    background: #162031;
    box-shadow: none;
    pointer-events: auto;
    opacity: 0.4;
}

#stickL {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
}

#stickR {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
}

.stickKnob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: #223148;
    box-shadow: none;
}

#launchUI {
    position: fixed;
    inset: 0;
    display: block;
    z-index: 3000;
    pointer-events: none;
}

#launchUI.hidden {
    display: none !important;
}

#launchUI::before {
    content: none;
}

.launchCard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    left: 10px;
    top: 10px;
    width: min(430px, calc(100vw - 20px));
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #121b2a;
    border-radius: 18px;
    padding: 18px;
    box-shadow: none;
    pointer-events: auto;
    overflow: hidden;
}

.launchCard::after {
    content: none;
}

.launchTitle {
    font-size: 12px;
    letter-spacing: 0.2em;
    font-weight: 900;
    opacity: 0.93;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.launchMeta {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 8px;
}

.launchCountdown {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.launchHint {
    font-size: 12px;
    opacity: 0.78;
    text-align: right;
    max-width: 240px;
    line-height: 1.2;
}

.codeRow {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 18px 0 12px 0;
}

.codeBox {
    width: 64px;
    height: 62px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #1a2535;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.keypad .key {
    min-height: var(--touch-target);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #1b2a3f;
    color: rgba(255, 255, 255, 0.94);
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}

.keypad .key:hover {
    border-color: rgba(140, 200, 255, 0.44);
    background: #223651;
}

.keypad .key:active {
    transform: translateY(1px);
}

.keypadActions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 12px;
    flex-wrap: wrap;
}

.keypadActions .btn {
    pointer-events: auto;
    min-width: 92px;
}

.launchAccepted {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 140, 0.24);
    background: #0f2a1f;
}

.launchAccepted.hidden {
    display: none !important;
}

.acceptedBadge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.16em;
    font-weight: 900;
    color: rgba(0, 255, 140, 0.95);
    background: #143729;
    border: 1px solid rgba(0, 255, 140, 0.22);
    box-shadow: none;
}

.launchBigRow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.rocketMark {
    font-size: 26px;
    filter: none;
}

.launchBig {
    font-size: 44px;
    font-weight: 1000;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: none;
}

.launchStage {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.16em;
    font-weight: 900;
    opacity: 0.92;
    color: rgba(140, 200, 255, 0.92);
}

.launchSub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.76;
}

.launchCard.accepted .codeRow,
.launchCard.accepted #keypad,
.launchCard.accepted .keypadActions {
    display: none !important;
}

.launchCard.accepted .launchHint {
    opacity: 0.86;
}

.abilityDigit {
    position: fixed;
    transform: translate(-50%, -110%);
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    z-index: 3200;
}

.abilityDigit.hidden {
    display: none !important;
}

.gameover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    padding: 20px;
}

.goTitle {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 900;
    letter-spacing: 0.06em;
    font-family: "Orbitron", "Rajdhani", sans-serif;
}

.goDesc {
    font-size: 14px;
    opacity: 0.85;
    max-width: 560px;
    text-align: center;
    line-height: 1.4;
}

.orientationLock {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: radial-gradient(1200px 800px at 20% 20%, rgba(120, 180, 255, 0.18), transparent 60%),
        radial-gradient(1000px 700px at 80% 80%, rgba(255, 220, 130, 0.12), transparent 60%),
        rgba(4, 6, 10, 0.92);
    pointer-events: auto;
}

.orientationCard {
    width: min(92vw, 360px);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 14, 20, 0.8);
    text-align: center;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.42);
}

.orientationTitle {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.orientationSub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.84;
    letter-spacing: 0.03em;
}

.orientationActions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.orientationTip {
    font-size: 12px;
    opacity: 0.8;
    letter-spacing: 0.02em;
}

.orientationPhone {
    margin: 18px auto 2px;
    width: 92px;
    height: 92px;
    position: relative;
    animation: phoneFlip 1.2s ease-in-out infinite;
}

.orientationPhoneBody {
    width: 40px;
    height: 70px;
    border-radius: 10px;
    border: 2px solid rgba(210, 235, 255, 0.85);
    margin: auto;
    position: relative;
    box-shadow: 0 0 18px rgba(120, 190, 255, 0.25);
}

.orientationPhoneNotch {
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: rgba(210, 235, 255, 0.8);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.orientationArrow {
    position: absolute;
    width: 56px;
    height: 56px;
    border: 2px dashed rgba(180, 220, 255, 0.5);
    border-radius: 999px;
    inset: 50%;
    transform: translate(-50%, -50%);
    animation: phoneArrow 1.2s linear infinite;
}

@keyframes phoneFlip {
    0% {
        transform: rotate(0deg);
    }

    45% {
        transform: rotate(88deg);
    }

    55% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes phoneArrow {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 0.55;
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        opacity: 1;
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ctaPulse {
    0% {
        transform: rotate(0deg);
        opacity: 0.35;
    }

    50% {
        transform: rotate(7deg);
        opacity: 0.55;
    }

    100% {
        transform: rotate(0deg);
        opacity: 0.35;
    }
}

@keyframes badgeGlow {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0.55;
    }

    50% {
        transform: translate3d(14px, -8px, 0);
        opacity: 0.9;
    }

    100% {
        transform: translate3d(0, 0, 0);
        opacity: 0.55;
    }
}

@media (prefers-reduced-motion: reduce) {

    .panel,
    .orientationPhone,
    .orientationArrow,
    .ctaStart::after,
    .menuBadge::after {
        animation: none !important;
    }

    * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (min-width: 960px) {
    .menuGrid {
        grid-template-columns: 1fr 1fr;
    }

    .menuCardWide {
        grid-column: span 2;
    }

    .helpCard .helpGrid {
        grid-template-columns: 1fr 1fr;
    }

    .helpCard .helpNote {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .menuHeader {
        flex-direction: column;
        align-items: flex-start;
    }

    .menuBadge {
        align-self: flex-start;
    }

    .ctaFullscreen {
        min-width: 100%;
    }
}

@media (min-width: 860px) {
    .abilities {
        left: 12px;
        transform: none;
        width: auto;
        bottom: 14px;
        justify-content: flex-start;
    }

    .abilityCard {
        width: 104px;
    }

    .ghostAction {
        right: 14px;
        bottom: 14px;
    }

    .stick {
        width: 156px;
        height: 156px;
    }
}

@media (max-width: 859px) {
    .panel {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        padding: 14px;
    }

    .chip {
        font-size: 12px;
        padding: 7px 10px;
    }

    .abilities {
        width: min(96vw, 560px);
        gap: 8px;
    }

    .abilityCard {
        width: clamp(80px, 24vw, 106px);
        min-height: 72px;
        padding: 7px;
    }

    .abilityCardIcon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .abilityCardInfo {
        font-size: 11px;
    }

    .ghostAction {
        width: 86px;
        height: 86px;
    }

    .stick {
        width: 124px;
        height: 124px;
    }

    .stickKnob {
        width: 56px;
        height: 56px;
    }

    .launchCard {
        width: min(94vw, 420px);
        padding: 14px;
    }

    .codeBox {
        width: 56px;
        height: 56px;
    }
}

@media (max-height: 540px) {
    .abilities {
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .abilityCard {
        min-height: 64px;
    }

    .abilityCardIcon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .stick {
        width: 112px;
        height: 112px;
    }

    .stickKnob {
        width: 50px;
        height: 50px;
    }
}
