/* PENUMBRA — Styles
   CSS animation rule: ONLY transform + opacity. Never width/height/box-shadow/top.
   All bar fills use scaleX on a fixed-width inner element.
   All slide-ins use translateY. Glow uses pseudo-element opacity. */

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

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #030308;
  color: #e0e8ff;
  font-family: 'Rajdhani', monospace;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;  /* dynamic viewport height — excludes mobile browser chrome */
  overflow: hidden;
}

#canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ─── Dashboard (250px right panel) ─────────────────────────────────────── */
#dashboard {
  width: 250px;
  min-width: 250px;
  height: 100vh;
  background: rgba(8, 8, 24, 0.95);
  border-left: 1px solid rgba(0, 245, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ─── ARIA Callout Card ───────────────────────────────────────────────────── */
#aria-callout {
  border: 1px solid rgba(0, 245, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.2);
  margin: 10px;
  padding: 10px 12px;
  background: rgba(8, 8, 24, 0.97);
  border-radius: 2px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  flex-shrink: 0;
}

/* Idle / passive state — always visible, intentionally dim */
#aria-callout.idle {
  border-color: rgba(0, 245, 255, 0.22);
  box-shadow: none;
}
#aria-callout.idle #callout-title { color: #4488aa; }
#aria-callout.idle #callout-body  { color: #4a6677; }

#aria-callout.override {
  border-color: rgba(255, 51, 68, 0.6);
  box-shadow: 0 0 12px rgba(255, 51, 68, 0.25);
}

#callout-title {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #00f5ff;
  margin-bottom: 6px;
}

#aria-callout.override #callout-title { color: #ff3344; }

#callout-body {
  font-size: 11px;
  color: #e0e8ff;
  line-height: 1.5;
}

/* ─── Dashboard sections ─────────────────────────────────────────────────── */
.dash-section {
  border-bottom: 1px solid rgba(0, 245, 255, 0.08);
  padding: 10px 12px;
  flex-shrink: 0;
}

.dash-label {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #556699;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* ─── ARIA Status ─────────────────────────────────────────────────────────── */
#aria-status {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ffaa00;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}

.status-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

#aria-status-bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 100%;   /* scaleX controls apparent width */
  background: #ffaa00;
  transform-origin: left center;
  transform: scaleX(0.5);
  transition: background 0.5s ease;
}

/* ─── Mission timer ─────────────────────────────────────────────────────── */
#mission-timer {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #00ffaa;
  letter-spacing: 0.04em;
  display: block;
  text-align: center;
  margin: 4px 0;
}

#mission-name {
  font-size: 9px;
  color: #556699;
  text-align: center;
  display: block;
  margin-bottom: 2px;
}

/* ─── Health / Shield bars ───────────────────────────────────────────────── */
.stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 9px;
  color: #556699;
  width: 40px;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.07);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.bar-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 100%;   /* visual width controlled by scaleX */
  transform-origin: left center;
  transform: scaleX(1);
  border-radius: 1px;
}

#health-fill { background: #00ffaa; }
#shield-fill { background: #00f5ff; }

/* ─── Signal bars ─────────────────────────────────────────────────────────── */
.signal-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 10px;
  transition: color 0.5s ease;
}

.signal-label { width: 48px; flex-shrink: 0; font-weight: 600; }

.signal-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.07);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.signal-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 100%;   /* controlled by scaleX */
  transform-origin: left center;
  transform: scaleX(0.5);
  background: currentColor;
  border-radius: 1px;
}

.bar-val { width: 36px; text-align: right; font-size: 9px; flex-shrink: 0; }

/* ─── Active parameters ───────────────────────────────────────────────────── */
.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 10px;
}

.param-key   { color: #556699; font-size: 9px; }
.param-val   { color: #e0e8ff; font-size: 10px; font-weight: 600; text-align: right; }

/* AI ASSIST indicator */
.param-val[data-assist="1"]::after {
  content: ' ▲ AI';
  color: #00f5ff;
  font-size: 8px;
  font-weight: 400;
}

/* ─── ARIA Feed ───────────────────────────────────────────────────────────── */
#aria-feed-list {
  list-style: none;
  font-size: 10px;
  line-height: 1.5;
  max-height: 90px;
  overflow: hidden;
}

#aria-feed-list li {
  color: #e0e8ff;
  padding: 1px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  opacity: 1;
  transition: opacity 0.5s ease;
}

