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

html,
body {
  height: 100%;
}

body {
  background: #05060a;
  color: #eef2ff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

:root {
  --minimap-size: 190px;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 0;
}

.hud-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(70ch, 70vw);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.92;
}

.help {
  font-size: 12px;
  opacity: 0.78;
  line-height: 1.35;
}


.settings {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 12, 0.7);
  backdrop-filter: blur(8px);
  z-index: 40;
  pointer-events: auto;
}

.settings-panel {
  width: min(980px, 96vw);
  max-height: 90vh;
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 240, 255, 0.95);
}

.settings-subtitle {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.68;
  line-height: 1.4;
}

.settings-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.settings-section {
  display: grid;
  gap: 6px;
}

.settings-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.settings-select,
.settings-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 8, 14, 0.9);
  color: rgba(238, 242, 255, 0.95);
  font-size: 13px;
}

.settings-select:focus,
.settings-input:focus {
  outline: none;
  border-color: rgba(140, 190, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(120, 170, 255, 0.18);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.settings-section.wide {
  grid-column: 1 / -1;
}

.telemetry-history {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 14, 0.85);
  font-size: 12px;
  line-height: 1.4;
  min-height: 84px;
  max-height: 220px;
  overflow-y: auto;
  color: rgba(228, 236, 255, 0.92);
}

.telemetry-history-item {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.telemetry-history-item.telemetry-history-current {
  font-style: italic;
  opacity: 0.85;
}

.telemetry-history-item:last-child {
  border-bottom: none;
}

.telemetry-history-empty {
  opacity: 0.6;
}

.telemetry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.telemetry-history-status {
  font-size: 11px;
  opacity: 0.7;
  min-height: 14px;
}

.telemetry-history-status.reticle-stats {
  margin-top: 6px;
  min-height: 0;
  line-height: 1.4;
}

.telemetry-history-status.minimap-stats {
  margin-top: 4px;
  min-height: 0;
  line-height: 1.4;
  white-space: pre-line;
}

.telemetry-history-status.perf-validity {
  margin-top: 6px;
  min-height: 0;
  line-height: 1.4;
  opacity: 0.8;
}

.telemetry-history-status.perf-validity.invalid {
  color: #ffb08a;
  opacity: 0.95;
}

.telemetry-history-status.perf-hint {
  margin-top: 4px;
  min-height: 0;
  line-height: 1.4;
  opacity: 0.65;
}

.playtest-checklist {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 14, 0.85);
  font-size: 12px;
  line-height: 1.35;
  color: rgba(228, 236, 255, 0.92);
}

.playtest-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.playtest-item input {
  margin-top: 2px;
}

.playtest-item span {
  flex: 1;
}

.playtest-item.completed span {
  text-decoration: line-through;
  opacity: 0.55;
}

@media (max-width: 980px) {
  .settings-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .settings-panel {
    max-height: 92vh;
    padding: 16px 14px 14px;
  }

  .settings-body {
    grid-template-columns: 1fr;
  }
}

.settings-button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 24, 38, 0.9);
  color: rgba(235, 240, 255, 0.92);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.settings-button.primary {
  border-color: rgba(120, 180, 255, 0.6);
  background: rgba(60, 118, 220, 0.85);
  color: rgba(245, 248, 255, 0.98);
}

.settings-button.ghost {
  background: transparent;
}

