/* Trading-Game MVP · Vollbild-Spiel-Arena im neuen 2-Schriften-Design (Poppins 600 + Instrument Sans)
   Kein Website-Gefühl über der Falz: 100% Fullscreen-Spiel mit HUD, Level-Progression, Juice & Sound */

:root {
  --brand-font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --brand-font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --brand-input-bg: #080A0F;
  --brand-input-bg-filled: #080A0F;
  --brand-input-border: 1px solid rgba(255, 255, 255, 0.16);
  --brand-input-placeholder: #717A8D;
  --brand-input-placeholder-opacity: 1;

  /* Game Arena Palette */
  --arena-bg: #080A0F;
  --hud-bg: #10131B;
  --panel-bg: #141822;
  --panel-raised: #1C2230;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #F5F7FA;
  --ink-dim: #8D96A8;

  /* Game Signals (Arturs Markenfarben auf Dunkel) */
  --bull: #00D285;
  --bull-btn: #009B62;
  --bull-btn-hi: #00B572;
  --bear: #FF4D58;
  --bear-btn: #D9303B;
  --bear-btn-hi: #EE3E49;
  --gold: #D4AE7A;
  --gold-dim: #937154;
  --azure: #0077FF;
  --azure-hi: #1A86FF;

  /* Editorial SEO-Bereich unter dem Vollbild-Spiel */
  --page-bg: #FAF8F5;
  --page-card: #FFFFFF;
  --page-stone: #F3EFE8;
  --page-ink: #0A0A0A;
  --page-body: #3E3E44;
  --page-muted: #6B6B70;
  --page-line: rgba(10, 10, 10, 0.09);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--brand-font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.is-hidden {
  display: none !important;
}

/* =========================================================
   DUNKLE SPIEL-BÜHNE (100 % Game-Atmosphäre + Scroll-Rand)
   ========================================================= */
.game-stage-shell {
  background-color: #05070C;
  background-image:
    radial-gradient(ellipse 75% 45% at 50% 0%, rgba(212, 174, 122, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 85% 95%, rgba(0, 210, 133, 0.06) 0%, transparent 65%),
    radial-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-top-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stage-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #E4E8F0;
}
.stage-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 8px var(--bull);
}
.stage-wordmark {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #F5F7FA;
}
.stage-sep {
  color: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}
.stage-game-tag {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.stage-top-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-top-links a,
.stage-top-links button {
  color: #8D96A8;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  font-family: var(--brand-font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.stage-top-links a:hover,
.stage-top-links button:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.cabinet-outer {
  padding: 6px 24px 32px;
}

.game-viewport {
  width: 100%;
  max-width: 1240px;
  height: min(748px, calc(100dvh - 82px));
  min-height: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--arena-bg);
  border-radius: 20px;
  border: 1px solid rgba(212, 174, 122, 0.22);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 42px rgba(212, 174, 122, 0.06);
  position: relative;
  overflow: hidden;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

/* =========================================================
   ANIMIERTER RETRO PIXEL-ART INTRO-SCREEN (MONKEY-ISLAND-STIL)
   ========================================================= */
.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  padding: 36px 40px 34px;
  background: #080A0F;
  overflow: hidden;
  transform-origin: 64% 55%;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 360ms ease;
}
.intro-overlay.is-zooming {
  transform: scale(1.14);
  opacity: 0;
  pointer-events: none;
}

.intro-bg-img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: center 46%;
  image-rendering: auto;
  animation: introDrift 22s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes introDrift {
  0% { transform: scale(1.0) translate(0%, 0%); }
  100% { transform: scale(1.06) translate(-1.4%, -0.8%); }
}

.intro-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ruhiger dunkler Kontrast-Schleier links/unten, rechts bleiben Skyline & CRT-Monitore sichtbar */
.intro-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.88) 0%, rgba(8, 10, 15, 0.62) 48%, rgba(8, 10, 15, 0.18) 100%),
    linear-gradient(0deg, rgba(8, 10, 15, 0.86) 0%, rgba(8, 10, 15, 0.25) 45%, rgba(8, 10, 15, 0.18) 100%);
  z-index: 2;
}

