:root {
  --cyan: #1ad8ff;
  --cyan-hot: #7af4ff;
  --cyan-dim: #0aa0c8;
  --teal: #3ee8c8;
  --mint: #9ef8e0;
  --magenta: #e85cff;
  --magenta-hot: #ff8aff;
  --pink: #ff6ab8;
  --gold: #ffc44a;
  --gold-hot: #ffe07a;
  --purple: #9b5cff;
  --red: #ff4a6a;
  --navy: #071428;
  --ink: #e8f8ff;
  --muted: #7aa8c8;
  --panel: rgba(8, 16, 36, 0.92);
  --panel-2: rgba(10, 18, 40, 0.88);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a2040;
  color: var(--ink);
  font-family: "Rajdhani", "Exo 2", "Segoe UI", sans-serif;
  user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  background: #0a2848;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

button { font-family: inherit; cursor: pointer; }

/* ========== FLOATING WORLD LABELS ========== */
#float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.floater {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  pointer-events: none;
  font-family: "Orbitron", "Share Tech Mono", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.floater.pink {
  color: #4a1848;
  background: #f4b0d8;
  border: 1px solid #f8c8e4;
}

.floater.teal {
  color: #103848;
  background: #b8ece0;
  border: 1px solid #d0f8f0;
}

.floater.purple {
  color: #f0d8ff;
  background: #5a2a78;
  border: 1px solid #8a58b0;
}

.floater.green {
  color: #123820;
  background: #8ee0a0;
  border: 1px solid #b8f0c4;
}

.floater.salmon {
  color: #4a2018;
  background: #f0a090;
  border: 1px solid #f8c0b0;
}

.floater.gold {
  color: #3a3010;
  background: #e8d070;
  border: 1px solid #f4e8a0;
}

.floater.crit {
  font-size: 18px;
  font-weight: 900;
  color: #8ee0a0;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow: 0 0 12px #3ee880;
  padding: 0;
}

.floater.dmg {
  font-size: 15px;
  color: #ff8ad0;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow: 0 0 10px #ff4aa8;
  padding: 0;
}

/* ========== HUD ========== */
#hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

#hud button { pointer-events: auto; }

#hud-tl {
  position: absolute;
  top: 1.4%;
  left: 1.2%;
  width: min(360px, 22vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hud-tc {
  position: absolute;
  top: 1.15%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(720px, 46vw);
}

#hud-tr {
  position: absolute;
  top: 1.15%;
  right: 1.15%;
}

#hud-bl {
  position: absolute;
  bottom: 2.0%;
  left: 1.15%;
  width: min(430px, 28vw);
}

#hud-bc {
  position: absolute;
  bottom: 2.0%;
  left: 50%;
  transform: translateX(-50%);
}

#hud-br {
  position: absolute;
  bottom: 1.8%;
  right: 1.15%;
}

/* ----- title ----- */
#title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: linear-gradient(90deg, rgba(8, 40, 70, 0.95), rgba(6, 28, 56, 0.92));
  border: 1.5px solid #1ad8ff;
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(26, 216, 255, 0.28), inset 0 0 18px rgba(20, 160, 220, 0.12);
}

#title-bar.big {
  padding: 10px 18px 10px 10px;
  margin: 0 auto 8px;
  width: fit-content;
}

#title-extract {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(26, 216, 255, 0.35));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.title-ico {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #1ad8ff);
}

.title-main {
  font-family: "Orbitron", "Audiowide", sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: #f2fbff;
  text-shadow: 0 0 10px #1ad8ff;
  line-height: 1.05;
}

.title-sub {
  font-family: "Share Tech Mono", "Rajdhani", monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #1ad8ff;
  margin-top: 2px;
}

/* ----- carebot card ----- */
#carebot-card {
  background: linear-gradient(180deg, rgba(8, 18, 40, 0.94), rgba(6, 14, 32, 0.92));
  border: 1.5px solid #1ad8ff;
  border-radius: 12px;
  padding: 8px 12px 8px 12px;
  box-shadow: 0 0 16px rgba(26, 216, 255, 0.18);
}

.cb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cb-name {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #e8f8ff;
}

