:root {
  --bg: #09111a;
  --panel: rgba(7, 13, 20, 0.84);
  --line: rgba(255, 255, 255, 0.12);
  --text: #edf3ff;
  --muted: rgba(237, 243, 255, 0.72);
  --blue: #7ce3ff;
  --red: #ff947c;
  --gold: #ffd46a;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(36, 125, 183, 0.34), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(171, 62, 45, 0.28), transparent 22%),
    linear-gradient(180deg, #101a25 0%, #09111a 58%, #050a11 100%);
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(124, 227, 255, 0.05) 0,
      rgba(124, 227, 255, 0.05) 1px,
      transparent 1px,
      transparent 30px
    );
  opacity: 0.34;
}

#scene {
  display: block;
  width: 100vw;
  height: 100vh;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(7, 13, 20, 0.42), rgba(4, 7, 11, 0.94)),
    linear-gradient(90deg, rgba(26, 83, 122, 0.24), rgba(149, 50, 36, 0.22));
  backdrop-filter: blur(8px);
}

.overlay.hidden {
  display: none;
}

.panel {
  width: min(920px, calc(100vw - 40px));
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(10, 18, 28, 0.96), rgba(7, 12, 18, 0.9));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blue);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
}

.panel h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 0.95;
}

.desc {
  margin: 16px 0 24px;
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.teamPicker {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.teamBtn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.teamBtn.active {
  border-color: rgba(124, 227, 255, 0.5);
  background: linear-gradient(135deg, rgba(124, 227, 255, 0.2), rgba(255, 212, 106, 0.15));
  color: #f7fbff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card strong {
  display: block;
  font-size: 15px;
  line-height: 1.55;
}

.startBtn {
  margin-top: 22px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  color: #071018;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(34, 196, 255, 0.24);
}

#hud {
  position: fixed;
  inset: 14px 14px auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

#hud .left,
#hud .right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: min(48vw, 680px);
}

#hud .right {
  justify-content: flex-end;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 11, 17, 0.66);
  font-size: 13px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.pill.blue {
  border-color: rgba(124, 227, 255, 0.42);
}

.pill.red {
  border-color: rgba(255, 148, 124, 0.44);
}

#status {
  position: fixed;
  left: 50%;
  top: 17%;
  z-index: 12;
  transform: translateX(-50%);
  min-width: 260px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 2px 20px rgba(255, 212, 106, 0.34);
  pointer-events: none;
}

#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(124, 227, 255, 0.94);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.26),
    0 0 12px rgba(34, 196, 255, 0.3);
}

#crosshair::before {
  width: 2px;
  height: 20px;
  transform: translate(-50%, -50%);
}

#crosshair::after {
  width: 20px;
  height: 2px;
  transform: translate(-50%, -50%);
}

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

  #hud {
    flex-direction: column;
  }

  #hud .right {
    justify-content: flex-start;
  }

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

  .teamPicker {
    flex-direction: column;
    align-items: stretch;
  }
}