.intro-content {
  position: relative;
  z-index: 3;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 19, 27, 0.82);
  border: 1px solid rgba(212, 174, 122, 0.45);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull);
}

.intro-title {
  margin: 0;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
}
.intro-subtitle {
  margin: -4px 0 0;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 23px);
  color: var(--gold);
}
.intro-story {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(245, 247, 250, 0.88);
  max-width: 510px;
}
.intro-story strong {
  color: #FFFFFF;
}

/* 6-Stufen-Story-Leiter */
.intro-ladder {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.ladder-step {
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(16, 19, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-dim);
}
.ladder-step.is-start {
  border-color: rgba(0, 210, 133, 0.55);
  color: var(--bull);
}
.ladder-step.is-goal {
  border-color: rgba(212, 174, 122, 0.6);
  color: var(--gold);
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.intro-start-btn {
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  background: var(--bull-btn);
  box-shadow: 0 4px 0 #006640, 0 10px 28px rgba(0, 155, 98, 0.35);
  color: #FFFFFF;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 90ms ease, background 120ms ease;
}
.intro-start-btn:hover {
  background: var(--bull-btn-hi);
}
.intro-start-btn:active {
  transform: translateY(2px);
}
.intro-lb-btn {
  height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(16, 19, 27, 0.78);
  color: #FFFFFF;
  font-family: var(--brand-font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.intro-lb-btn:hover {
  background: rgba(28, 34, 48, 0.92);
  border-color: rgba(255, 255, 255, 0.42);
}
.intro-hint {
  font-size: 12px;
  color: rgba(245, 247, 250, 0.62);
}

.game-viewport.glow-bull {
  box-shadow:
    inset 0 0 90px rgba(0, 210, 133, 0.14),
    0 28px 80px rgba(0, 0, 0, 0.65);
}
.game-viewport.glow-bear {
  box-shadow:
    inset 0 0 90px rgba(255, 77, 88, 0.16),
    0 28px 80px rgba(0, 0, 0, 0.65);
}
.game-viewport.glow-danger {
  border-color: rgba(255, 77, 88, 0.78);
  animation: dangerPulse 700ms ease-in-out infinite alternate;
}
@keyframes dangerPulse {
  0% {
    box-shadow: inset 0 0 70px rgba(255, 77, 88, 0.22), 0 0 30px rgba(255, 77, 88, 0.24);
  }
  100% {
    box-shadow: inset 0 0 130px rgba(255, 77, 88, 0.42), 0 0 54px rgba(255, 77, 88, 0.48);
  }
}
.game-viewport.is-shaking {
  animation: arenaShake 260ms cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes arenaShake {
  15%, 85% { transform: translate3d(-2px, 0, 0); }
  30%, 70% { transform: translate3d(3px, 1px, 0); }
  45%, 55% { transform: translate3d(-3px, -1px, 0); }
}

/* ---------------------------------------------------------
   OBERE GAME-HUD-LEISTE
   --------------------------------------------------------- */
.hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  background: var(--hud-bg);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 10;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.game-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}
.game-logo-top {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #FFFFFF;
  line-height: 1.1;
}
.game-logo-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Level & Upgrade-Fortschritt direkt im HUD */
.rank-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  background: var(--panel-bg);
  border: 1px solid rgba(212, 174, 122, 0.28);
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--gold-dim);
  color: #FFFFFF;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rank-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1;
}
.rank-next {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-dim);
}
.rank-xp-track {
  width: 136px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.rank-xp-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 320ms ease;
}

/* Mitte: Großer Live-Kontostand & Streak */
.hud-center {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hud-bankroll {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 12px;
  background: var(--arena-bg);
  border: 1px solid var(--line);
}
.bankroll-val {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 20px;
  color: #FFFFFF;
  line-height: 1.1;
}
.bankroll-pnl {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-dim);
}
.bankroll-pnl.is-up { color: var(--bull); }
.bankroll-pnl.is-down { color: var(--bear); }

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-dim);
}
.streak-pill.is-hot {
  border-color: rgba(212, 174, 122, 0.55);
  color: var(--gold);
  background: rgba(212, 174, 122, 0.11);
}