.cb-lvl {
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1ad8ff;
  border: 1px solid #1ad8ff;
  border-radius: 6px;
  padding: 2px 8px;
  background: rgba(10, 40, 70, 0.7);
}

.cb-batt-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #8ab8d0;
  font-family: "Share Tech Mono", monospace;
}

.cb-batt-num { color: #c8e8f8; }

.cb-bar {
  position: relative;
  height: 8px;
  margin: 6px 0 7px;
  background: #0a1228;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #163050;
}

.cb-bar i {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
}

#bar-batt-cyan {
  left: 0;
  width: 48%;
  background: linear-gradient(90deg, #14c8e8, #3ee8ff);
}

#bar-batt-mag {
  left: 48%;
  width: 14%;
  background: linear-gradient(90deg, #c040ff, #e85cff);
}

.cb-warn {
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #ff6ad0;
  text-shadow: 0 0 8px #ff4aa8;
}

/* ----- shift + alert ----- */
#shift-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #3a1848, #4a2060);
  border: 1.5px solid #e85cff;
  border-radius: 22px;
  padding: 5px 8px 5px 18px;
  box-shadow: 0 0 16px rgba(232, 92, 255, 0.28);
}

.shift-lab {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #f4c8ff;
}

.shift-time {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #f8e0ff;
  background: #2a1038;
  border: 1.5px solid #e85cff;
  border-radius: 16px;
  padding: 3px 14px;
}

#alert-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(90deg, #8a3050, #a04058);
  border: 1px solid #c85870;
  border-radius: 4px;
  padding: 5px 14px;
  box-shadow: 0 0 12px rgba(200, 64, 80, 0.25);
}

.alert-ico {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffe8a0;
  font-size: 13px;
}

#hud-alert {
  font-family: "Share Tech Mono", "Orbitron", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffe0e8;
}

/* ----- score ----- */
#score-bar {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  background: linear-gradient(90deg, rgba(8, 16, 36, 0.94), rgba(12, 20, 44, 0.92));
  border: 1.5px solid #1ad8ff;
  border-radius: 12px;
  padding: 6px 16px 8px;
  box-shadow: 0 0 16px rgba(26, 216, 255, 0.2);
}

.sc-lab {
  font-family: "Share Tech Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #7aa8c8;
  text-align: right;
}

