/* AlphaRex terminal — AlphaCore atelier HUD */
:root {
  --bg: #07080b;
  --bg-2: #0c0e13;
  --bg-3: #12151c;
  --ink: #f3efe6;
  --muted: #a39e93;
  --faint: #6f6b63;
  --line: rgba(243, 239, 230, 0.1);
  --line-strong: rgba(243, 239, 230, 0.2);
  --ice: #8eecff;
  --ice-dim: rgba(142, 236, 255, 0.14);
  --gold: #d4b07a;
  --gold-dim: rgba(212, 176, 122, 0.16);
  --card: rgba(10, 12, 16, 0.72);
  --danger: #f07167;
  --ok: #7dcea0;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; width: 100%; max-width: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--ice); text-decoration: none; }
a:hover { color: #b7f4ff; }
::selection { background: rgba(142, 236, 255, 0.28); color: #fff; }

.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 8;
  opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}
.vignette {
  pointer-events: none; position: fixed; inset: 0; z-index: 7;
  background:
    radial-gradient(ellipse 80% 50% at 18% -8%, rgba(142,236,255,0.07), transparent 55%),
    radial-gradient(ellipse 70% 45% at 92% 8%, rgba(212,176,122,0.06), transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 48%, transparent 42%, rgba(7,8,11,.72) 100%);
}

/* —— boot —— */
#boot {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse 50% 40% at 50% 28%, rgba(142,236,255,.1), transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(212,176,122,.08), transparent 55%),
    linear-gradient(180deg, #07080b 0%, #0a0c11 100%);
  text-align: center;
}
#boot[hidden] { display: none !important; }
#boot .logo {
  width: 72px; height: 72px; margin-bottom: 22px;
  filter: drop-shadow(0 12px 28px rgba(142,236,255,.28));
}
#boot .kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
}
#boot h1 {
  margin: 0 0 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: -0.04em; line-height: 1.02;
}
#boot h1 span { color: var(--ice); }
#boot p {
  color: var(--muted); max-width: 42ch; line-height: 1.6;
  margin: 0 0 28px; font-size: 1.02rem;
}
.cta {
  appearance: none; border: 0; cursor: pointer;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.86rem;
  letter-spacing: 0.02em; color: #071016;
  background: linear-gradient(180deg, #b7f4ff 0%, var(--ice) 45%, #5ad4ef 100%);
  box-shadow: 0 10px 30px -12px rgba(142,236,255,0.7);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(142,236,255,0.85); }
.boot-creds {
  margin-top: 22px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint);
}

/* —— shell —— */
.shell {
  height: 100%; display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0; min-width: 0;
}
.top {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 8px;
  z-index: 6;
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.92rem; letter-spacing: 0.04em; color: var(--ink);
}
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand span { color: var(--ice); }
.pill {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.62rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(142,236,255,.35); color: var(--ice);
  background: var(--ice-dim);
}
.pill.live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ice); margin-right: 7px; box-shadow: 0 0 8px var(--ice);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  appearance: none; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(10,12,16,.78);
  color: var(--ice); display: grid; place-items: center;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--ice); }
.icon-btn[aria-pressed="true"] { color: var(--danger); border-color: rgba(240,113,103,.45); background: rgba(240,113,103,.08); }
.icon-btn svg { width: 18px; height: 18px; }
.vol { width: 72px; accent-color: var(--ice); }

/* —— main —— */
.main {
  display: grid; grid-template-columns: minmax(220px, 280px) 1fr minmax(240px, 340px);
  gap: 10px; min-height: 0; min-width: 0; padding: 0 12px; position: relative; z-index: 5;
}
.panel, .stage, .left, .right, .bar, .top {
  min-width: 0;
}
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(18,21,28,.86), rgba(10,12,16,.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 22px; min-height: 0; display: flex; flex-direction: column;
}
.ph {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.62rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  padding: 14px 16px 8px;
}