/* Rechts: Rangliste, Sound, Profil */
.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-bg);
  color: var(--ink);
  font-family: var(--brand-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hud-btn:hover {
  background: var(--panel-raised);
  border-color: rgba(255, 255, 255, 0.28);
}
.hud-btn-cta {
  background: var(--azure);
  border-color: var(--azure);
  color: #FFFFFF;
}
.hud-btn-cta:hover {
  background: var(--azure-hi);
  border-color: var(--azure-hi);
}
.hud-btn-cta.is-logged-in {
  background: var(--panel-raised);
  border-color: rgba(0, 210, 133, 0.45);
  color: var(--bull);
}

/* ---------------------------------------------------------
   SUB-LEISTE: MÄRKTE + AKTUELLER KURS + RUNDEN-TIMER
   --------------------------------------------------------- */
.arena-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  background: #0C0F16;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.market-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.market-pills::-webkit-scrollbar {
  display: none;
}
.m-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  color: var(--ink-dim);
  font-family: var(--brand-font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.m-pill:hover {
  color: #FFFFFF;
  border-color: var(--line-strong);
}
.m-pill.is-active {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #080A0F;
}
.m-pill.is-locked {
  border-style: dashed;
  color: #7D8699;
}
.m-pill.is-locked:hover {
  border-color: var(--azure);
  color: #FFFFFF;
}

.ticker-readout {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ticker-name {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 14px;
  color: #FFFFFF;
}
.ticker-price {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}
.ticker-chg {
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.ticker-chg.is-up { color: var(--bull); background: rgba(0, 210, 133, 0.14); }
.ticker-chg.is-down { color: var(--bear); background: rgba(255, 77, 88, 0.14); }

.round-counter {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(212, 174, 122, 0.12);
}

/* Runden-Fortschrittsbalken */
.round-progress-track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.round-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--bull);
  transition: width 140ms linear;
}

/* ---------------------------------------------------------
   HAUPT-SPIELFELD: EDGE-TO-EDGE CANDLESTICK ARENA
   --------------------------------------------------------- */
.arena-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 260px;
  width: 100%;
  overflow: hidden;
  background: var(--arena-bg);
}

#chartCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: pan-y;
}

#fxCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* Live-Positions-HUD schwebend oben links im Spielfeld */
.pos-hud {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(16, 19, 27, 0.92);
  border: 1px solid var(--line-strong);
  z-index: 5;
}
.pos-hud.is-long { border-color: rgba(0, 210, 133, 0.6); }
.pos-hud.is-short { border-color: rgba(255, 77, 88, 0.6); }
.pos-hud-badge {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}
.pos-hud-badge.is-long { background: rgba(0, 210, 133, 0.16); color: var(--bull); }
.pos-hud-badge.is-short { background: rgba(255, 77, 88, 0.16); color: var(--bear); }
.pos-hud-pnl {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 17px;
}
.pos-hud-pnl.is-up { color: var(--bull); }
.pos-hud-pnl.is-down { color: var(--bear); }
.pos-hud-sub {
  font-size: 12px;
  color: var(--ink-dim);
}