.hud-right {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat {
  padding: 8px 10px;
  background: rgba(10, 14, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 12px;
  backdrop-filter: blur(6px);
}

.stat-health {
  border-color: rgba(255, 180, 150, 0.28);
  color: rgba(245, 232, 224, 0.95);
}

.stat-health .label {
  color: rgba(255, 200, 180, 0.72);
}

.stat-health.stat-health-critical {
  border-color: rgba(255, 120, 120, 0.6);
  color: rgba(255, 232, 232, 0.96);
  animation: health-pulse 1.1s ease-in-out infinite;
}

.stat-health.stat-health-danger {
  border-color: rgba(255, 80, 80, 0.8);
  color: rgba(255, 238, 238, 0.98);
  animation: health-pulse-urgent 0.7s ease-in-out infinite;
}

.stat-shield {
  border-color: rgba(120, 180, 255, 0.35);
  color: rgba(220, 238, 255, 0.95);
}

.stat-shield .label {
  color: rgba(170, 210, 255, 0.75);
}

.stat-pickup {
  border-color: rgba(130, 205, 255, 0.3);
  color: rgba(216, 244, 255, 0.95);
}

.stat-pickup .label {
  color: rgba(170, 220, 255, 0.78);
}

.stat-pickup-shield {
  border-color: rgba(120, 200, 255, 0.4);
}

.stat-pickup-cooling {
  border-color: rgba(120, 255, 200, 0.4);
  color: rgba(220, 255, 241, 0.95);
}

.stat-pickup-cooling .label {
  color: rgba(170, 245, 222, 0.78);
}

.stat-pickup-repair {
  border-color: rgba(255, 190, 120, 0.45);
  color: rgba(255, 236, 210, 0.96);
}

.stat-pickup-repair .label {
  color: rgba(255, 206, 162, 0.8);
}

.stat-pickup-repair.active {
  animation: pickup-repair-pop 0.65s ease-out;
  box-shadow: 0 0 14px rgba(255, 190, 120, 0.28);
}

.stat-pickup-speed {
  border-color: rgba(255, 238, 85, 0.45);
  color: rgba(255, 252, 220, 0.96);
}

.stat-pickup-speed .label {
  color: rgba(255, 243, 170, 0.8);
}

.stat-pickup-damage {
  border-color: rgba(255, 85, 85, 0.45);
  color: rgba(255, 210, 210, 0.96);
}

.stat-pickup-damage .label {
  color: rgba(255, 160, 160, 0.8);
}

.stat-pickup-rapidfire {
  border-color: rgba(255, 136, 34, 0.45);
  color: rgba(255, 224, 190, 0.96);
}

.stat-pickup-rapidfire .label {
  color: rgba(255, 180, 120, 0.8);
}

/* Power-up expiring animation (flashing when < 3 seconds remaining) */
@keyframes pickup-expiring-flash {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.95);
  }
}

.stat-pickup-shield.expiring,
.stat-pickup-cooling.expiring,
.stat-pickup-speed.expiring,
.stat-pickup-damage.expiring,
.stat-pickup-rapidfire.expiring {
  animation: pickup-expiring-flash 0.5s ease-in-out infinite;
  border-color: rgba(255, 100, 100, 0.6);
  box-shadow: 0 0 8px rgba(255, 80, 80, 0.4);
}

.stat-field {
  border-color: rgba(140, 190, 255, 0.35);
  color: rgba(220, 236, 255, 0.95);
}

.stat-field .label {
  color: rgba(168, 206, 255, 0.78);
}

.stat-field-drag {
  border-color: rgba(140, 170, 255, 0.45);
  color: rgba(212, 228, 255, 0.95);
}

.stat-field-drag .label {
  color: rgba(175, 198, 255, 0.78);
}

.stat-streak {
  border-color: rgba(255, 170, 110, 0.35);
  color: rgba(255, 226, 194, 0.95);
}

.stat-streak .label {
  color: rgba(255, 196, 140, 0.75);
}

.label {
  opacity: 0.65;
  margin-right: 6px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.muted {
  opacity: 0.6;
  margin-left: 6px;
  font-size: 11px;
}

#reticle {
  --reticle-scale: 1;
  --reticle-alpha: 0.9;
  --reticle-color: rgb(255, 255, 255);
  --reticle-glow: rgba(255, 255, 255, 0.12);
  position: fixed;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%) scale(var(--reticle-scale));
  opacity: var(--reticle-alpha);
  border: 1px solid var(--reticle-color);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--reticle-glow);
  transition:
    transform 0.08s ease-out,
    opacity 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

#reticle::before,
#reticle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--reticle-color);
  transform: translate(-50%, -50%);
}

#reticle::before {
  width: 10px;
  height: 1px;
}

#reticle::after {
  width: 1px;
  height: 10px;
}

#reticle.reticle-blocked {
  border-style: dashed;
}

#reticle.reticle-blocked::before,
#reticle.reticle-blocked::after {
  opacity: 0.4;
}

#reticle .reticle-blocked-label {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 6px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(178, 205, 245, 0.9);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