.log {
  flex: 1; overflow: auto; padding: 0 16px 12px;
  font-size: 0.78rem; line-height: 1.55; color: var(--muted);
}
.log div { margin: 0 0 8px; }
.log time {
  color: var(--gold); font-family: var(--font-mono); font-size: 0.62rem;
  margin-right: 6px; white-space: nowrap;
}
.log .sys { color: var(--faint); }
.log .me { color: var(--ink); }
.log .rex { color: var(--ice); }

.tele {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 14px;
}
.tele > div {
  padding: 8px 10px; border-radius: 12px;
  background: rgba(7,8,11,.45); border: 1px solid var(--line);
}
.tele b {
  display: block; font-family: var(--font-mono); font-weight: 500;
  font-size: 0.52rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 3px;
}
.tele span {
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  color: var(--ink); letter-spacing: -0.02em;
}

/* globe stage */
.stage {
  position: relative; min-height: 0; overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 55% 50% at 50% 48%, rgba(142,236,255,.08), transparent 62%),
    linear-gradient(180deg, #0a0c11, #07080b);
  border: 1px solid var(--line);
}
#globe {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  touch-action: none; cursor: grab;
}
#globe:active { cursor: grabbing; }
.orbit, .orbit-gold {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(58%, 420px); aspect-ratio: 1; pointer-events: none;
  border-radius: 50%;
}
.orbit {
  border: 1px dashed rgba(142,236,255,.28);
  box-shadow: 0 0 40px rgba(142,236,255,.08) inset;
  animation: spin 48s linear infinite;
}
.orbit-gold {
  width: min(66%, 480px);
  border: 1px dashed rgba(212,176,122,.22);
  animation: spin-rev 72s linear infinite;
}
.stage.talking .orbit {
  border-style: solid; border-color: rgba(142,236,255,.7);
  box-shadow: 0 0 28px rgba(142,236,255,.32), 0 0 60px rgba(142,236,255,.12) inset;
  animation: spin 12s linear infinite, pulse 1.1s ease-in-out infinite;
}
.stage.talking .orbit-gold {
  border-style: solid; border-color: rgba(212,176,122,.55);
  box-shadow: 0 0 24px rgba(212,176,122,.18);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-rev { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes pulse { 50% { transform: translate(-50%, -50%) scale(1.035) rotate(180deg); } }
.status {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
  text-shadow: 0 0 16px rgba(212,176,122,.35); white-space: nowrap;
  pointer-events: none;
}
.scan-read {
  position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%);
  z-index: 2; pointer-events: none;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.62rem;
  letter-spacing: 0.16em; color: var(--ice);
  background: rgba(7,8,11,.62); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px;
  backdrop-filter: blur(10px);
}
.eye-bar {
  position: absolute; left: 10px; top: 40px; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 6px;
  max-width: min(100% - 20px, 420px);
  pointer-events: auto;
}
.eye-chip {
  appearance: none; cursor: pointer;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(7,8,11,.72);
  color: var(--faint);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eye-chip b {
  font-weight: 600; margin-left: 5px; color: inherit; opacity: 0.85;
}
.eye-chip.on {
  color: var(--ice); border-color: rgba(142,236,255,.5);
  background: var(--ice-dim);
}
.eye-chip[data-layer="events"].on {
  color: #ffb4a8; border-color: rgba(240,113,103,.45);
  background: rgba(240,113,103,.12);
}
.eye-card {
  position: absolute; right: 10px; top: 40px; z-index: 3;
  width: min(230px, calc(100% - 24px));
  padding: 10px 12px 12px;
  border-radius: 16px;
  background: rgba(8,10,14,.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.eye-card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ice);
  margin-bottom: 8px;
}
.eye-card-h button {
  appearance: none; cursor: pointer; border: 0; background: transparent;
  color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 0 2px;
}
.eye-kv { grid-template-columns: 64px 1fr; font-size: 0.78rem; }
.eye-credit {
  position: absolute; left: 12px; bottom: 32px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.48rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
  pointer-events: none; max-width: 46%;
}
.slogan {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; z-index: 2;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(.68rem, 1.6vw, .86rem);
  letter-spacing: 0.12em; color: var(--ink);
  text-shadow: 0 8px 24px rgba(0,0,0,.55);
  padding: 0 8px; pointer-events: none;
}
.slogan span { color: var(--ice); }

.rex-box {
  flex: 0 0 auto; margin: 0 14px 10px; padding: 12px 14px;
  min-height: 96px; border-radius: 16px;
  background: rgba(7,8,11,.45);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ice);
}
.rex-box p { overflow-wrap: anywhere; word-break: break-word; margin: 0; color: var(--ink); line-height: 1.5; font-size: 0.92rem; }
.rex-box .who {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.58rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ice); margin: 0 0 8px;
}

