:root {
  --cyan: #00f0ff;
  --cyan-hot: #7af6ff;
  --cyan-deep: #00c8dc;
  --cyan-dim: #1488a8;
  --teal: #3ec8d0;
  --teal-bar: #4ad4dc;
  --magenta: #ff2ec8;
  --magenta-hot: #ff4ec8;
  --pink: #ff3db8;
  --pink-text: #ff4ec8;
  --danger: #ff2d8a;
  --gold: #ffd93d;
  --gold-2: #ffe14a;
  --green: #3dff7a;
  --navy: #0b0c1d;
  --panel: #12081c;
  --panel-2: #0c0d1f;
  --white: #f4fbff;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05040c;
  color: var(--white);
  font-family: "Rajdhani", "Exo 2", "Trebuchet MS", sans-serif;
  user-select: none;
}

#stage {
  position: absolute;
  top: 0; left: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #12061e;
  transform-origin: top left;
}

#c {
  position: absolute;
  inset: 0;
  display: block;
  width: 1920px;
  height: 1080px;
}

#scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.10) 0px,
    rgba(0, 0, 0, 0.10) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  background: radial-gradient(ellipse at 50% 48%, transparent 42%, rgba(8, 0, 18, 0.55) 100%);
}

.hidden { display: none !important; }

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

#float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}

.floater {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  font-family: "Orbitron", "Audiowide", sans-serif;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px currentColor;
}
.floater.perfect {
  color: #7af6ff;
  font-size: 42px;
  font-weight: 800;
}
.floater.great {
  color: #b8ff5c;
  font-size: 34px;
  font-weight: 800;
}
.floater.good {
  color: #ffe14a;
  font-size: 28px;
  font-weight: 700;
}
.floater.miss {
  color: #ff3d7a;
  font-size: 28px;
  font-weight: 800;
}
.floater .bonus {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  color: #ffe14a;
  letter-spacing: 0.14em;
  font-family: "Share Tech Mono", "Orbitron", monospace;
}

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

#hud-tl {
  position: absolute;
  top: 22px;
  left: 28px;
  width: 560px;
}
#hud-tc {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
}
#hud-tr {
  position: absolute;
  top: 18px;
  right: 28px;
  width: 360px;
}

.tl-card, .score-card, .rank-card, .fever-card, .mod-card, .audio-card, .menu-card {
  background: linear-gradient(180deg, rgba(18, 10, 32, 0.92), rgba(10, 8, 24, 0.94));
  border: 2px solid #3ee8f0;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.15) inset,
    0 0 22px rgba(0, 220, 255, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.tl-card {
  padding: 12px 16px 12px 14px;
  border-radius: 18px;
}

.tl-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ff4ec8 0%, #7a5cff 55%, #00e8f8 100%);
  color: #f4fbff;
  font-family: "Orbitron", "Audiowide", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(255, 80, 200, 0.45);
  flex-shrink: 0;
}
.line-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #00f0ff);
}

.wordmark {
  font-family: "Orbitron", "Audiowide", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  line-height: 1.05;
}
.wm-a { color: #00f0ff; text-shadow: 0 0 12px #00e8f8; }
.wm-b { color: #ff3db8; text-shadow: 0 0 12px #ff2ec8; }

.stage-line {
  margin-top: 3px;
  font-family: "Share Tech Mono", "Rajdhani", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #7aa0b8;
}

.tl-bot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.lives { display: flex; gap: 6px; }
.life {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #00f0ff);
}
.life.off { filter: grayscale(1) brightness(0.35); opacity: 0.45; }

.ecto-lab {
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #8ec8d8;
  white-space: nowrap;
}
.ecto-track {
  flex: 1;
  height: 10px;
  border-radius: 8px;
  background: #081018;
  border: 1px solid #134858;
  overflow: hidden;
  position: relative;
}
.ecto-track i {
  display: block;
  height: 100%;
  width: 88%;
  background: linear-gradient(90deg, #00d4e8 0%, #3dff9a 70%, #7cff4a 100%);
  box-shadow: 0 0 10px #3dff9a;
  border-radius: 8px;
}
.ecto-pct {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  color: #7af6ff;
  min-width: 40px;
  text-align: right;
}

.score-card {
  padding: 10px 18px 14px;
  text-align: center;
  border-radius: 18px;
}
.score-lab {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #ff4ec8;
  margin-bottom: 2px;
}
.score-num {
  font-family: "Orbitron", "Audiowide", sans-serif;
  font-weight: 800;
  font-size: 38px;
  letter-spacing: 0.06em;
  color: #f5ffff;
  text-shadow:
    0 0 6px #7af6ff,
    0 0 16px #00c8ff;
  line-height: 1.12;
}
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 16px 4px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2ec8, #c81e9c);
  box-shadow: 0 0 14px rgba(255, 46, 200, 0.55);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.streak-pill img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px #ffe14a);
}

.rank-card {
  padding: 12px 18px 12px;
  border-radius: 16px;
}
.rank-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.rank-lab {
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: #ffe14a;
}
.rank-val {
  font-family: "Orbitron", "Audiowide", sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #ffe14a;
  text-shadow: 0 0 16px #ffd93d, 0 0 4px #fff2a0;
  line-height: 1;
}
.acc-row {
  text-align: right;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #ff4ec8;
  margin-top: 2px;
}
.acc-track {
  margin-top: 6px;
  height: 8px;
  border-radius: 8px;
  background: #101018;
  overflow: hidden;
  position: relative;
}
.acc-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffe14a 0%, #ff9a28 35%, #ff4a4a 62%, #ff2ec8 100%);
  box-shadow: 0 0 8px #ff4ec8;
}
.term-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #8aa0b8;
}