#reticle.reticle-blocked .reticle-blocked-label {
  opacity: 0.9;
  transform: translateX(-50%) translateY(2px);
}

#reticle .reticle-blocked-detail {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 16px;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(178, 205, 245, 0.78);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

#reticle.reticle-blocked .reticle-blocked-detail {
  opacity: 0.8;
  transform: translateX(-50%) translateY(2px);
}

#reticle .reticle-lost-label {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 20px;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 210, 150, 0.85);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

#reticle.reticle-lost .reticle-lost-label {
  opacity: 0.85;
  transform: translateX(-50%) translateY(2px);
}

#reticle .reticle-lost-detail {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 30px;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 210, 150, 0.72);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

#reticle.reticle-lost .reticle-lost-detail {
  opacity: 0.7;
  transform: translateX(-50%) translateY(2px);
}

#lead-indicator {
  --lead-alpha: 0.75;
  --lead-color: rgba(120, 255, 210, 0.9);
  --lead-color-core: rgba(120, 255, 210, 0.95);
  --lead-glow: rgba(120, 255, 210, 0.4);
  position: fixed;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--lead-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--lead-glow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.1s ease,
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

#lead-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  background: var(--lead-color-core);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

#lead-indicator.active {
  opacity: var(--lead-alpha);
}

.target-hud {
  --target-alpha: 0;
  --target-scale: 0.96;
  position: fixed;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%) translateY(-44px) scale(var(--target-scale));
  opacity: var(--target-alpha);
  pointer-events: none;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(225, 240, 255, 0.9);
  text-shadow: 0 0 12px rgba(60, 120, 255, 0.25);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

.target-hud.hidden {
  --target-alpha: 0;
}

.target-label {
  font-weight: 700;
}

.target-status {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(140, 210, 255, 0.92);
  text-shadow: 0 0 12px rgba(80, 160, 255, 0.35);
}

.target-invuln-bar {
  width: 96px;
  height: 4px;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.35);
  background: rgba(20, 40, 70, 0.35);
  overflow: hidden;
  box-shadow: 0 0 8px rgba(40, 90, 160, 0.35);
}

.target-invuln-bar.hidden {
  display: none;
}

.target-invuln-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, rgba(120, 210, 255, 0.95), rgba(90, 170, 255, 0.95));
  transition: width 0.12s ease;
}

.target-hud.target-invuln .target-status {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.45);
  background: rgba(40, 90, 150, 0.22);
  color: rgba(170, 230, 255, 0.98);
  text-shadow: 0 0 12px rgba(90, 170, 255, 0.45);
}

.target-hud.target-invuln-warning .target-invuln-bar {
  border-color: rgba(255, 200, 120, 0.6);
  box-shadow: 0 0 10px rgba(255, 200, 120, 0.25);
}

.target-hud.target-invuln-warning .target-status {
  border-color: rgba(255, 200, 120, 0.75);
  background: rgba(90, 70, 40, 0.35);
  color: rgba(255, 236, 190, 0.98);
  text-shadow: 0 0 14px rgba(255, 200, 120, 0.6);
  animation: targetInvulnPulse 0.6s ease-in-out infinite;
}

.target-status.hidden {
  display: none;
}

@keyframes targetInvulnPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(255, 200, 120, 0.45);
  }
}

.target-distance {
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.target-altitude {
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.target-altitude.hidden {
  display: none;
}

.target-bar {
  width: 96px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 8, 12, 0.55);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(4, 8, 16, 0.5);
}

.target-bar.hidden {
  display: none;
}

.target-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, rgba(120, 255, 200, 0.95), rgba(255, 214, 120, 0.95));
  transition: width 0.12s ease;
}

.target-hud.target-turret .target-bar-fill {
  background: linear-gradient(90deg, rgba(255, 202, 120, 0.95), rgba(255, 120, 100, 0.95));
}

.target-hud.target-bot .target-bar-fill,
.target-hud.target-ship .target-bar-fill {
  background: linear-gradient(90deg, rgba(255, 120, 120, 0.95), rgba(255, 210, 160, 0.9));
}

.target-hud.target-invuln .target-bar-fill {
  background: linear-gradient(90deg, rgba(120, 210, 255, 0.95), rgba(80, 170, 255, 0.92));
}