/* Live KI-Bot Boss-Duell Pill oben rechts im Spielfeld */
.bot-hud {
  position: absolute;
  top: 14px;
  right: 94px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(16, 19, 27, 0.88);
  border: 1px solid rgba(212, 174, 122, 0.30);
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 4;
}
.bot-hud-label {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.bot-hud-val {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 12.5px;
  color: #E4E8F0;
}
.bot-hud.is-beating {
  border-color: rgba(0, 210, 133, 0.55);
}
.bot-hud.is-beating .bot-hud-val {
  color: var(--bull);
}
.bot-hud.is-trailing {
  border-color: rgba(255, 77, 88, 0.45);
}
.bot-hud.is-trailing .bot-hud-val {
  color: var(--bear);
}

/* Level-Up Banner */
.levelup-banner {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--gold-dim);
  color: #FFFFFF;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 8;
}
.levelup-banner.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Floating Arcade-Score-Popups */
.float-pop {
  position: absolute;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 22px;
  pointer-events: none;
  z-index: 7;
  animation: floatUp 1150ms cubic-bezier(.16, 1, .3, 1) forwards;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}
.float-pop.is-win { color: var(--bull); }
.float-pop.is-loss { color: var(--bear); }
.float-pop.is-gold { color: var(--gold); }

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.85); }
  15% { opacity: 1; transform: translate(-50%, -6px) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -74px) scale(0.96); }
}

/* ---------------------------------------------------------
   UNTERE GAME-CONSOLE-LEISTE (Controller-Feeling!)
   --------------------------------------------------------- */
.console-dock {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--hud-bg);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 10;
}

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

.lev-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--arena-bg);
  border: 1px solid var(--line);
}
.lev-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-dim);
  padding: 0 8px 0 10px;
}
.lev-btn {
  height: 36px;
  min-width: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.lev-btn:hover { color: #FFFFFF; }
.lev-btn.is-active {
  background: var(--panel-raised);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(212, 174, 122, 0.55);
}
.lev-btn.is-danger.is-active {
  color: var(--bear);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 88, 0.65);
}

.speed-toggle {
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-bg);
  color: var(--ink);
  font-family: var(--brand-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.speed-toggle:hover { background: var(--panel-raised); }
.speed-toggle.is-fast {
  border-color: rgba(212, 174, 122, 0.55);
  color: var(--gold);
}

/* Zentrale fette Arcade-Buttons */
.dock-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.arcade-btn {
  flex: 1 1 0;
  max-width: 260px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 16px;
  color: #FFFFFF;
  cursor: pointer;
  transition: transform 90ms ease, background 120ms ease;
}
.arcade-btn:active {
  transform: translateY(2px) scale(0.985);
}
.arcade-btn-long {
  background: var(--bull-btn);
  box-shadow: 0 4px 0 #006640;
}
.arcade-btn-long:hover { background: var(--bull-btn-hi); }

.arcade-btn-short {
  background: var(--bear-btn);
  box-shadow: 0 4px 0 #8F1B23;
}
.arcade-btn-short:hover { background: var(--bear-btn-hi); }

.arcade-btn-close {
  max-width: 440px;
  background: var(--azure);
  box-shadow: 0 4px 0 #004EB3;
  justify-content: center;
  gap: 12px;
}
.arcade-btn-close:hover { background: var(--azure-hi); }

.key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--brand-font-body);
  font-size: 12px;
  font-weight: 700;
}
.key-cap-wide {
  padding: 0 9px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.dock-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dock-mini-btn {
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  color: var(--ink-dim);
  font-family: var(--brand-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dock-mini-btn:hover {
  color: #FFFFFF;
  border-color: var(--line-strong);
}
.dock-mini-btn.is-gold {
  color: var(--gold);
  border-color: rgba(212, 174, 122, 0.35);
}

/* Dezenter Scroll-Hinweis ganz unten (nur 24px hoch, stört das Spiel nicht) */
.info-anchor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px;
  background: #07090D;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  color: #6B7384;
  flex-shrink: 0;
}
.info-anchor-bar a {
  color: #8D96A8;
  text-decoration: none;
  font-weight: 600;
}
.info-anchor-bar a:hover {
  color: #FFFFFF;
}

/* =========================================================
   GAME-MODALS (Runden-Victory, Markt-Unlock, Rangliste)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.game-modal {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--hud-bg);
  color: var(--ink);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  padding: 24px 24px 26px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.modal-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 3px;
}
.modal-head h2 {
  margin: 0;
  font-size: 23px;
  color: #FFFFFF;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel-bg);
  color: #FFFFFF;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================================================
   RETRO CRT TERMINAL MODALS (1 Heldenzahl, Boss-Duell, 1 Feld)
   ========================================================= */
.crt-modal {
  max-width: 490px;
  position: relative;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(0, 210, 133, 0.07) 0%, transparent 65%),
    #0C1018;
  border: 1px solid rgba(212, 174, 122, 0.34);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.crt-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}
.crt-modal > * {
  position: relative;
  z-index: 1;
}
.crt-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.crt-head-meta .modal-eyebrow {
  margin-bottom: 0;
}
.crt-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 10px var(--bull);
  animation: crtBlink 1.8s ease-in-out infinite;
}
.crt-led.is-gold {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
@keyframes crtBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

/* 1 Heldenzahl + XP-Fortschritt */
.res-hero {
  text-align: center;
  padding: 2px 6px 12px;
}
.res-hero-delta {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: clamp(34px, 6.5vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}
.res-hero-delta.is-up {
  color: var(--bull);
  text-shadow: 0 0 28px rgba(0, 210, 133, 0.25);
}
.res-hero-delta.is-down {
  color: var(--bear);
  text-shadow: 0 0 28px rgba(255, 77, 88, 0.25);
}
.res-hero-title {
  margin: 5px 0 3px;
  font-size: 18px;
  color: #FFFFFF;
}
.res-hero-sub {
  font-size: 13px;
  color: var(--ink-dim);
}
.res-xp-wrap {
  margin-top: 10px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.res-xp-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #D5DCE8;
  margin-bottom: 6px;
}
.res-xp-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.res-xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--bull));
  transition: width 550ms cubic-bezier(.22, 1, .36, 1);
}