#aria-feed-list li:nth-child(2) { opacity: 0.75; }
#aria-feed-list li:nth-child(3) { opacity: 0.55; }
#aria-feed-list li:nth-child(4) { opacity: 0.38; }

.feed-time { color: #556699; font-size: 9px; margin-right: 4px; }

/* ─── Overlays (splash, briefing, dead, win) ──────────────────────────────── */
.screen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 8, 0.9);
  z-index: 100;
  text-align: center;
  padding: 24px;
  overflow-y: auto;
}

/* ─── Splash DDA explainer panel ────────────────────────────────────────── */
.splash-dda {
  margin: 14px 0 18px;
  padding: 16px 22px;
  border: 1px solid rgba(0,245,255,0.3);
  background: rgba(0,245,255,0.04);
  text-align: left;
  max-width: 580px;
  width: min(560px, 92vw);
}
.splash-dda-title {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00f5ff;
  letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 16px rgba(0,245,255,0.4);
}
.splash-dda-desc {
  font-size: 12px;
  color: #b0bcd8;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 14px;
}
.splash-dda-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,245,255,0.12);
}
.splash-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #c8d4e8;
  line-height: 1.5;
  text-align: left;
  padding: 4px 0;
}
.splash-rule-icon {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  line-height: 1;
}
.splash-dda-cols {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 14px;
}
.splash-dda-col {
  flex: 1;
  background: rgba(0,245,255,0.04);
  border: 1px solid rgba(0,245,255,0.18);
  padding: 12px 14px;
}
.splash-col-head {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: #00f5ff;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(0,245,255,0.2);
}
.splash-col-item {
  font-size: 14px;
  color: #c8d4e8;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.splash-col-item::before {
  content: '› ';
  color: #556699;
}
.splash-dda-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 900;
  color: #00f5ff;
  text-shadow: 0 0 20px rgba(0,245,255,0.6);
  background: rgba(0,245,255,0.04);
  border-top: 1px solid rgba(0,245,255,0.18);
  border-bottom: 1px solid rgba(0,245,255,0.18);
}
.splash-dda-hint {
  font-size: 11px;
  color: #7799aa;
  line-height: 1.6;
  text-align: center;
  border-top: 1px solid rgba(0,245,255,0.1);
  padding-top: 10px;
  margin-bottom: 0;
}

.screen-overlay h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 900;
  color: #00f5ff;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(0,245,255,0.6);
}

.screen-overlay h2 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(14px, 2.5vw, 22px);
  font-weight: 700;
  color: #00f5ff;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.screen-overlay p {
  font-size: clamp(11px, 1.8vw, 14px);
  color: #e0e8ff;
  max-width: 420px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.screen-overlay .tagline {
  font-size: clamp(10px, 1.5vw, 13px);
  color: #556699;
  font-style: italic;
  margin-bottom: 24px;
}

.btn {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #030308;
  background: #00f5ff;
  border: none;
  padding: 10px 28px;
  cursor: pointer;
  margin: 6px;
  border-radius: 2px;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn:hover  { opacity: 0.85; }
.btn:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  color: #556699;
  border: 1px solid rgba(85,102,153,0.4);
}

.death-cause {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: #ff3344;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.aria-msg {
  font-size: 11px;
  color: #556699;
  font-style: italic;
  margin-bottom: 20px;
}

/* ─── Mission debrief panel ──────────────────────────────────────────────── */
.mission-debrief {
  margin: 8px 0 14px;
  padding: 18px 22px;
  border: 1px solid rgba(0,245,255,0.3);
  background: rgba(0,3,18,0.90);
  text-align: left;
  min-width: 360px;
  max-width: 720px;
  width: min(700px, 92vw);
  max-height: 60vh;
  overflow-y: auto;
  font-family: 'Rajdhani', monospace;
}

.db-title {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #00f5ff;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,245,255,0.15);
}

.db-head {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #445566;
  margin: 8px 0 3px;
  text-transform: uppercase;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.7;
}

.db-lbl {
  color: #6677aa;
  padding-right: 14px;
  white-space: nowrap;
  width: 48%;
}

.db-val {
  font-weight: 600;
}