#hit-marker {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  --hit-color: rgba(255, 255, 255, 0.9);
  --hit-glow: rgba(255, 255, 255, 0.5);
}

#hit-marker span {
  position: absolute;
  width: 2px;
  height: 10px;
  background: var(--hit-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--hit-glow);
}

#hit-marker span:nth-child(1) {
  left: 0;
  top: 0;
  transform: rotate(45deg);
  transform-origin: bottom left;
}

#hit-marker span:nth-child(2) {
  right: 0;
  top: 0;
  transform: rotate(-45deg);
  transform-origin: bottom right;
}

#hit-marker span:nth-child(3) {
  left: 0;
  bottom: 0;
  transform: rotate(-45deg);
  transform-origin: top left;
}

#hit-marker span:nth-child(4) {
  right: 0;
  bottom: 0;
  transform: rotate(45deg);
  transform-origin: top right;
}

#hit-marker.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#hit-marker.kill {
  --hit-color: rgba(255, 120, 80, 0.95);
  --hit-glow: rgba(255, 110, 60, 0.7);
}

#damage-indicator,
#threat-indicator {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.turret-warning {
  position: fixed;
  left: 50%;
  top: 50%;
  --turret-warning-offset: 80px;
  --turret-warning-strength: 1;
  --turret-warning-opacity: calc(0.25 + 0.75 * var(--turret-warning-strength));
  transform: translate(-50%, -50%) translateY(var(--turret-warning-offset)) scale(0.98);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 90, 0.55);
  background: rgba(20, 10, 8, 0.78);
  color: rgba(255, 226, 210, 0.98);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  box-shadow: 0 0 18px rgba(255, 120, 70, 0.28);
  text-shadow: 0 0 6px rgba(255, 150, 110, 0.45);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.turret-lock {
  position: fixed;
  left: 50%;
  top: 50%;
  --turret-lock-offset: 54px;
  --turret-lock-strength: 1;
  --turret-lock-opacity: calc(0.25 + 0.75 * var(--turret-lock-strength));
  transform: translate(-50%, -50%) translateY(var(--turret-lock-offset)) scale(0.98);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.55);
  background: rgba(8, 16, 24, 0.78);
  color: rgba(220, 240, 255, 0.96);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  box-shadow: 0 0 14px rgba(120, 190, 255, 0.22);
  text-shadow: 0 0 6px rgba(120, 200, 255, 0.4);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.terrain-warning {
  position: fixed;
  left: 50%;
  top: 50%;
  --terrain-warning-offset: 102px;
  --terrain-warning-strength: 1;
  --terrain-warning-opacity: calc(0.2 + 0.8 * var(--terrain-warning-strength));
  transform: translate(-50%, -50%) translateY(var(--terrain-warning-offset)) scale(0.98);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 120, 0.55);
  background: rgba(20, 16, 10, 0.8);
  color: rgba(255, 236, 200, 0.98);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  box-shadow: 0 0 18px rgba(255, 180, 90, 0.25);
  text-shadow: 0 0 6px rgba(255, 210, 140, 0.35);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.turret-lock.broken {
  border-color: rgba(120, 220, 170, 0.6);
  background: rgba(8, 18, 14, 0.82);
  color: rgba(210, 255, 235, 0.98);
  box-shadow: 0 0 14px rgba(120, 220, 170, 0.25);
  text-shadow: 0 0 6px rgba(120, 220, 170, 0.35);
}

.objective-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  --objective-popup-offset: 118px;
  transform: translate(-50%, -50%) translateY(var(--objective-popup-offset)) scale(0.96);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 150, 0.45);
  background: rgba(8, 16, 12, 0.78);
  color: rgba(220, 255, 230, 0.96);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  box-shadow: 0 0 14px rgba(120, 220, 150, 0.22);
  text-shadow: 0 0 6px rgba(120, 220, 150, 0.35);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.objective-popup.threat {
  border-color: rgba(255, 160, 110, 0.55);
  background: rgba(20, 12, 8, 0.82);
  color: rgba(255, 230, 210, 0.98);
  box-shadow: 0 0 14px rgba(255, 160, 110, 0.25);
  text-shadow: 0 0 6px rgba(255, 160, 110, 0.35);
}