.sc-val {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.sc-val.cyan { color: #1ad8ff; text-shadow: 0 0 10px #1ad8ff; }
.sc-val.gold { color: #ffc44a; font-size: 16px; }
.sc-val.mag { color: #e85cff; text-shadow: 0 0 10px #e85cff; }

.mini-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.star { color: #ffc44a; font-size: 14px; }
.fire { font-size: 14px; }

/* ----- parasites ----- */
.hook-banner {
  font-family: "Share Tech Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #e85cff;
  background: linear-gradient(90deg, #4a1860, #3a1450);
  border: 1px solid #e85cff;
  border-radius: 6px 6px 0 0;
  padding: 4px 10px;
  width: fit-content;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

#parasite-card {
  background: linear-gradient(180deg, rgba(28, 8, 48, 0.94), rgba(16, 6, 32, 0.92));
  border: 1.5px solid #e85cff;
  border-radius: 0 12px 12px 12px;
  padding: 10px 12px 12px;
  box-shadow: 0 0 18px rgba(232, 92, 255, 0.22);
}

.par-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.par-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #e85cff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.par-title img, .par-name img { display: none; }

.par-cap {
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #c080e0;
}

.par-slot {
  border: 1px solid #8a40b0;
  border-radius: 8px;
  padding: 6px 10px 8px;
  margin-top: 6px;
  background: rgba(20, 6, 36, 0.55);
  opacity: 0.4;
}

.par-slot.attached { opacity: 1; }

.par-name {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0c8ff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.par-tag {
  margin-left: auto;
  font-size: 9px;
  color: #e85cff;
  letter-spacing: 0.12em;
}

.par-up {
  font-size: 11px;
  color: #3ee8c8;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.par-dn {
  font-size: 11px;
  color: #ff6ab8;
  letter-spacing: 0.02em;
}

.par-meter {
  height: 4px;
  background: #1a0830;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.par-meter i {
  display: block;
  height: 100%;
  width: 70%;
  background: linear-gradient(90deg, #e85cff, #ff8aff);
}

/* ----- abilities ----- */
.ability-row {
  display: flex;
  gap: 8px;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.94), rgba(6, 10, 24, 0.92));
  border: 1.5px solid #1a2848;
  border-radius: 16px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ab {
  position: relative;
  width: 76px;
  height: 80px;
  border: none;
  background: transparent;
  padding: 0;
  overflow: hidden;
  pointer-events: auto;
}

.ab.cyan { filter: drop-shadow(0 0 8px rgba(26, 216, 255, 0.35)); }
.ab.purple { filter: drop-shadow(0 0 8px rgba(122, 92, 255, 0.35)); }
.ab.blue { filter: drop-shadow(0 0 8px rgba(58, 120, 255, 0.35)); }
.ab.red { filter: drop-shadow(0 0 8px rgba(255, 74, 106, 0.35)); }
.ab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.ab-key, .ab-name { display: none; }

.ab-cd {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.62);
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
}

.ab.cooling .ab-cd { transform: scaleY(1); }

/* ----- radar ----- */
#radar-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, rgba(8, 18, 40, 0.94), rgba(6, 14, 32, 0.92));
  border: 1.5px solid #1ad8ff;
  border-radius: 14px;
  padding: 10px 14px 10px 10px;
  box-shadow: 0 0 16px rgba(26, 216, 255, 0.18);
}

#radar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, #062038 0%, #041428 70%);
  border: 2px solid #1ad8ff;
}

.radar-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #e8f8ff;
  margin-bottom: 6px;
}

.radar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
}

.r-name {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  color: #c8e0f0;
}

.r-pill {
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}

.r-pill.red { background: #c03048; color: #ffe0e4; }
.r-pill.green { background: #2a9a48; color: #e0ffe8; }
.r-pill.gold { background: #c09020; color: #fff4d0; }
.r-pill.teal { background: #1a8898; color: #e0ffff; }

/* ========== MENU / RESULTS ========== */
#menu, #results, #pause {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(8, 30, 60, 0.55), rgba(4, 10, 24, 0.78));
}

.menu-card {
  width: min(720px, 90vw);
  background: linear-gradient(180deg, rgba(8, 20, 44, 0.94), rgba(6, 14, 32, 0.94));
  border: 1.5px solid #1ad8ff;
  border-radius: 18px;
  padding: 22px 28px 24px;
  box-shadow: 0 0 40px rgba(26, 216, 255, 0.22), 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.menu-card.slim { width: min(360px, 80vw); }

.menu-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  height: 150px;
  margin: 12px 0 8px;
}

.menu-art img {
  height: 130px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
}

.menu-blurb {
  font-size: 15px;
  line-height: 1.45;
  color: #c8e0f0;
  margin: 8px 0 16px;
}

.menu-blurb b { color: #1ad8ff; }

#btn-play, #btn-again, #btn-resume {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 14px;
  color: #041428;
  background: linear-gradient(180deg, #7af4ff, #1ad8ff);
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  box-shadow: 0 0 18px rgba(26, 216, 255, 0.45);
}

#btn-play:hover, #btn-again:hover, #btn-resume:hover {
  filter: brightness(1.08);
}

.menu-controls {
  margin-top: 14px;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  color: #7aa8c8;
  line-height: 1.7;
}

kbd {
  display: inline-block;
  border: 1px solid #1ad8ff;
  border-radius: 4px;
  padding: 0 5px;
  color: #1ad8ff;
  background: rgba(8, 24, 48, 0.8);
}

.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 16px 0 18px;
  font-family: "Share Tech Mono", monospace;
  color: #8ab8d0;
}

.res-grid b {
  display: block;
  font-family: "Orbitron", sans-serif;
  color: #1ad8ff;
  font-size: 20px;
  margin-top: 2px;
}

@media (max-width: 1100px) {
  .title-main { font-size: 13px; }
  .sc-val { font-size: 16px; }
  .ab { width: 60px; height: 68px; }
  #hud-bl { width: min(340px, 34vw); }
}
