:root {
  --ink: #050508;
  --deep: #0b0b10;
  --glow: #ff1f3a;
  --pulse: #ff3d1f;
  --lime: #ff2e4d;
  --warm: #ff5a2a;
  --fog: rgba(255, 255, 255, 0.08);
  --panel: rgba(14, 4, 8, 0.9);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: #e8f6ff;
  background: radial-gradient(circle at 20% 15%, rgba(255, 20, 60, 0.28), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(255, 80, 40, 0.22), transparent 40%),
    linear-gradient(135deg, #030304 0%, #0a070c 45%, #1b050b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 30, 70, 0.12), transparent 60%),
    radial-gradient(circle at 40% 70%, rgba(255, 60, 40, 0.08), transparent 65%),
    radial-gradient(circle at 80% 60%, rgba(255, 20, 50, 0.06), transparent 70%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.frame {
  position: relative;
  z-index: 1;
}

.frame {
  width: min(1400px, 99vw);
  display: grid;
  gap: 20px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 20px;
  align-items: start;
}

.debug-controls {
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-self: start;
  overflow: visible;
}

.debug-controls * {
  box-sizing: border-box;
}

.debug-controls-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.7);
  text-align: center;
}

.debug-controls-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.debug-controls .ghost {
  width: calc(100% - 16px);
  margin: 0 auto;
  text-align: center;
  font-size: 11px;
  padding: 6px 8px;
  max-width: 100%;
  justify-self: center;
  display: block;
  transform: translateX(-10px);
}

.debug-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.6);
}

.debug-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.debug-input {
  background: rgba(5, 6, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e8f6ff;
  padding: 6px 8px;
  font-size: 11px;
}


.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: grid;
  gap: 6px;
}

.logo {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tag {
  font-size: 14px;
  color: rgba(232, 246, 255, 0.7);
}

.hud {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 12px;
  min-width: 320px;
}

.hud-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hud-button {
  background: var(--fog);
  color: rgba(232, 246, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hud-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(52, 246, 255, 0.18);
}

.stat {
  background: var(--fog);
  padding: 8px 12px;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.stat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(232, 246, 255, 0.6);
}

.stat strong {
  font-size: 18px;
}

.arena {
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(255, 30, 70, 0.26), transparent 45%),
    linear-gradient(160deg, rgba(10, 4, 8, 0.96), rgba(24, 4, 10, 0.95));
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.arena::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.45);
}

.arena.vignette-off::after {
  box-shadow: none;
}

.canvas-stack {
  position: relative;
}

.canvas-stack canvas {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: transparent;
  display: block;
}

.fx-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  pointer-events: none;
  z-index: 2;
  background: transparent;
}

.hit-vignette {
  position: absolute;
  inset: 16px;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 40, 40, 0.1) 45%, rgba(120, 0, 10, 0.55) 100%);
  box-shadow: inset 0 0 120px rgba(255, 20, 40, 0.55);
  z-index: 4;
}

.hit-vignette.active {
  animation: hit-flash 0.35s ease-out;
}

.canvas-stack.hit-chromatic {
  animation: chromaHit 0.18s ease-out;
}

@keyframes chromaHit {
  0% {
    filter: drop-shadow(-6px 0 0 rgba(255, 40, 90, 0.9))
      drop-shadow(6px 0 0 rgba(40, 210, 255, 0.85));
    transform: translateX(-4px);
  }
  60% {
    filter: drop-shadow(-3px 0 0 rgba(255, 50, 90, 0.6))
      drop-shadow(3px 0 0 rgba(40, 200, 255, 0.55));
    transform: translateX(1px);
  }
  100% {
    filter: none;
    transform: translateX(0);
  }
}

@keyframes hit-flash {
  0% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
  }
}

.arena-round {
  position: absolute;
  top: 28px;
  left: 32px;
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: rgba(232, 246, 255, 0.6);
  z-index: 3;
}

.arena-round strong {
  font-size: 16px;
  color: rgba(232, 246, 255, 0.95);
  letter-spacing: 0.12em;
}

.arena-hud {
  position: absolute;
  top: 28px;
  right: 32px;
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 10px;
  z-index: 3;
}

.arena-hud .stat {
  padding: 6px 10px;
  border-radius: 10px;
}