.objective-popup.clear {
  border-color: rgba(120, 200, 255, 0.55);
  background: rgba(8, 14, 22, 0.8);
  color: rgba(220, 244, 255, 0.98);
  box-shadow: 0 0 14px rgba(120, 200, 255, 0.25);
  text-shadow: 0 0 6px rgba(120, 200, 255, 0.35);
}

.turret-warning.active {
  opacity: var(--turret-warning-opacity);
  transform: translate(-50%, -50%) translateY(var(--turret-warning-offset)) scale(1);
  animation: turret-warning-pulse 0.55s ease-out infinite;
}

.turret-lock.active {
  opacity: var(--turret-lock-opacity);
  transform: translate(-50%, -50%) translateY(var(--turret-lock-offset)) scale(1);
  animation: turret-lock-pulse 0.9s ease-in-out infinite;
}

.terrain-warning.active {
  opacity: var(--terrain-warning-opacity);
  transform: translate(-50%, -50%) translateY(var(--terrain-warning-offset)) scale(1);
  animation: terrain-warning-pulse 0.65s ease-out infinite;
}

.boundary-warning {
  position: fixed;
  left: 50%;
  top: 50%;
  --boundary-warning-offset: 140px;
  --boundary-warning-strength: 0;
  --boundary-warning-opacity: calc(0.3 + 0.7 * var(--boundary-warning-strength));
  transform: translate(-50%, -50%) translateY(var(--boundary-warning-offset)) scale(0.96);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 120, 0.55);
  background: rgba(20, 10, 10, 0.82);
  color: rgba(255, 220, 220, 0.98);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  box-shadow: 0 0 18px rgba(255, 100, 100, 0.28);
  text-shadow: 0 0 6px rgba(255, 150, 150, 0.4);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.boundary-warning.active {
  opacity: var(--boundary-warning-opacity);
  transform: translate(-50%, -50%) translateY(var(--boundary-warning-offset)) scale(1);
  animation: boundary-warning-pulse 0.8s ease-in-out infinite;
}

@keyframes boundary-warning-pulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(255, 100, 100, 0.28);
    border-color: rgba(255, 120, 120, 0.55);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 100, 100, 0.45);
    border-color: rgba(255, 150, 150, 0.75);
  }
}

.turret-lock.broken.active {
  animation: turret-lock-break 0.6s ease-out;
}

.objective-popup.active {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(var(--objective-popup-offset)) scale(1);
  animation: objective-popup-rise 0.85s ease-out;
}

@keyframes health-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 120, 120, 0.18);
    background: rgba(14, 10, 16, 0.78);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 120, 120, 0.38);
    background: rgba(32, 10, 16, 0.86);
  }
}

@keyframes health-pulse-urgent {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(255, 80, 80, 0.32);
    background: rgba(18, 8, 12, 0.84);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 80, 80, 0.6);
    background: rgba(40, 10, 14, 0.92);
  }
}

@keyframes turret-warning-pulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 120, 70, 0.18);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 120, 70, 0.35);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 120, 70, 0.18);
  }
}

@keyframes terrain-warning-pulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 170, 90, 0.18);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 190, 110, 0.32);
  }
  100% {
    box-shadow: 0 0 12px rgba(255, 170, 90, 0.2);
  }
}

@keyframes turret-lock-pulse {
  0% {
    box-shadow: 0 0 10px rgba(120, 190, 255, 0.18);
  }
  50% {
    box-shadow: 0 0 18px rgba(120, 190, 255, 0.32);
  }
  100% {
    box-shadow: 0 0 10px rgba(120, 190, 255, 0.18);
  }
}

@keyframes turret-lock-break {
  0% {
    box-shadow: 0 0 10px rgba(120, 220, 170, 0.18);
  }
  55% {
    box-shadow: 0 0 20px rgba(120, 220, 170, 0.38);
  }
  100% {
    box-shadow: 0 0 12px rgba(120, 220, 170, 0.24);
  }
}

@keyframes objective-popup-rise {
  0% {
    transform: translate(-50%, -50%) translateY(calc(var(--objective-popup-offset) + 10px)) scale(0.92);
  }
  100% {
    transform: translate(-50%, -50%) translateY(var(--objective-popup-offset)) scale(1);
  }
}