.db-act-name {
  font-weight: 700;
  font-size: 12px;
  padding-right: 10px;
  white-space: nowrap;
  width: 28%;
}

.db-act-val {
  font-size: 11px;
  color: #b0bcd8;
}

.db-act-val strong {
  color: #e0e8ff;
}

.db-act-null {
  font-size: 11px;
  color: #334455;
  font-style: italic;
  padding: 2px 0;
}

.db-reason {
  font-size: 10px;
  color: #334466;
}

.db-assess {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,245,255,0.10);
  font-size: 10px;
  color: #556699;
  font-style: italic;
  line-height: 1.6;
}

/* ─── Mission briefing ────────────────────────────────────────────────────── */
#screen-briefing { z-index: 110; }

#brief-mission-name {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  color: #00f5ff;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

/* ─── Minimum size warning ───────────────────────────────────────────────── */
#small-screen-warn {
  display: none;
  position: fixed;
  inset: 0;
  background: #030308;
  color: #556699;
  font-family: 'Rajdhani', monospace;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 9999;
}

@media (max-width: 320px), (max-height: 420px) {
  #small-screen-warn { display: flex; }
  #app { display: none; }
}

/* ─── Tablet layout (600–900px) ──────────────────────────────────────────── */
@media (max-width: 900px) {
  #dashboard {
    width: 160px;
    min-width: 160px;
  }
  .param-row, .signal-row { font-size: 9px; }
}

/* ─── Mobile portrait (<600px) ───────────────────────────────────────────── */
@media (max-width: 599px) {
  /* Canvas fills full screen; dashboard overlays bottom edge */
  #app { flex-direction: column; position: relative; }
  #canvas-wrap { flex: 1; width: 100%; }

  #dashboard {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
    border-left: none;
    border-top: 1px solid rgba(0,245,255,0.18);
    background: rgba(3,3,8,0.88);
    backdrop-filter: blur(6px);
    padding: 0;
    gap: 0;
  }

  /* HUD bar: hide everything except fuel + credits (use IDs to avoid nth-child fragility) */
  #dashboard .dash-section { display: none; }
  #dash-fuel    { display: flex !important; }
  #dash-credits { display: flex !important; }
  #aria-callout { display: none; }  /* hide DDA callout — too wide for mobile bar */

  /* Hide mission name and section labels — just show the values */
  #mission-name { display: none; }
  #dash-fuel .dash-label { display: none; }
  #dash-credits .dash-label { display: none; }

  /* Show mobile-only fuel boost hint; hide the combined desktop hint */
  .mobile-fuel-hint { display: block; }

  #dashboard .dash-section {
    border-right: 1px solid rgba(0,245,255,0.08);
    border-bottom: none;
    padding: 6px 10px;
    flex-shrink: 0;
  }

  /* Win/dead screens: hide debrief so they fit without scrolling */
  .mission-debrief { display: none; }

  /* Splash: hide desktop notice, show mobile tip */
  .splash-device-notice { display: none; }
  .splash-mobile-notice { display: block; }
  /* Compact the DDA explainer to fit portrait screens */
  .splash-dda { padding: 10px 14px; margin: 8px 0 12px; }
  .splash-dda-cols { display: none; }
  .splash-dda-hint { display: none; }

  /* Systems bars hidden on mobile */
  #bar-nav, #bar-surv, #bar-prec, #bar-threat, #bar-explore { display: none; }

  /* Touch hint hidden on desktop — shown only via this block */
  #touch-hint { display: flex; }

  /* Elements not relevant on mobile (no-fog mode) */
  .mobile-hide { display: none !important; }
}

/* ─── Mobile landscape (height < 500px) ──────────────────────────────────── */
@media (max-height: 499px) and (orientation: landscape) {
  #dashboard { width: 160px; min-width: 160px; }
  #touch-hint { display: none; }
}

/* ─── Virtual joystick ───────────────────────────────────────────────────── */
#joy-base, #joy-thumb {
  display: none;
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  transform: translate(-50%, -50%);
}
#joy-base {
  width: 84px; height: 84px;
  border: 2px solid rgba(0,245,255,0.22);
  background: rgba(0,245,255,0.04);
}
#joy-thumb {
  width: 40px; height: 40px;
  border: 2px solid rgba(0,245,255,0.55);
  background: rgba(0,245,255,0.14);
  box-shadow: 0 0 10px rgba(0,245,255,0.2);
}