.energy-hud {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  gap: 6px;
  min-width: 240px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  z-index: 3;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  color: rgba(232, 246, 255, 0.6);
}

.arena:fullscreen .energy-hud {
  min-width: 368px;
  padding: 16px 21px;
  font-size: 13px;
}

.arena:fullscreen .energy-bar {
  height: 12px;
}

.arena:fullscreen .energy-value {
  font-size: 15px;
}

.energy-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.energy-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ffb347);
  transition: width 0.2s ease;
}

.energy-value {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(232, 246, 255, 0.9);
  text-align: center;
}

.arena-meters {
  position: absolute;
  left: 32px;
  bottom: 28px;
  display: grid;
  gap: 10px;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  z-index: 3;
}

.arena:fullscreen .arena-meters {
  transform: scale(1.2);
  transform-origin: left bottom;
}

.arena.menu-active .arena-meters {
  display: none;
}

.arena.menu-active .arena-round {
  display: none;
}

.arena.menu-active .arena-hud {
  display: none;
}

.arena.menu-active .energy-hud {
  display: none;
}

.debug-off .debug,
.debug-off .debug-controls {
  display: none !important;
}

.debug-off .stage {
  grid-template-columns: 1fr;
}

.arena:not(.menu-active) .fx-toggle-btn {
  display: none;
}

.overlay {
  position: absolute;
  inset: 16px;
  background: rgba(5, 6, 10, 0.86);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.menu-orbit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.menu-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 70, 70, 0.18);
  box-shadow: 0 0 30px rgba(255, 30, 70, 0.15);
}

.menu-orbit-ring.ring-a {
  width: min(620px, 92%);
  height: min(620px, 92%);
  animation: orbit-spin 26s linear infinite, orbit-pulse 6s ease-in-out infinite;
}

.menu-orbit-ring.ring-b {
  width: min(460px, 68%);
  height: min(460px, 68%);
  border-color: rgba(255, 90, 60, 0.2);
  animation: orbit-spin 18s linear infinite reverse, orbit-pulse 5s ease-in-out infinite;
}

.menu-orbit-ring.ring-c {
  width: min(720px, 98%);
  height: min(720px, 98%);
  border-color: rgba(255, 40, 80, 0.12);
  animation: orbit-spin 34s linear infinite, orbit-pulse 7.5s ease-in-out infinite;
}

.menu-orbit-star {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 120, 0.9), rgba(255, 60, 60, 0.15));
  box-shadow: 0 0 16px rgba(255, 60, 80, 0.55);
  animation: orbit-spin 22s linear infinite;
}

.menu-orbit-star.star-a {
  transform: translate(220px, -140px);
}

.menu-orbit-star.star-b {
  width: 4px;
  height: 4px;
  transform: translate(-190px, 80px);
  animation-duration: 28s;
}

.menu-orbit-star.star-c {
  width: 5px;
  height: 5px;
  transform: translate(140px, 180px);
  animation-duration: 20s;
  animation-direction: reverse;
}

.menu-orbit-star.star-d {
  width: 3px;
  height: 3px;
  transform: translate(-120px, -210px);
  animation-duration: 30s;
}

.menu-orbit-star.star-e {
  width: 5px;
  height: 5px;
  transform: translate(0, -260px);
  animation-duration: 24s;
  animation-direction: reverse;
}

.menu-orbit-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.menu-orbit-back span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 200, 200, 0.7);
  box-shadow: 0 0 6px rgba(255, 80, 80, 0.4);
  animation: twinkle 3.5s ease-in-out infinite;
}

.menu-orbit-back span:nth-child(odd) {
  animation-duration: 4.6s;
}

.menu-orbit-back span:nth-child(3n) {
  width: 3px;
  height: 3px;
  animation-duration: 5.2s;
}

.menu-orbit-back span:nth-child(4n) {
  width: 1px;
  height: 1px;
  animation-duration: 2.8s;
}