/* 1 Boss-Duell-Balken: Du vs. KI-Bot */
.boss-duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.boss-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.boss-side.is-right {
  text-align: right;
  align-items: flex-end;
}
.boss-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.boss-val {
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 18px;
  color: #FFFFFF;
}
.boss-val.is-up { color: var(--bull); }
.boss-val.is-down { color: var(--bear); }
.boss-verdict {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(212, 174, 122, 0.14);
  color: var(--gold);
  border: 1px solid rgba(212, 174, 122, 0.35);
}
.boss-verdict.is-win {
  background: rgba(0, 210, 133, 0.16);
  color: var(--bull);
  border-color: rgba(0, 210, 133, 0.4);
}
.boss-verdict.is-loss {
  background: rgba(255, 77, 88, 0.14);
  color: #FF8E95;
  border-color: rgba(255, 77, 88, 0.35);
}
.boss-book-hint {
  display: block;
  text-align: center;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.boss-book-hint:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Retro-Terminal 1-Feld-Speicher */
.crt-terminal-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(5, 8, 13, 0.92);
  border: 1px solid rgba(0, 210, 133, 0.32);
  margin-bottom: 14px;
}
.crt-term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--bull);
  margin-bottom: 6px;
}
.crt-prompt {
  color: var(--gold);
  font-weight: 700;
}
.crt-term-copy {
  margin: 0 0 11px;
  font-size: 13px;
  color: #C7CFDD;
  line-height: 1.45;
}
.crt-single-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.crt-submit-btn {
  width: auto;
  min-width: 126px;
  padding: 0 18px;
  height: 44px;
  border-radius: 10px;
  background: var(--bull-btn);
  color: #FFFFFF;
  font-size: 13.5px;
  letter-spacing: 0.03em;
}
.crt-submit-btn:hover {
  background: var(--bull-btn-hi);
}
.crt-modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  color: #FFFFFF;
}
.crt-modal-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #C7CFDD;
  line-height: 1.45;
}
.crt-unlock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crt-unlock-form .crt-submit-btn {
  width: 100%;
  height: 46px;
  font-size: 14px;
}
.crt-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.crt-input-prefix {
  position: absolute;
  left: 13px;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--bull);
  pointer-events: none;
  z-index: 2;
}
.crt-input-wrap input.game-input {
  padding-left: 38px !important;
}
.game-input,
.game-modal input.game-input:not([type="checkbox"]):not([type="radio"]),
.game-modal input.game-input[placeholder]:not(:placeholder-shown) {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #06090F;
  color: #FFFFFF;
  font-family: var(--brand-font-body);
  font-size: 14.5px;
}
.game-input::placeholder,
.game-modal input.game-input::placeholder {
  color: #717A8D;
  opacity: 1;
}
.game-input:focus,
.game-modal input.game-input:focus {
  outline: none;
  border-color: var(--bull);
  box-shadow: 0 0 0 3px rgba(0, 210, 133, 0.16);
}
.game-submit-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--bull-btn);
  color: #FFFFFF;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}