/* ─── Touch zone hint overlay ────────────────────────────────────────────── */
#touch-hint {
  display: none;            /* hidden on desktop; portrait mobile shows it */
  position: absolute;
  inset: 0;
  pointer-events: none;     /* never blocks touches */
  z-index: 10;
  transition: opacity 1.2s ease;
}
#touch-hint.hide { opacity: 0; }

.touch-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 28%;
  gap: 4px;
}
.touch-zone-left  { border-right: 1px solid rgba(0,245,255,0.08); }

.touch-icon {
  font-size: 28px;
  color: rgba(0,245,255,0.18);
  line-height: 1;
}
.touch-label {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(0,245,255,0.28);
  text-transform: uppercase;
}

/* ─── AI ASSIST tag enhancement ─────────────────────────────────────────── */
.param-val[data-assist="1"] {
  text-shadow: 0 0 10px rgba(0,245,255,0.5);
}
.param-val[data-assist="1"]::after {
  content: ' ◈AI';
  color: #00f5ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ─── Debrief v2 — ARIA Mission Analysis ─────────────────────────────────── */
.db2-header {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,245,255,0.25);
  margin-bottom: 10px;
}
.db2-eyebrow {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: #6688bb;
  letter-spacing: 0.18em;
  margin-bottom: 4px;
}
.db2-title {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 900;
  color: #00f5ff;
  letter-spacing: 0.14em;
  text-shadow: 0 0 28px rgba(0,245,255,0.55);
}
.db2-section-label {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: #7799bb;
  letter-spacing: 0.16em;
  margin: 10px 0 7px;
}
.db2-tiles {
  display: flex;
  gap: 5px;
}
.db2-tile {
  flex: 1;
  background: rgba(0,245,255,0.05);
  border: 1px solid rgba(0,245,255,0.2);
  padding: 12px 6px;
  text-align: center;
}
.db2-tile-val {
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
}
.db2-tile-lbl {
  font-size: 13px;
  color: #aabbcc;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.db2-divider {
  text-align: center;
  margin: 12px 0 8px;
  border-top: 1px solid rgba(0,245,255,0.12);
  padding-top: 8px;
}
.db2-divider span {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  color: #00f5ff;
  letter-spacing: 0.14em;
  opacity: 1.0;
}
.db2-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.db2-act-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.8;
}
.db2-act-dir {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  font-weight: 900;
  width: 18px;
  flex-shrink: 0;
}
.db2-act-label {
  font-weight: 700;
  font-size: 12px;
  width: 100px;
  flex-shrink: 0;
}
.db2-act-change {
  flex: 1;
  color: #c8d4e8;
}
.db2-from {
  color: #7799bb;
  font-size: 11px;
}
.db2-act-why {
  font-size: 10px;
  color: #8899aa;
  text-align: right;
  flex-shrink: 0;
  max-width: 160px;
}
.db2-act-null {
  font-size: 10px;
  color: #334455;
  font-style: italic;
  padding: 4px 0;
}
.db2-assess {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(0,245,255,0.06);
  border-left: 3px solid rgba(0,245,255,0.6);
  font-size: 12px;
  color: #00f5ff;
  font-style: italic;
  line-height: 1.7;
}

/* Credits hint bar in debrief */
.db2-credits-hint {
  margin: 6px 0 4px;
  padding: 6px 10px;
  background: rgba(255,204,0,0.07);
  border: 1px solid rgba(255,204,0,0.25);
  border-radius: 2px;
  font-size: 11px;
  color: #bbaa66;
  letter-spacing: .04em;
}

/* Mobile-only fuel boost hint (hidden on desktop) */
.mobile-fuel-hint { display: none; }

/* Credits hint in sidebar dashboard */
.credits-hint {
  font-size: 10px;
  color: #667755;
  margin-top: 3px;
  letter-spacing: .03em;
}
.cr-cost {
  color: #ffcc00;
  font-weight: 700;
}