.menu-orbit-back span:nth-child(1) { top: 14%; left: 18%; }
.menu-orbit-back span:nth-child(2) { top: 22%; left: 66%; }
.menu-orbit-back span:nth-child(3) { top: 34%; left: 42%; }
.menu-orbit-back span:nth-child(4) { top: 18%; left: 82%; }
.menu-orbit-back span:nth-child(5) { top: 56%; left: 70%; }
.menu-orbit-back span:nth-child(6) { top: 64%; left: 30%; }
.menu-orbit-back span:nth-child(7) { top: 72%; left: 52%; }
.menu-orbit-back span:nth-child(8) { top: 80%; left: 20%; }
.menu-orbit-back span:nth-child(9) { top: 48%; left: 16%; }
.menu-orbit-back span:nth-child(10) { top: 40%; left: 78%; }
.menu-orbit-back span:nth-child(11) { top: 62%; left: 86%; }
.menu-orbit-back span:nth-child(12) { top: 30%; left: 26%; }
.menu-orbit-back span:nth-child(13) { top: 12%; left: 48%; }
.menu-orbit-back span:nth-child(14) { top: 52%; left: 54%; }
.menu-orbit-back span:nth-child(15) { top: 26%; left: 10%; }
.menu-orbit-back span:nth-child(16) { top: 74%; left: 74%; }
.menu-orbit-back span:nth-child(17) { top: 84%; left: 60%; }
.menu-orbit-back span:nth-child(18) { top: 44%; left: 34%; }
.menu-orbit-back span:nth-child(19) { top: 66%; left: 12%; }
.menu-orbit-back span:nth-child(20) { top: 38%; left: 90%; }
.menu-orbit-back span:nth-child(21) { top: 10%; left: 30%; }
.menu-orbit-back span:nth-child(22) { top: 16%; left: 58%; }
.menu-orbit-back span:nth-child(23) { top: 24%; left: 74%; }
.menu-orbit-back span:nth-child(24) { top: 28%; left: 6%; }
.menu-orbit-back span:nth-child(25) { top: 36%; left: 58%; }
.menu-orbit-back span:nth-child(26) { top: 42%; left: 22%; }
.menu-orbit-back span:nth-child(27) { top: 50%; left: 68%; }
.menu-orbit-back span:nth-child(28) { top: 58%; left: 40%; }
.menu-orbit-back span:nth-child(29) { top: 62%; left: 2%; }
.menu-orbit-back span:nth-child(30) { top: 70%; left: 88%; }
.menu-orbit-back span:nth-child(31) { top: 78%; left: 34%; }
.menu-orbit-back span:nth-child(32) { top: 88%; left: 48%; }

.overlay .panel {
  position: relative;
  z-index: 2;
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(255, 30, 70, 0.15);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 50px rgba(255, 30, 70, 0.25);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.2);
  }
}

.shop {
  position: absolute;
  inset: 16px;
  background: rgba(5, 6, 10, 0.7);
  border-radius: 18px;
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 6;
}

.shop .panel {
  max-width: min(720px, 92vw);
  overflow: visible;
}

.shop-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shop-header h1 {
  margin-bottom: 8px;
}

.shop-points {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 14px;
  text-align: center;
  min-width: 120px;
}

.shop-points span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(232, 246, 255, 0.6);
}

.shop-points strong {
  font-size: 20px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.shop-card {
  background: rgba(6, 8, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  grid-template-areas:
    "title"
    "level"
    "spacer"
    "cost"
    "button";
  gap: 8px;
  text-align: left;
  box-shadow: inset 0 0 18px rgba(255, 40, 60, 0.08);
  position: relative;
}

.shop-card-title {
  grid-area: title;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(232, 246, 255, 0.7);
}

.shop-card-level {
  grid-area: level;
  font-size: 13px;
  color: rgba(232, 246, 255, 0.9);
}

.shop-card button {
  grid-area: button;
  justify-self: center;
  align-self: end;
  padding: 9px 13px;
  font-size: 11px;
  margin-top: 20px;
}

.shop-card .shop-cost {
  grid-area: cost;
  font-size: 16px;
  text-align: center;
  align-self: center;
  margin: 0;
}

.shop-tooltip {
  position: absolute;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(5, 6, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: rgba(232, 246, 255, 0.85);
  opacity: 0;
  transform: translate(0, -10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 7;
  white-space: nowrap;
}

.shop-tooltip.active {
  opacity: 1;
  transform: translate(0, -18px);
}

.shop-next {
  width: 100%;
}

.shop-cost {
  margin: 10px 0 18px;
  font-size: 13px;
  color: rgba(232, 246, 255, 0.7);
}

.ghost {
  background: transparent;
  color: #e8f6ff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.12);
}
.panel {
  max-width: min(408px, 76.5vw);
  max-height: 80vh;
  overflow: hidden;
  text-align: center;
  background: var(--panel);
  padding: clamp(18px, 2.6vw, 24px) clamp(20px, 3.2vw, 27px) clamp(24px, 3.6vw, 30px);
  font-size: clamp(12px, 1.2vw, 14px);
  border-radius: 18px;
  border: 1px solid rgba(52, 246, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.menu-layout {
  position: absolute;
  inset: 0;
}

.legend-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-100% - 120px), -50%);
  width: min(240px, 28vw);
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 8, 14, 0.65);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  text-align: left;
  z-index: 2;
  transform-origin: right center;
  scale: 1.3;
}

.legend-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.65);
  margin-bottom: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-item strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.legend-item p {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(232, 246, 255, 0.7);
}

.legend-canvas {
  width: 36px;
  height: 36px;
  display: block;
}

@media (max-width: 1024px) {
  .menu-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    height: auto;
  }
  .legend-panel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
  }
  .panel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }
}