@keyframes pickup-repair-pop {
  0% {
    transform: translateY(4px) scale(0.96);
    box-shadow: 0 0 10px rgba(255, 170, 110, 0.18);
  }
  60% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 16px rgba(255, 190, 120, 0.32);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 12px rgba(255, 170, 110, 0.2);
  }
}

.damage-indicator-segment {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 90, 90, 0.88);
  box-shadow: 0 0 12px rgba(255, 90, 90, 0.55);
  opacity: 0;
  transform: var(--base-transform) scale(var(--scale, 1));
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.threat-indicator-segment {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 180, 110, 0.95) 0 6px,
    rgba(255, 180, 110, 0.12) 6px 10px
  );
  box-shadow: 0 0 12px rgba(255, 170, 100, 0.38);
  opacity: 0;
  transform: var(--base-transform) scale(var(--scale, 1));
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.damage-indicator-segment.front {
  --base-transform: translate(-50%, -50%) translateY(-58px);
}

.damage-indicator-segment.back {
  --base-transform: translate(-50%, -50%) translateY(58px);
}

.damage-indicator-segment.left {
  --base-transform: translate(-50%, -50%) translateX(-58px) rotate(-90deg);
}

.damage-indicator-segment.right {
  --base-transform: translate(-50%, -50%) translateX(58px) rotate(90deg);
}

.threat-indicator-segment.front {
  --base-transform: translate(-50%, -50%) translateY(-72px);
}

.threat-indicator-segment.back {
  --base-transform: translate(-50%, -50%) translateY(72px);
}

.threat-indicator-segment.left {
  --base-transform: translate(-50%, -50%) translateX(-72px) rotate(-90deg);
}

.threat-indicator-segment.right {
  --base-transform: translate(-50%, -50%) translateX(72px) rotate(90deg);
}

.death {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 18px;
  background: rgba(8, 10, 16, 0.86);
  border: 1px solid rgba(255, 90, 90, 0.22);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  text-align: center;
  max-width: min(42ch, 92vw);
}

.death-title {
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.death-sub {
  font-size: 13px;
  opacity: 0.8;
}

.death.match-over {
  border-color: rgba(120, 170, 255, 0.35);
  box-shadow: 0 0 18px rgba(120, 170, 255, 0.18);
}

.death.match-over .death-title {
  color: rgba(210, 226, 255, 0.98);
}

.tutorial-hint {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: rgba(20, 35, 60, 0.88);
  border: 1px solid rgba(100, 180, 255, 0.35);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(200, 220, 255, 0.95);
  text-align: center;
  max-width: min(48ch, 90vw);
  opacity: 0;
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
  pointer-events: none;
  z-index: 25;
}

.tutorial-hint.visible {
  opacity: 1;
}

.hidden {
  display: none;
}

.debug {
  position: fixed;
  left: 14px;
  bottom: calc(14px + var(--minimap-size) + 12px);
  max-width: min(62ch, 92vw);
  padding: 10px 12px;
  background: rgba(8, 10, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre;
  backdrop-filter: blur(8px);
}

.outpost-status {
  position: fixed;
  left: 14px;
  bottom: calc(14px + var(--minimap-size) + 12px);
  --outpost-engaged: 0;
  padding: 8px 10px;
  background: rgba(8, 10, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(231, 236, 255, 0.92);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 2px;
  max-width: min(42ch, 70vw);
}

.outpost-status.engaged {
  box-shadow: 0 0 14px rgba(255, 140, 110, var(--outpost-engaged));
}

.outpost-status-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}

.outpost-status-bearing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 14px;
  padding-right: 2px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.outpost-status-bearing-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid currentColor;
  filter: drop-shadow(0 0 4px rgba(120, 170, 255, 0.25));
  transform: rotate(var(--outpost-bearing, 0deg));
  transition: transform 0.15s ease;
}

.outpost-status-bearing-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(214, 230, 255, 0.92);
  text-shadow: 0 0 10px rgba(120, 170, 255, 0.28);
}

.outpost-status-distance {
  font-size: 10px;
  opacity: 0.6;
  font-weight: 600;
}