/* ─── Briefing ARIA recalibration panel ─────────────────────────────────── */
.brief-aria-panel {
  margin: 12px 0;
  padding: 10px 16px;
  border: 1px solid rgba(0,245,255,0.35);
  background: rgba(0,245,255,0.06);
  text-align: left;
  min-width: 260px;
}
.brief-adj-header {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: #00f5ff;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(0,245,255,0.4);
}
.brief-adj-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 4px;
}
.brief-adj-key {
  color: #556699;
  font-size: 10px;
  width: 72px;
  flex-shrink: 0;
}
.brief-adj-val {
  color: #e0e8ff;
  font-weight: 700;
  flex: 1;
}
.brief-adj-tag {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  color: #00f5ff;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ─── Controls Reference (HUD sidebar) ──────────────────────────────────── */
.ctrl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.ctrl-row-credit { margin-top: 4px; }
.ctrl-key {
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  font-weight: 700;
  color: #00f5ff;
  background: rgba(0,245,255,0.07);
  border: 1px solid rgba(0,245,255,0.28);
  padding: 2px 5px;
  border-radius: 2px;
  min-width: 54px;
  text-align: center;
  letter-spacing: .04em;
}
.ctrl-desc {
  font-size: 10px;
  color: #7799aa;
}
.ctrl-credit {
  color: #ffcc00;
  background: rgba(255,204,0,0.07);
  border-color: rgba(255,204,0,0.28);
}
.ctrl-pres {
  color: #ff8800;
  background: rgba(255,136,0,0.07);
  border-color: rgba(255,136,0,0.28);
}
.ctrl-divider {
  font-size: 8px;
  color: #ff8800;
  letter-spacing: .1em;
  margin: 7px 0 4px;
  opacity: 0.8;
}

/* ─── Presenter Mode ─────────────────────────────────────────────────────── */

/* Mobile controls/feature tip — only shown on mobile (hidden by default) */
.splash-mobile-notice {
  display: none;
  font-size: 12px;
  color: #7799aa;
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(0,245,255,0.12);
  border-radius: 5px;
  background: rgba(0,245,255,0.03);
  max-width: 360px;
  text-align: center;
}

/* Device notice banner — top of splash (desktop only) */
.splash-device-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,245,255,0.06);
  border: 1px solid rgba(0,245,255,0.22);
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 18px;
  text-align: left;
}
.splash-notice-icon {
  font-size: 22px;
  flex-shrink: 0;
  opacity: 0.7;
}
.splash-notice-title {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00f5ff;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.splash-notice-sub {
  font-size: 11px;
  color: #7799aa;
  letter-spacing: .03em;
}

/* Splash toggle button */
.presenter-btn-off {
  margin-top: 8px;
  opacity: 0.55;
  border-color: rgba(0,245,255,0.25) !important;
  color: #556677 !important;
  font-size: 10px !important;
  padding: 6px 18px !important;
}
.presenter-btn-on {
  margin-top: 8px;
  border-color: #ff8800 !important;
  color: #ff8800 !important;
  font-size: 10px !important;
  padding: 6px 18px !important;
  box-shadow: 0 0 10px rgba(255,136,0,0.4) !important;
}

/* Presenter toolbar (overlaid at top of canvas-wrap) */
#presenter-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(8, 4, 0, 0.88);
  border-bottom: 1px solid rgba(255,136,0,0.45);
  backdrop-filter: blur(4px);
}

.pbar-label {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: #ff8800;
  letter-spacing: .12em;
  font-weight: 700;
  margin-right: 4px;
  white-space: nowrap;
}

.pbar-group {
  display: flex;
  gap: 3px;
}

.pbar-btn {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,245,255,0.3);
  color: #00f5ff;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.pbar-btn:hover {
  background: rgba(0,245,255,0.12);
  border-color: rgba(0,245,255,0.7);
}

.pbar-reset {
  border-color: rgba(0,245,255,0.25);
  color: #aaccdd;
}
.pbar-reset:hover {
  background: rgba(0,245,255,0.08);
}

.pbar-win {
  border-color: rgba(0,255,170,0.4);
  color: #00ffaa;
}
.pbar-win:hover { background: rgba(0,255,170,0.12); }

.pbar-lose {
  border-color: rgba(255,51,68,0.4);
  color: #ff3344;
}
.pbar-lose:hover { background: rgba(255,51,68,0.12); }

.pbar-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.12);
  margin: 0 2px;
}

/* Disable win/lose buttons when not in playing phase */
.pbar-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