.game-submit-btn:hover { background: var(--bull-btn-hi); }

.consent-micro {
  margin: 9px 0 0;
  font-size: 11.5px;
  color: #7D8699;
  line-height: 1.45;
}
.game-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 210, 133, 0.12);
  border: 1px solid rgba(0, 210, 133, 0.35);
  color: #9BF3D0;
  font-size: 13px;
}
.game-feedback.is-error {
  background: rgba(255, 77, 88, 0.14);
  border-color: rgba(255, 77, 88, 0.4);
  color: #FFA3A8;
}

.modal-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-ghost-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-bg);
  color: var(--ink);
  font-family: var(--brand-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.modal-ghost-btn:hover { background: var(--panel-raised); }
.modal-next-btn {
  height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--bull-btn);
  color: #FFFFFF;
  font-family: var(--brand-font-heading);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.modal-next-btn:hover { background: var(--bull-btn-hi); }

/* Ranglisten-Tabelle im Game-Modal */
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.lb-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
}
.lb-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.lb-table tr.is-you {
  background: rgba(0, 119, 255, 0.12);
}
.lb-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--panel-raised);
  color: var(--ink-dim);
}
.lb-badge.is-you {
  background: rgba(0, 119, 255, 0.25);
  color: #8FC4FF;
}
.lb-pct { text-align: right; font-weight: 700; }
.lb-pct.is-up { color: var(--bull); }
.lb-pct.is-down { color: var(--bear); }

/* =========================================================
   SEO- & INFO-BEREICH UNTERHALB DES VOLLBILD-SPIELS (Hell, ruhig)
   ========================================================= */
.below-fold {
  background: var(--page-bg);
  color: var(--page-body);
  padding: 52px 0 42px;
}
.below-container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}
.below-head {
  max-width: 720px;
  margin-bottom: 28px;
}
.below-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin-bottom: 6px;
}
.below-head h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.6vw, 32px);
  color: var(--page-ink);
}
.below-head p {
  margin: 0;
  font-size: 15.5px;
}
.below-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.below-card {
  background: var(--page-card);
  border: 1px solid var(--page-line);
  border-radius: 16px;
  padding: 22px;
}
.below-card h2,
.below-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--page-ink);
}
.below-card p {
  margin: 0;
  font-size: 14.5px;
}