/* Bottom chrome bar matching mockup slanted teal slab */
#bot-chrome {
  position: absolute;
  left: -80px;
  right: -80px;
  bottom: 0;
  height: 168px;
  background: linear-gradient(180deg, #5ce8ee 0%, #3ec8d0 38%, #2498a8 100%);
  clip-path: polygon(0 46%, 100% 16%, 100% 100%, 0 100%);
  opacity: 0.92;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 -12px 40px rgba(62, 200, 208, 0.25);
}
#bot-chrome-scan {
  position: absolute;
  left: -80px;
  right: -80px;
  bottom: 0;
  height: 168px;
  clip-path: polygon(0 46%, 100% 16%, 100% 100%, 0 100%);
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.07) 0px,
    rgba(255,255,255,0.07) 2px,
    transparent 3px,
    transparent 5px
  );
  z-index: 11;
  pointer-events: none;
  opacity: 0.5;
}

#hud-bot {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 92px;
  display: flex;
  align-items: stretch;
  gap: 14px;
  z-index: 12;
  pointer-events: none;
}
#hud-bot > * { pointer-events: auto; }

.fever-card {
  width: 340px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  flex-shrink: 0;
}
.fever-lab {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #7af6ff;
}
.fever-ready {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ff3db8;
  text-shadow: 0 0 10px #ff2ec8;
  margin-top: 2px;
}
.fever-ready.ready {
  color: #7af6ff;
  text-shadow: 0 0 10px #00f0ff;
  animation: pulse 0.8s ease-in-out infinite;
}
.fever-ready.fever {
  color: #ffe14a;
  text-shadow: 0 0 12px #ffe14a;
}
.fever-div {
  width: 1px;
  height: 48px;
  background: #2a6080;
  margin: 0 12px;
}
.fever-right {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #8ec8d8;
  line-height: 1.45;
}
.fever-right b { color: #7af6ff; }

.mod-card {
  flex: 1;
  padding: 8px 16px 10px;
  border-radius: 16px;
  min-width: 0;
}
.mod-lab {
  text-align: center;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #9ad8e8;
  margin-bottom: 8px;
}
.mod-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mod-btn {
  border: 0;
  background: #14141c;
  color: #6a7a88;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.mod-btn:hover { color: #c8d8e8; }
.mod-btn.active-grow {
  background: linear-gradient(90deg, #7a3cff, #c84bff);
  color: #fff;
  box-shadow: 0 0 16px rgba(180, 80, 255, 0.55);
}
.mod-btn.active-normal {
  background: linear-gradient(90deg, #1a6a80, #2aa0b0);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 200, 220, 0.4);
}
.mod-btn.active-shrink {
  background: linear-gradient(90deg, #00c8e8, #3d7bff);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.55);
}
.warn-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid #ff2d8a;
  background: rgba(48, 6, 24, 0.85);
  color: #ff3d8a;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(255, 45, 138, 0.35);
}
.warn-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.warn-pill.grow {
  border-color: #c84bff;
  color: #e0a0ff;
  background: rgba(30, 8, 48, 0.85);
}
.warn-pill.normal {
  border-color: #3ee8f0;
  color: #7af6ff;
  background: rgba(8, 24, 40, 0.85);
}

.audio-card {
  width: 360px;
  flex-shrink: 0;
  padding: 10px 14px 8px;
  border-radius: 14px;
}
.audio-top {
  display: flex;
  justify-content: space-between;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #7af6ff;
}
.audio-bot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.keys-row {
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  color: #8ec8d8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.kbox {
  display: inline-block;
  border: 1px solid #3ee8f0;
  border-radius: 4px;
  padding: 2px 6px;
  color: #7af6ff;
  margin: 0 2px;
  font-size: 10px;
}
.pipe { opacity: 0.4; margin: 0 4px; }
.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  width: 120px;
  flex-shrink: 0;
}
.eq i {
  display: block;
  width: 6px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, #ff2ec8, #7af6ff);
  box-shadow: 0 0 6px #00f0ff;
}

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

.menu-card {
  width: 720px;
  padding: 28px 36px 30px;
  text-align: center;
  border-radius: 22px;
}
.menu-card.slim { width: 560px; }
.menu-title {
  display: inline-block;
  text-align: left;
  margin: 0 auto 12px;
  width: auto;
  max-width: 100%;
}
.menu-art {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 12px;
}
.menu-art img {
  height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px #00f0ff) drop-shadow(0 12px 24px rgba(255, 46, 200, 0.35));
}
.menu-blurb {
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #c8e0f0;
  margin: 0 12px 18px;
}
#btn-play, #btn-again, #btn-resume {
  border: 0;
  background: linear-gradient(90deg, #00c8e8, #ff2ec8);
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.16em;
  padding: 14px 36px;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(0, 220, 255, 0.45);
}
#btn-play:hover, #btn-again:hover, #btn-resume:hover {
  filter: brightness(1.1);
}
.menu-controls {
  margin-top: 16px;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  color: #8aa8b8;
  line-height: 1.6;
}
.menu-controls kbd {
  display: inline-block;
  border: 1px solid #3ee8f0;
  border-radius: 4px;
  padding: 0 6px;
  color: #7af6ff;
  font-family: inherit;
}
.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin: 22px 8px 24px;
  font-family: "Share Tech Mono", monospace;
  color: #8ec8d8;
  font-size: 16px;
}
.res-grid b {
  display: block;
  color: #7af6ff;
  font-family: "Orbitron", sans-serif;
  font-size: 22px;
  margin-top: 4px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