.intel { flex: 1; overflow: auto; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.intel:empty::before {
  content: "Kein Ziel. Nenn einen Ort, oder ich fange an, den Planeten zu scannen. Beides wäre produktiv.";
  color: var(--faint); font-size: 0.84rem; line-height: 1.55;
}
.shot {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16/9; background: #0a0c10; max-height: 160px;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kv {
  display: grid; grid-template-columns: 88px 1fr; gap: 8px 8px;
  font-size: 0.82rem; color: var(--muted);
}
.kv b {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); padding-top: 3px;
}
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.news a {
  display: block; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(7,8,11,.45);
  color: var(--ink); font-size: 0.8rem; line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.news a:hover { border-color: rgba(142,236,255,.45); background: var(--ice-dim); }

/* command */
.bar {
  z-index: 6;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.bar-inner {
  position: relative;
  display: flex; gap: 8px; align-items: center;
  padding: 8px; border-radius: 999px;
  background: rgba(8, 9, 12, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
#cmd {
  flex: 1 1 0; width: 0; min-width: 0; appearance: none; border: 0; outline: none;
  background: transparent; color: var(--ink); padding: 10px 12px;
  font-size: 15px;
}
#cmd::placeholder { color: var(--faint); }
.go {
  appearance: none; border: 0; cursor: pointer; border-radius: 999px;
  padding: 10px 16px; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.04em; color: #071016;
  background: linear-gradient(180deg, #b7f4ff, var(--ice));
  transition: transform .2s var(--ease);
}
.go:hover { transform: translateY(-1px); }
.hints {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 2px 0;
}
.hints button {
  appearance: none; cursor: pointer; border-radius: 999px; padding: 6px 12px;
  border: 1px solid var(--line); background: rgba(12,14,19,.55);
  color: var(--muted); font-size: 0.72rem;
  transition: border-color .2s, color .2s, transform .2s var(--ease);
}
.hints button:hover { border-color: var(--ice); color: var(--ice); transform: translateY(-1px); }

@media (max-width: 980px) {
  .shell, .main, .bar, .top, .panel, .stage, .right { width: 100%; max-width: 100%; min-width: 0; }
  .main { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(240px, 42vh) minmax(0, 1fr); }
  .left { display: none; }
  .stage { min-height: 240px; border-radius: 20px; }
  .slogan { letter-spacing: .06em; font-size: .58rem; bottom: 8px; white-space: normal; }
  .orbit { width: min(64%, 280px); }
  .orbit-gold { width: min(74%, 320px); }
  .scan-read { bottom: 32px; }
  .eye-bar { top: 36px; max-width: calc(100% - 16px); }
  .eye-card { top: auto; bottom: 52px; right: 8px; left: 8px; width: auto; }
  .eye-credit { display: none; }
  .vol { width: 56px; }
  .brand { font-size: 0.82rem; }
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .top-actions { margin-left: 0; }
  .bar-inner {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    border-radius: 18px;
    width: 100%;
    max-width: 100%;
  }
  #cmd { width: auto; flex: none; min-width: 0; }
  .go { display: inline-flex; align-items: center; }
  .rex-box, .intel, .log { max-width: 100%; }
}
@media (max-width: 520px) {
  .vol, .pill { display: none; }
  .icon-btn {
    width: 38px; height: 38px;
    background: rgba(12, 14, 19, 0.9);
    border-color: rgba(142, 236, 255, 0.28);
  }
  .go { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit, .orbit-gold, .stage.talking .orbit, .pill.live::before, .cta { animation: none; }
  .cta:hover, .go:hover, .hints button:hover { transform: none; }
}