.below-cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  border-radius: 18px;
  background: #0B0B0D;
  color: #FFFFFF;
  margin-bottom: 32px;
}
.below-cta-strip h2 {
  margin: 0 0 4px;
  font-size: 21px;
  color: #FFFFFF;
}
.below-cta-strip p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 600px;
}
.below-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--azure);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
}
.below-cta-btn:hover { background: var(--azure-hi); color: #FFFFFF; }

.faq-list {
  max-width: 780px;
  margin-bottom: 34px;
}
.faq-list h2 {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--page-ink);
}
.faq-item {
  background: var(--page-card);
  border: 1px solid var(--page-line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq-item summary {
  font-weight: 600;
  color: var(--page-ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold-dim); font-size: 18px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 10px 0 0; font-size: 14.5px; }

.site-footer {
  border-top: 1px solid var(--page-line);
  padding-top: 22px;
  font-size: 12.5px;
  color: var(--page-muted);
}
.site-footer p { margin: 0 0 12px; }
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-row a {
  color: var(--page-muted);
  text-decoration: none;
  margin-right: 16px;
}
.footer-row a:hover { color: var(--page-ink); text-decoration: underline; }

/* =========================================================
   RESPONSIVE (Tablet & Mobil 390px)
   ========================================================= */
@media (max-width: 980px) {
  .rank-hud,
  .streak-pill {
    display: none;
  }
  .arena-strip {
    padding: 7px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .ticker-readout {
    justify-content: space-between;
  }
  .console-dock {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
  }
  .dock-left,
  .dock-right {
    justify-content: space-between;
  }
  .below-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .game-modal {
    padding: 18px 16px 18px;
  }
  .crt-terminal-box {
    padding: 11px 12px;
    margin-bottom: 10px;
  }
  .modal-action-row {
    flex-wrap: nowrap;
  }
  .modal-ghost-btn {
    padding: 0 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  .modal-next-btn {
    padding: 0 15px;
    font-size: 13px;
    white-space: nowrap;
  }
  .stage-top-bar {
    padding: 10px 12px 6px;
  }
  .stage-sep,
  .stage-game-tag {
    display: none;
  }
  .cabinet-outer {
    padding: 4px 10px 20px;
  }
  .bot-hud {
    top: auto;
    bottom: 34px;
    right: auto;
    left: 12px;
    padding: 4px 9px;
    font-size: 11px;
  }
  .crt-single-row {
    grid-template-columns: 1fr;
  }
  .crt-submit-btn {
    width: 100%;
  }
  .game-viewport {
    height: min(760px, calc(100dvh - 64px));
    min-height: 540px;
    border-radius: 16px;
  }
  .intro-overlay {
    padding: 20px 18px 22px;
    align-items: flex-end;
  }
  .intro-scrim {
    background: linear-gradient(0deg, rgba(8, 10, 15, 0.94) 0%, rgba(8, 10, 15, 0.65) 56%, rgba(8, 10, 15, 0.22) 100%);
  }
  .intro-ladder {
    display: none;
  }
  .intro-start-btn {
    width: 100%;
    justify-content: center;
  }
  .intro-lb-btn {
    width: 100%;
  }
  .hud-bar {
    padding: 8px 10px;
    gap: 6px;
  }
  .hud-left,
  .ticker-name,
  #soundBtnText,
  #soundBtn {
    display: none;
  }
  .hud-center {
    min-width: 0;
    gap: 6px;
  }
  .bankroll-val {
    font-size: 15px;
  }
  .bankroll-pnl {
    font-size: 11px;
  }
  .hud-bankroll {
    padding: 4px 9px;
    gap: 6px;
  }
  .hud-right {
    gap: 6px;
  }
  .hud-btn {
    height: 31px;
    padding: 0 9px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .arena-strip {
    padding: 7px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .ticker-readout {
    justify-content: space-between;
  }
  .arcade-btn {
    height: 50px;
    padding: 0 14px;
    font-size: 15px;
  }
  .key-cap {
    display: none;
  }
  .dock-left {
    flex-wrap: wrap;
  }
  .lev-label {
    display: none;
  }
  .score-grid,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }
  .below-container {
    padding: 0 14px;
  }
}
