:root {
  color-scheme: dark;
  --ink: #dffdf6;
  --muted: #74a39a;
  --cyan: #00f6dc;
  --magenta: #ff3eea;
  --yellow: #ffd84a;
  --panel: rgba(4, 17, 16, 0.82);
  --line: rgba(0, 246, 220, 0.26);
  --bg: #020807;
  font-family: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 62, 234, .1), transparent 29rem),
    radial-gradient(circle at 16% 34%, rgba(0, 246, 220, .09), transparent 26rem),
    linear-gradient(180deg, #04110f 0%, var(--bg) 38rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(0, 246, 220, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 246, 220, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .16;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.55) 4px);
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
  box-shadow: inset 0 0 20px rgba(0,246,220,.12), 0 0 20px rgba(0,246,220,.08);
}
.brand strong { display: block; letter-spacing: .15em; font-size: 15px; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(0,246,220,.22);
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: .1em;
}
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #52ff91; box-shadow: 0 0 12px #52ff91; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero { min-height: 650px; display: grid; align-content: center; max-width: 850px; padding: 80px 0 72px; }
.eyebrow { margin: 0 0 22px; color: var(--cyan); font-size: 12px; letter-spacing: .18em; }
.hero h1 { margin: 0; font-size: clamp(62px, 10vw, 132px); line-height: .84; letter-spacing: -.085em; text-transform: uppercase; text-shadow: 0 0 38px rgba(223,253,246,.08); }
.hero h1 span { color: transparent; -webkit-text-stroke: 1px var(--magenta); text-shadow: 0 0 32px rgba(255,62,234,.18); }
.intro { max-width: 700px; margin: 35px 0 0; color: #a8c7c0; font: 18px/1.75 system-ui, sans-serif; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 35px; }
.actions button, .actions a, .address-box button {
  min-height: 52px;
  border: 1px solid var(--cyan);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}
.primary { background: var(--cyan); color: #001513; box-shadow: 0 0 30px rgba(0,246,220,.16); }
.primary:hover, .primary:focus-visible { background: #7ffff1; }
.primary kbd { font: inherit; font-size: 18px; }
.secondary { color: var(--cyan); background: rgba(0,246,220,.04); }
.secondary:hover, .secondary:focus-visible { background: rgba(0,246,220,.12); }
.connection-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; }

.decks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 0 92px; }
.deck { position: relative; overflow: hidden; min-height: 350px; padding: 34px; border: 1px solid var(--line); background: var(--panel); box-shadow: inset 0 1px rgba(255,255,255,.02); }
.deck::after { content: ""; position: absolute; width: 240px; height: 240px; right: -100px; bottom: -110px; border: 1px solid rgba(0,246,220,.12); transform: rotate(45deg); }
.deck-label { color: var(--cyan); font-size: 11px; letter-spacing: .18em; }
.deck h2, .direct h2 { margin: 24px 0 16px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.05em; }
.deck p, .direct p { color: #9dbdb6; font: 16px/1.65 system-ui, sans-serif; }
.command-row { display: flex; gap: 10px; margin-top: 32px; }
.command-row code { padding: 9px 11px; color: var(--yellow); border: 1px solid rgba(255,216,74,.25); background: rgba(255,216,74,.05); }
.games ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 11px; }
.games li { display: grid; grid-template-columns: 34px 1fr; align-items: center; color: #c7ded9; }
.games li span { color: var(--yellow); }
.games .maintenance { color: var(--magenta); font-size: 12px; }

.direct { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: center; padding: 70px 0 92px; border-top: 1px solid var(--line); }
.address-box { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 26px; border: 1px solid var(--line); background: rgba(0,246,220,.035); }
.address-box span { color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.address-box strong { color: var(--cyan); overflow-wrap: anywhere; }
.address-box button { grid-column: 1 / -1; min-height: 44px; margin-top: 8px; color: var(--cyan); background: transparent; }

footer { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 26px 0 40px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .1em; }

dialog { width: min(1120px, calc(100% - 24px)); max-width: none; height: min(800px, calc(100% - 24px)); padding: 0; border: 1px solid var(--cyan); background: #000; color: var(--ink); box-shadow: 0 0 80px rgba(0,246,220,.18); }
dialog::backdrop { background: rgba(0,4,4,.88); backdrop-filter: blur(4px); }
.terminal-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.terminal-bar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; border-bottom: 1px solid rgba(0,246,220,.35); background: #06110f; font-size: 11px; letter-spacing: .08em; }
.terminal-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--yellow); }
.terminal-actions { display: flex; align-items: center; gap: 12px; }
.terminal-actions button { border: 1px solid rgba(0,246,220,.28); color: var(--cyan); background: transparent; padding: 7px 10px; cursor: pointer; }
#close-terminal { font-size: 18px; line-height: 1; }
#terminal-status { color: var(--yellow); }
#terminal { min-height: 0; padding: 12px; overflow: hidden; }
#terminal .xterm { height: 100%; }
.terminal-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 9px 13px; border-top: 1px solid rgba(0,246,220,.22); color: var(--muted); font-size: 9px; }
.terminal-help strong { color: var(--yellow); }

@media (max-width: 760px) {
  .site-header { padding: 18px 0; }
  .status-pill { padding: 8px; font-size: 0; }
  .status-light { width: 8px; height: 8px; }
  .hero { min-height: 570px; padding: 60px 0; }
  .hero h1 { font-size: clamp(56px, 18vw, 90px); }
  .intro { font-size: 16px; }
  .decks, .direct { grid-template-columns: 1fr; }
  .direct { gap: 26px; }
  .deck { padding: 25px; }
  footer { flex-direction: column; }
  .terminal-bar { align-items: flex-start; padding: 10px; }
  .terminal-actions { gap: 6px; }
  #disconnect-terminal { display: none; }
  .terminal-help span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