.outpost-status-altitude {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 10px;
  font-size: 10px;
  opacity: 0.6;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.outpost-status-altitude::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
  opacity: 0.55;
}

.outpost-status-altitude.above,
.outpost-status-altitude.below {
  opacity: 0.85;
  font-weight: 700;
}

.outpost-status-altitude.below::before {
  transform: rotate(180deg);
  top: 4px;
}

.outpost-status-sub {
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.outpost-status.theme-fortified {
  border-color: rgba(255, 140, 110, 0.3);
  color: rgba(255, 226, 208, 0.94);
}

.outpost-status.theme-comms {
  border-color: rgba(120, 190, 255, 0.3);
  color: rgba(222, 238, 255, 0.94);
}

.outpost-status.theme-solar {
  border-color: rgba(255, 214, 120, 0.3);
  color: rgba(255, 240, 206, 0.92);
}

.outpost-status.theme-fortified .outpost-status-sub,
.outpost-status.theme-comms .outpost-status-sub,
.outpost-status.theme-solar .outpost-status-sub {
  color: rgba(235, 236, 255, 0.9);
  opacity: 0.85;
}

.outpost-status.sam {
  border-color: rgba(255, 170, 110, 0.35);
  color: rgba(255, 230, 200, 0.96);
}

.outpost-status.sam .outpost-status-sub {
  color: rgba(255, 214, 186, 0.9);
  opacity: 0.85;
}

.outpost-status.cleared {
  border-color: rgba(120, 220, 170, 0.35);
  color: rgba(222, 255, 236, 0.94);
}

.outpost-status.cleared .outpost-status-sub {
  color: rgba(208, 248, 226, 0.9);
  opacity: 0.85;
}

.kill-feed {
  position: fixed;
  right: 14px;
  top: 78px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.kill-feed.hidden {
  display: none;
}

.kill-feed-entry {
  padding: 6px 10px;
  background: rgba(8, 10, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
  color: rgba(231, 236, 255, 0.92);
  backdrop-filter: blur(8px);
}

.kill-feed-entry.is-player {
  border-color: rgba(255, 142, 96, 0.45);
  color: rgba(255, 198, 170, 0.98);
}

.kill-feed-entry.is-environment {
  color: rgba(210, 220, 245, 0.78);
}

.kill-feed-entry.is-victim {
  border-color: rgba(255, 92, 92, 0.4);
  color: rgba(255, 170, 170, 0.98);
}

.telemetry-toast {
  position: fixed;
  right: 14px;
  bottom: 16px;
  max-width: min(64ch, 92vw);
  padding: 8px 12px;
  background: rgba(8, 10, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: rgba(225, 234, 255, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.telemetry-toast.active {
  opacity: 1;
  transform: translateY(0);
}

.scoreboard {
  position: fixed;
  right: 14px;
  top: 78px;
  min-width: 220px;
  padding: 10px 12px;
  background: rgba(8, 10, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  backdrop-filter: blur(8px);
}

#minimap {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: var(--minimap-size);
  height: var(--minimap-size);
  pointer-events: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 16, 0.28);
  backdrop-filter: blur(8px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(255, 179, 71, 0.25);
  border: none;
  cursor: pointer;
}

.ghost {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.hero-metrics {
  display: flex;
  gap: 22px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.metric {
  font-size: 1.4rem;
  font-weight: 600;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-card {
  background: linear-gradient(160deg, rgba(22, 28, 45, 0.9), rgba(11, 14, 22, 0.8));
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 30px 60px var(--shadow);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.card-header,
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--accent-2);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(96, 230, 193, 0.6);
}

.card-list {
  list-style: none;
  margin: 18px 0;
  display: grid;
  gap: 18px;
}

.card-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.card-list p {
  color: var(--muted);
  font-size: 0.85rem;
}

.dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
}

.card-list em {
  font-style: normal;
  color: var(--accent-2);
  font-weight: 600;
}

.badge {
  background: rgba(96, 230, 193, 0.2);
  color: var(--accent-2);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.section {
  margin-bottom: 90px;
}

.section-header {
  margin-bottom: 30px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel {
  background: var(--bg-panel);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(6, 10, 18, 0.35);
}

.rating-panel {
  background: var(--bg-panel);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(6, 10, 18, 0.35);
  display: grid;
  gap: 16px;
}

.page-shell .rating-panel {
  margin-top: 28px;
}

.rating-copy h3 {
  margin-top: 6px;
}

.rating-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.rating-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rating-button {
  flex: 1 1 48px;
  min-width: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}

.rating-button.is-selected {
  border-color: rgba(255, 179, 71, 0.6);
  background: rgba(255, 179, 71, 0.18);
  color: var(--text);
}

.rating-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.rating-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.tags {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(122, 168, 255, 0.2);
  color: var(--accent-3);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.list {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.list li::before {
  content: "→";
  margin-right: 8px;
  color: var(--accent);
}

.placeholder {
  margin-top: 16px;
  padding: 24px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--muted);
  text-align: center;
}

.step {
  font-size: 0.85rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.page-shell {
  max-width: 920px;
  margin: 0 auto 80px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header p {
  color: var(--muted);
  max-width: 640px;
}

.story-shell,
.puzzle-shell,
.idle-shell {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 40px rgba(6, 10, 18, 0.35);
}

.story-text {
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 1rem;
  white-space: pre-line;
}

.choice-list {
  display: grid;
  gap: 12px;
}

.choice-button {
  text-align: left;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.choice-button:hover {
  border-color: rgba(255, 179, 71, 0.4);
}

.story-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.story-progress {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 230, 193, 0.3);
  background: rgba(96, 230, 193, 0.08);
  color: var(--accent-2);
  font-size: 0.75rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.cipher-box {
  margin: 18px 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 1px;
  font-size: 1.05rem;
}

.hint-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: -10px;
  margin-bottom: 6px;
}

.hint-row p {
  flex: 1 1 360px;
}

.hint-button {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.hint-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.tool-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tool-toggle[aria-pressed="true"] {
  border-color: rgba(96, 230, 193, 0.55);
  background: rgba(96, 230, 193, 0.12);
  color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(96, 230, 193, 0.15) inset;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

input[type="range"] {
  width: 100%;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.scoreboard {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.scoreboard.hidden {
  display: none;
}

.streak-days {
  display: flex;
  gap: 6px;
  align-items: center;
}

.day-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.day-dot.on {
  background: var(--accent-2);
  border-color: rgba(96, 230, 193, 0.7);
  box-shadow: 0 0 10px rgba(96, 230, 193, 0.4);
}

.result-panel {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.result-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(96, 230, 193, 0.12), rgba(15, 20, 30, 0.85));
  box-shadow: 0 18px 35px rgba(6, 10, 18, 0.35);
}

.result-kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.7rem;
  color: var(--accent-2);
}

.result-main {
  font-size: 1.15rem;
  margin: 8px 0;
}

.result-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.idle-stats {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
  color: var(--muted);
}

.idle-resource {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.idle-status {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.upgrade-grid {
  display: grid;
  gap: 14px;
}

.upgrade-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.muted {
  color: var(--muted);
}

@media (max-width: 820px) {
  body {
    padding: 32px 6vw 48px;
  }

  .nav {
    flex-direction: column;
    gap: 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-card {
    order: -1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-card,
  .section,
  .footer,
  .page-shell {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.7s ease forwards;
  }

  .hero-card {
    animation-delay: 0.1s;
  }

  .section:nth-of-type(1) {
    animation-delay: 0.2s;
  }

  .section:nth-of-type(2) {
    animation-delay: 0.3s;
  }

  .section:nth-of-type(3) {
    animation-delay: 0.4s;
  }

  .footer {
    animation-delay: 0.5s;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.insights-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: rgba(12, 16, 24, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  width: min(340px, 92vw);
  box-shadow: 0 24px 50px rgba(8, 12, 20, 0.6);
  z-index: 40;
  display: grid;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.insights-title {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.insights-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.insights-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.insights-action {
  flex: 1 1 auto;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.8rem;
}

.insights-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.insights-label {
  color: var(--muted);
}

.insights-value {
  color: var(--text);
  text-align: right;
}

.insights-close {
  margin-top: 6px;
  align-self: start;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 6px 14px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .insights-panel {
    left: 20px;
    right: 20px;
  }
}
