@import "tailwindcss";

:root {
  color-scheme: dark;
  --ink: #f3f1e9;
  --muted: rgba(243, 241, 233, 0.6);
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(10, 13, 17, 0.72);
  --accent: #ee4b32;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #0c1115; }
body { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }

.game-shell { position: relative; width: 100vw; height: 100dvh; overflow: hidden; isolation: isolate; background: #10171d; }
.game-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; outline: none; touch-action: none; }

.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(5, 8, 11, .78), rgba(5, 8, 11, .18)); backdrop-filter: blur(12px); pointer-events: none; }
.brand, .location-pill, .top-actions { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; font-size: 11px; font-weight: 900; letter-spacing: -.06em; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 13px; letter-spacing: .16em; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.location-pill { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(11,15,19,.48); color: rgba(255,255,255,.78); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.location-pulse { width: 7px; height: 7px; border-radius: 50%; background: #8fd66d; box-shadow: 0 0 0 5px rgba(143,214,109,.13), 0 0 12px rgba(143,214,109,.7); }
.top-actions { justify-self: end; display: flex; gap: 9px; }
.hud-button, .icon-button { height: 38px; border: 1px solid var(--line); background: rgba(9,13,16,.56); backdrop-filter: blur(10px); cursor: pointer; }
.hud-button { display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.icon-button { width: 38px; border-radius: 50%; font-size: 16px; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-height: 19px; padding: 2px 6px; border: 1px solid rgba(255,255,255,.24); border-bottom-color: rgba(255,255,255,.42); border-radius: 4px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.84); font-family: inherit; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 1px 0 rgba(0,0,0,.4); }

.telemetry { position: absolute; z-index: 4; top: 98px; left: 22px; width: 178px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); backdrop-filter: blur(14px); pointer-events: none; }
.telemetry-row, .coordinate { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.telemetry-row + .telemetry-row, .coordinate + .coordinate { margin-top: 7px; }
.telemetry-row span, .coordinate span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.telemetry-row strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.telemetry-row strong.warning { color: #ffb05c; }
.telemetry-divider { height: 1px; margin: 12px 0; background: var(--line); }
.coordinate strong { font: 500 10px ui-monospace, SFMono-Regular, Menlo, monospace; color: rgba(255,255,255,.78); }
.telemetry-note { margin-top: 10px; color: rgba(255,255,255,.42); font-size: 8px; letter-spacing: .06em; }

.reticle { position: absolute; z-index: 3; top: 50%; left: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); pointer-events: none; opacity: .68; }
.reticle::before, .reticle::after, .reticle span::before, .reticle span::after { content: ""; position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 5px rgba(0,0,0,.55); }
.reticle::before { left: 10px; top: 0; width: 1px; height: 6px; }
.reticle::after { left: 10px; bottom: 0; width: 1px; height: 6px; }
.reticle span::before { left: 0; top: 10px; width: 6px; height: 1px; }
.reticle span::after { right: 0; top: 10px; width: 6px; height: 1px; }
.reticle i { position: absolute; left: 9px; top: 9px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }

.controls-strip { position: absolute; z-index: 4; bottom: 20px; left: 50%; display: flex; align-items: center; gap: 15px; padding: 9px 12px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 10px; background: rgba(8,12,15,.63); backdrop-filter: blur(13px); color: rgba(255,255,255,.62); font-size: 9px; letter-spacing: .04em; white-space: nowrap; pointer-events: none; }
.controls-strip span { display: flex; align-items: center; gap: 6px; }

.entry-layer { position: absolute; z-index: 10; inset: 0; display: flex; align-items: center; padding: 9vw; background: radial-gradient(circle at 72% 35%, rgba(11,17,22,.14), rgba(4,7,10,.74) 62%), linear-gradient(90deg, rgba(4,6,8,.75), rgba(4,6,8,.12)); backdrop-filter: blur(2px); }
.entry-card { width: min(610px, 88vw); padding: 36px 38px; border: 1px solid rgba(255,255,255,.17); border-radius: 18px; background: linear-gradient(145deg, rgba(10,14,17,.84), rgba(10,14,17,.54)); box-shadow: 0 30px 90px rgba(0,0,0,.3); backdrop-filter: blur(18px); }
.eyebrow { margin: 0 0 14px; color: #d3a886; font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.entry-card h1 { margin: 0; max-width: 580px; font-size: clamp(40px, 5.2vw, 76px); font-weight: 560; line-height: .98; letter-spacing: -.052em; }
.entry-description { max-width: 540px; margin: 24px 0 29px; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.65; }
.enter-button { display: flex; justify-content: space-between; align-items: center; width: min(360px, 100%); min-height: 58px; padding: 0 8px 0 20px; border: 0; border-radius: 9px; background: var(--accent); color: white; font-size: 11px; font-weight: 900; letter-spacing: .14em; cursor: pointer; box-shadow: 0 13px 32px rgba(238,75,50,.23); }
.enter-button:disabled { cursor: wait; opacity: .6; }
.enter-arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 7px; background: rgba(0,0,0,.2); font-size: 18px; }
.entry-hint { margin: 16px 0 0; color: rgba(255,255,255,.4); font-size: 10px; }
.entry-side-label { position: absolute; right: 24px; bottom: 95px; writing-mode: vertical-rl; color: rgba(255,255,255,.4); font: 700 9px ui-monospace, monospace; letter-spacing: .2em; }
.error-box { padding: 14px; border: 1px solid rgba(255,108,91,.4); border-radius: 9px; background: rgba(97,21,18,.42); color: #ffc2b9; font-size: 13px; }

.drawer { position: absolute; z-index: 20; top: 91px; right: 18px; width: min(480px, calc(100vw - 36px)); max-height: calc(100dvh - 112px); overflow: auto; padding: 27px; border: 1px solid var(--line); border-radius: 15px; background: rgba(8,12,15,.9); box-shadow: 0 30px 90px rgba(0,0,0,.48); backdrop-filter: blur(22px); }
.drawer-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: rgba(255,255,255,.72); font-size: 19px; cursor: pointer; }
.drawer h2 { margin: 0 42px 20px 0; font-size: 27px; letter-spacing: -.035em; }
.drawer-copy { margin: 20px 0 0; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.65; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-grid div { display: flex; flex-direction: column; gap: 9px; min-height: 82px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.035); }
.help-grid kbd { align-self: flex-start; }
.help-grid span { color: rgba(255,255,255,.64); font-size: 11px; }
.reference-frame { overflow: hidden; aspect-ratio: 16/8.8; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: #15191c; }
.reference-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.source-meta { margin: 16px 0 0; }
.source-meta div { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.09); }
.source-meta dt { color: rgba(255,255,255,.4); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.source-meta dd { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; }
.mobile-notice { display: none; }

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; min-height: 66px; padding: 10px 12px; }
  .location-pill, .telemetry, .controls-strip { display: none; }
  .brand-copy small { display: none; }
  .entry-layer { align-items: flex-end; padding: 14px; }
  .entry-card { width: 100%; padding: 25px 22px; }
  .entry-card h1 { font-size: 43px; }
  .entry-side-label { display: none; }
  .mobile-notice { position: absolute; z-index: 6; left: 50%; bottom: 12px; display: block; width: max-content; max-width: calc(100vw - 24px); padding: 8px 12px; transform: translateX(-50%); border-radius: 8px; background: rgba(8,12,15,.74); color: rgba(255,255,255,.62); font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
