/* CHUMBALL — 3D space rocket blood-ball shark soccer. Neon cyan/red on deep space-black. */
:root {
  --ink:  #dffaff;
  --cyan: #7ff3ff;
  --teal: #43e0d8;
  --red:  #ff5a6e;
  --gold: #ffd34d;
  --blue:   #3aa0ff;   /* team BLUE  (Rocket League) */
  --orange: #ff9436;   /* team ORANGE */
  --mono: "Cascadia Mono", "Cascadia Code", "Consolas", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #01030a; color: var(--ink); font-family: var(--mono);
  cursor: crosshair; user-select: none; -webkit-user-select: none;
}
#scene { position: fixed; inset: 0; }
#scene canvas { display: block; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.hud-score {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  font-size: 34px; font-weight: 800; text-shadow: 0 0 12px rgba(127,243,255,.45), 0 2px 4px #000;
}
.hud-score #youScore { color: var(--blue); }
.hud-score #botScore { color: var(--orange); }
.hud-score .vs { font-size: 11px; letter-spacing: .25em; opacity: .65; }
#clock {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  font-size: 18px; letter-spacing: .2em; color: var(--gold); text-shadow: 0 0 10px rgba(255,211,77,.5);
}
.hud-boost { position: absolute; left: 24px; bottom: 22px; }
.hud-boost .lbl { font-size: 11px; letter-spacing: .22em; color: var(--teal); }
#boostBar {
  width: 210px; height: 12px; margin-top: 5px;
  border: 1px solid rgba(127,243,255,.5); border-radius: 7px; overflow: hidden;
  background: rgba(2,12,24,.6); box-shadow: 0 0 10px rgba(67,224,216,.25) inset;
}
#boostFill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--teal), var(--cyan), var(--gold)); transition: width .08s linear; }
#boostBar.boosting { box-shadow: 0 0 14px rgba(127,243,255,.7) inset, 0 0 12px rgba(127,243,255,.5); }
#boostBar.empty { border-color: var(--red); animation: boostlow .6s ease-in-out infinite; }
@keyframes boostlow { 0%,100% { box-shadow: 0 0 4px rgba(255,90,110,.4) inset; } 50% { box-shadow: 0 0 16px rgba(255,90,110,.9) inset; } }
.hud-hint { position: absolute; right: 24px; bottom: 24px; font-size: 11px; letter-spacing: .18em; color: rgba(127,243,255,.4); }

#speedTag {
  position: absolute; top: 88px; left: 50%; transform: translateX(-50%);
  font-size: 15px; font-weight: 800; letter-spacing: .22em; color: var(--gold);
  text-shadow: 0 0 14px rgba(255,211,77,.8), 0 0 28px rgba(255,211,77,.4);
  animation: superson .5s ease-in-out infinite;
}
@keyframes superson { 0%,100% { opacity: .75; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.06); } }

/* ---------- goal banner ---------- */
#goalBanner { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#goalBanner span {
  font-size: clamp(46px, 12vw, 150px); font-weight: 900; letter-spacing: .05em;
  color: var(--cyan); text-shadow: 0 0 40px rgba(127,243,255,.85), 0 0 80px rgba(127,243,255,.4);
  animation: pop .45s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(at 50% 30%, rgba(6,16,40,.55), rgba(0,2,8,.9));
  backdrop-filter: blur(2px); animation: fade .4s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.panel {
  text-align: center; padding: 30px 38px; max-width: min(92vw, 820px);
  border: 1px solid rgba(67,224,216,.35); border-radius: 16px;
  background: linear-gradient(180deg, rgba(6,18,34,.8), rgba(1,6,14,.86));
  box-shadow: 0 0 60px rgba(0,0,0,.6), 0 0 30px rgba(67,224,216,.15) inset;
}
.title {
  display: flex; gap: .1em; justify-content: center; align-items: center;
  font-size: clamp(34px, 7vw, 70px); font-weight: 900; letter-spacing: .04em;
  color: var(--cyan); text-shadow: 0 0 24px rgba(127,243,255,.6);
}
.title.small { font-size: clamp(28px, 5vw, 46px); }
.title .ball { color: var(--red); text-shadow: 0 0 22px var(--red), 0 0 40px #7a0010; font-size: .8em; }
.subtitle { margin: 8px 0 18px; color: var(--teal); letter-spacing: .2em; font-size: clamp(11px, 1.6vw, 15px); }
.how { margin: 0 auto 22px; max-width: 680px; font-size: 14px; line-height: 1.6; opacity: .94; }
.how p { margin: 4px 0 14px; }
.how b { color: var(--ink); }
.how .cyan { color: var(--cyan); } .how .red { color: var(--red); }
.how .blue { color: var(--blue); } .how .orange { color: var(--orange); } .how .gold { color: var(--gold); }
.how .dim { opacity: .6; font-size: 12.5px; }

.schemes { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; text-align: left; }
.scheme {
  flex: 1 1 280px; max-width: 320px; padding: 12px 16px;
  border: 1px solid rgba(67,224,216,.22); border-radius: 11px; background: rgba(4,14,28,.5);
}
.scheme-h { color: var(--cyan); font-size: 12.5px; letter-spacing: .08em; margin-bottom: 8px; }
.scheme-h span { color: var(--teal); opacity: .65; font-size: 10.5px; letter-spacing: 0; }
.scheme ul { margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.7; opacity: .9; }
.scheme li { margin: 2px 0; }
.scheme li b { color: var(--gold); font-weight: 700; }
.scheme li b.cyan { color: var(--cyan); }
.btn {
  font-family: var(--mono); font-size: 19px; font-weight: 800; letter-spacing: .14em;
  color: #021018; background: linear-gradient(180deg, var(--cyan), var(--teal));
  border: 0; border-radius: 11px; padding: 14px 36px; cursor: pointer;
  box-shadow: 0 0 26px rgba(67,224,216,.5), 0 5px 0 #1b6f6a; transition: transform .08s, box-shadow .15s;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 0 36px rgba(127,243,255,.7), 0 7px 0 #1b6f6a; }
.btn:active { transform: translateY(2px);  box-shadow: 0 0 18px rgba(67,224,216,.5), 0 3px 0 #1b6f6a; }
.btnrow { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.btn-ghost {
  color: var(--cyan); background: transparent;
  border: 1px solid rgba(127,243,255,.5); box-shadow: 0 0 18px rgba(67,224,216,.15);
}
.btn-ghost:hover  { background: rgba(127,243,255,.08); box-shadow: 0 0 26px rgba(127,243,255,.35); }
.btn-ghost:active { transform: translateY(1px); }
.finalscore { display: flex; justify-content: center; align-items: center; gap: 24px; font-size: 64px; font-weight: 900; margin: 6px 0 4px; }
#finalYou { color: var(--blue); } #finalBot { color: var(--orange); } .finalscore .dash { opacity: .45; }
.boot-error { margin-top: 16px; color: var(--red); font-size: 13px; line-height: 1.5; }