.panel h1 {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.18em;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 12px;
}

.version-badge {
  display: inline-block;
  padding: 4px 10px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 230, 180, 0.85);
  border: 1px solid rgba(255, 110, 90, 0.35);
  border-radius: 999px;
  background: rgba(60, 8, 8, 0.55);
}

.version-badge.corner {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 3;
}

.panel p {
  margin: 0 0 18px;
  color: rgba(232, 246, 255, 0.75);
}

.fx-panel {
  position: absolute;
  top: 64px;
  right: 26px;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 8, 14, 0.78);
  text-align: left;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  z-index: 5;
}

.fx-panel.is-hidden {
  display: none;
}

.fx-menu-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.6);
  margin-bottom: 10px;
}

.fx-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: rgba(232, 246, 255, 0.85);
}

.fx-toggle + .fx-toggle {
  margin-top: 6px;
}

.fx-toggle input {
  accent-color: #ff4a5e;
}

.fx-toggle-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 6;
  padding: 6px 12px;
}

.controls {
  display: grid;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.entry {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.entry label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(232, 246, 255, 0.6);
}

.entry input {
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: #e8f6ff;
  font-size: 14px;
  outline: none;
}

.entry input[type="range"] {
  padding: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.entry input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 12px rgba(255, 60, 80, 0.6);
  cursor: pointer;
}

.entry input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--glow);
  border: none;
  box-shadow: 0 0 12px rgba(255, 60, 80, 0.6);
  cursor: pointer;
}

.entry input:focus {
  border-color: rgba(52, 246, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(52, 246, 255, 0.2);
}

.volume-entry {
  position: absolute;
  top: 28px;
  right: 32px;
  width: min(200px, 40vw);
  z-index: 3;
}

.volume-entry input[type="range"] {
  width: 100%;
}

.entry-warning {
  display: none;
  color: rgba(255, 179, 71, 0.9);
  font-size: 12px;
}

.entry-warning.active {
  display: block;
}

.leaderboard {
  margin: 10px 0 18px;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(5, 6, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.leaderboard-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.7);
  margin-bottom: 10px;
}

.leaderboard ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(232, 246, 255, 0.85);
}

.leaderboard li {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.6fr 0.7fr;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

button {
  background: linear-gradient(120deg, var(--glow), var(--pulse));
  border: none;
  color: #0b0e19;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(52, 246, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 12px;
}

button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(255, 122, 217, 0.45);
}

.pause {
  position: absolute;
  top: 30px;
  right: 30px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: none;
}

.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hint {
  max-width: 460px;
  color: rgba(232, 246, 255, 0.65);
  font-size: 14px;
}

.debug {
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 180px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.debug-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.debug-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.75);
}

.meter {
  display: grid;
  gap: 6px;
}

.meter-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 246, 255, 0.6);
}

.meter-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime), var(--glow));
  transition: width 0.2s ease;
}

@media (max-width: 900px) {
  body {
    padding: 20px;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .hud-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .arena-hud {
    position: static;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    margin: 0 auto;
  }

  .energy-hud {
    min-width: 200px;
  }

  .stage {
    grid-template-columns: 1fr;
  }

  .debug-controls {
    order: 2;
  }

  .panel {
    padding: 22px;
  }
}
