:root {
  --void: #0a0e13;
  --void-deep: #04060a;
  --turf: #0d2b1c;
  --turf-deep: #061a10;
  --line: rgba(245, 243, 236, 0.08);
  --ink: #f5f3ec;
  --mist: #93a0ac;
  --gold: #ffb703;
  --gold-hot: #ffd60a;
  --kicker: #00e6c3;
  --keeper: #c084fc;
  --danger: #ff3860;
  --panel: rgba(8, 12, 17, 0.68);
  --panel-edge: rgba(255, 183, 3, 0.22);
  --font-display: 'Teko', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  height: 100svh;
  height: 100dvh;
  background:
    radial-gradient(ellipse 60% 40% at 15% -8%, rgba(255, 183, 3, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% -8%, rgba(255, 183, 3, 0.10), transparent 60%),
    radial-gradient(ellipse 120% 70% at 50% 112%, rgba(0, 230, 195, 0.08), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--turf-deep) 80%, #010805 100%);
}

.floodlights {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(from 200deg at 15% 0%, rgba(255,255,255,0.06), transparent 22%),
    conic-gradient(from 340deg at 85% 0%, rgba(255,255,255,0.06), transparent 22%);
  mix-blend-mode: screen;
}

.pitch-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    100deg,
    var(--line) 0px,
    var(--line) 2px,
    transparent 2px,
    transparent 120px
  );
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255, 214, 10, 0.55), transparent 70%);
  opacity: 0;
}
.flash-overlay.flash-play { animation: flash-pop 0.42s ease-out; }
@keyframes flash-pop {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

.mute-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 8;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mist);
  background: rgba(8, 12, 17, 0.55);
  border: 1px solid var(--panel-edge);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.mute-toggle:hover { color: var(--ink); border-color: var(--gold); }
.mute-toggle[aria-pressed="true"] { color: var(--danger); border-color: var(--danger); }

#app {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 32px;
}

.screen {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: screen-in 0.5s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Broadcast tag / eyebrow ---------- */

.broadcast-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--mist);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--panel-edge);
  background: rgba(255, 255, 255, 0.03);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 8px;
  box-shadow: 0 0 8px rgba(255, 56, 96, 0.8);
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-pulse 1.4s ease-in-out infinite; }
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

/* ---------- Typography helpers ---------- */

.title-lockup {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.82;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.title-line {
  display: block;
  font-size: 58px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.title-cup {
  font-size: 96px;
  background: linear-gradient(180deg, var(--gold-hot) 10%, var(--gold) 55%, #8a5c0d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.title-cup::after {
  content: '';
  display: block;
  width: 120px;
  height: 4px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .title-cup { animation: floodlight-on 1s ease-out both; }
}
@keyframes floodlight-on {
  0% { opacity: 0; filter: brightness(0.3); }
  10% { opacity: 1; filter: brightness(2.2); }
  16% { opacity: 0.55; filter: brightness(0.5); }
  26% { opacity: 1; filter: brightness(1.5); }
  100% { opacity: 1; filter: brightness(1); }
}

.tagline {
  color: var(--mist);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 30px;
  max-width: 320px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 26px;
}

/* ---------- Buttons (broadcast cut-corner panel) ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(245, 243, 236, 0.05), rgba(245, 243, 236, 0.01));
  border: 1px solid var(--panel-edge);
  border-radius: 0;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  padding: 16px 26px 16px 30px;
  cursor: pointer;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-tab {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--mist);
  clip-path: polygon(0 0, 100% 6px, 100% calc(100% - 6px), 0 100%);
}

.btn-primary {
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.16), rgba(255, 183, 3, 0.04));
  border-color: var(--gold);
  justify-content: center;
}
.btn-primary .btn-tab { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); box-shadow: 0 0 12px rgba(255, 183, 3, 0.55); }
.btn-primary:hover { border-color: var(--gold-hot); background: linear-gradient(90deg, rgba(255, 183, 3, 0.26), rgba(255, 183, 3, 0.08)); }

.btn-secondary .btn-tab { background: var(--kicker); box-shadow: 0 0 12px rgba(0, 230, 195, 0.4); }
.btn-secondary:hover, .btn-outline:hover { border-color: var(--kicker); }

.btn-outline {
  background: transparent;
  justify-content: center;
  width: auto;
  padding: 14px 22px;
}

.menu-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.name-row {
  width: 100%;
  margin-bottom: 20px;
  text-align: left;
}
.name-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.name-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(245, 243, 236, 0.05);
  border: 1px solid var(--panel-edge);
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  padding: 13px 16px;
}
.name-input::placeholder { color: var(--mist); }
.name-input:focus { outline: none; border-color: var(--kicker); }

.join-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.code-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-align: center;
  color: var(--ink);
  background: rgba(245, 243, 236, 0.05);
  border: 1px solid var(--panel-edge);
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  padding: 10px 8px;
}
.code-input:focus { outline: none; border-color: var(--kicker); }

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}

/* ---------- Waiting screen ---------- */

.waiting-card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 0;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  padding: 40px 28px;
  width: 100%;
  backdrop-filter: blur(6px);
}

.pulse-ball {
  width: 42px;
  height: 42px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 60%, #8a5c0d 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-ball { animation: pulse 1.3s ease-in-out infinite; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 183, 3, 0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 12px rgba(255, 183, 3, 0); }
}

.waiting-headline {
  font-size: 15px;
  color: var(--mist);
  margin: 0 0 20px;
}

.room-code-display { margin-bottom: 24px; }
.room-code-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mist);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.room-code-value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 46px;
  letter-spacing: 0.14em;
  color: var(--gold-hot);
}
.room-code-hint {
  font-size: 12px;
  color: var(--mist);
  margin: 6px 0 0;
}

/* ---------- Prep / ready screen ---------- */

.ready-status {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 34px;
}
.ready-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ready-label { font-size: 12px; color: var(--mist); letter-spacing: 0.1em; text-transform: uppercase; }
.ready-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ready-vs { font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.ready-dot {
  width: 18px; height: 18px;
  background: rgba(245, 243, 236, 0.12);
  border: 2px solid var(--panel-edge);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  transition: background 0.2s, border-color 0.2s;
}
.ready-dot.on {
  background: var(--kicker);
  border-color: var(--kicker);
  box-shadow: 0 0 12px rgba(0, 230, 195, 0.6);
}

/* ---------- Match screen: broadcast scoreboard bug ---------- */

.broadcast-bug {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  clip-path: polygon(16px 0, 100% 0, 100% 100%, calc(100% - 16px) 100%, 0 100%, 0 0);
}
.bug-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  gap: 2px;
  min-width: 0;
}
.bug-you { border-right: 1px solid var(--line); }
.bug-opp { border-left: 1px solid var(--line); }
.bug-label { font-size: 10px; letter-spacing: 0.15em; color: var(--mist); text-transform: uppercase; }
.bug-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--mist);
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bug-value { font-family: var(--font-display); font-size: 46px; line-height: 1; color: var(--ink); }
.bug-value.pop { animation: score-pop 0.42s ease; }
@keyframes score-pop {
  0% { transform: scale(1); color: var(--ink); }
  40% { transform: scale(1.4); color: var(--gold-hot); }
  100% { transform: scale(1); color: var(--ink); }
}
.bug-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 12px; }
.bug-kick { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--gold); letter-spacing: 0.04em; }
.bug-phase {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 2px 8px;
  text-transform: uppercase;
}

.role-banner {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 16px;
  padding: 7px 24px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: linear-gradient(90deg, rgba(0, 230, 195, 0.2), rgba(0, 230, 195, 0.02));
  border: 1px solid rgba(0, 230, 195, 0.45);
}
.role-word {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--kicker);
  text-transform: uppercase;
}
.role-banner.keeper { background: linear-gradient(90deg, rgba(192, 132, 252, 0.2), rgba(192, 132, 252, 0.02)); border-color: rgba(192, 132, 252, 0.45); }
.role-banner.keeper .role-word { color: var(--keeper); }

.timer-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(245, 243, 236, 0.1);
  overflow: visible;
  margin-bottom: 26px;
}
.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--kicker), var(--gold));
  transform-origin: left;
  transition: transform linear;
}
.timer-num {
  position: absolute;
  top: 10px;
  right: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--mist);
}

/* ---------- Goal area: broadcast camera frame ---------- */

.goal-wrap { width: 100%; position: relative; }

.frame-bracket {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.55;
  z-index: 2;
  pointer-events: none;
}
.bracket-tl { top: -8px; left: -8px; border-width: 2px 0 0 2px; }
.bracket-tr { top: -8px; right: -8px; border-width: 2px 2px 0 0; }
.bracket-bl { bottom: 6px; left: -8px; border-width: 0 0 2px 2px; }
.bracket-br { bottom: 6px; right: -8px; border-width: 0 2px 2px 0; }

.cam-tag {
  position: absolute;
  top: -26px;
  left: -6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--mist);
  opacity: 0.6;
}

.goal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  border: 6px solid var(--ink);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  display: grid;
  grid-template-columns: 1fr 0.55fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  background: rgba(6, 11, 22, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.goal-net {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(245, 243, 236, 0.08) 0, rgba(245, 243, 236, 0.08) 1px, transparent 1px, transparent 13px),
    repeating-linear-gradient(90deg, rgba(245, 243, 236, 0.08) 0, rgba(245, 243, 236, 0.08) 1px, transparent 1px, transparent 13px);
  z-index: 0;
  transform-origin: var(--net-x, 50%) var(--net-y, 50%);
}
.goal-net.net-hit { animation: net-ripple 0.55s cubic-bezier(.2,.7,.3,1); }
@keyframes net-ripple {
  0% { transform: scale(1); filter: brightness(1); }
  22% { transform: scale(1.06, 0.9) skew(-2deg, 1deg); filter: brightness(1.8); }
  46% { transform: scale(0.95, 1.08) skew(2deg, -1deg); filter: brightness(1.3); }
  70% { transform: scale(1.03, 0.97); filter: brightness(1.1); }
  100% { transform: scale(1); filter: brightness(1); }
}

.net-shock {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2px solid var(--gold-hot);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}
.net-shock.active { animation: shock-ring 0.5s ease-out; }
@keyframes shock-ring {
  0% { opacity: 0.9; transform: scale(0.3); box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.5); }
  100% { opacity: 0; transform: scale(6); box-shadow: 0 0 0 14px rgba(255, 214, 10, 0); }
}

.impact-spark {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--danger);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  box-shadow:
    0 0 0 0 rgba(255, 56, 96, 0.9),
    10px 0 0 -1px var(--danger), -10px 0 0 -1px var(--danger),
    0 10px 0 -1px var(--danger), 0 -10px 0 -1px var(--danger),
    7px 7px 0 -1px var(--danger), -7px 7px 0 -1px var(--danger),
    7px -7px 0 -1px var(--danger), -7px -7px 0 -1px var(--danger);
}
.impact-spark.active { animation: spark-burst 0.4s ease-out; }
@keyframes spark-burst {
  0% { opacity: 1; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.6); }
}

/* ---------- Human figures ---------- */

@keyframes fig-idle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.pitch-figure {
  position: absolute;
  width: 22px;
  height: 39px;
  pointer-events: none;
}

.fig-body {
  position: relative;
  width: 100%;
  height: 100%;
  animation: fig-idle-bounce 1.6s ease-in-out infinite;
}

.fig-head, .fig-torso, .fig-arm, .fig-leg { position: absolute; background: var(--fig-color, #8892a0); }
.fig-head { top: 0; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; }
.fig-torso { top: 9px; left: 50%; width: 11px; height: 16px; margin-left: -5.5px; border-radius: 4px; }
.fig-arm { top: 10px; width: 4px; height: 14px; border-radius: 2px; transition: transform 0.25s ease; }
.fig-arm-left { left: 0; transform-origin: top center; transform: rotate(-20deg); }
.fig-arm-right { right: 0; transform-origin: top center; transform: rotate(20deg); }
.fig-leg { top: 24px; width: 5px; height: 15px; border-radius: 2px; transition: transform 0.25s ease; }
.fig-leg-left { left: 3px; transform-origin: top center; }
.fig-leg-right { right: 3px; transform-origin: top center; }

.keeper-figure {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  --fig-color: rgba(192, 132, 252, 0.4);
  transition: left 0.4s cubic-bezier(.24,.9,.26,1.3), top 0.4s cubic-bezier(.24,.9,.26,1.3), transform 0.4s cubic-bezier(.24,.9,.26,1.3);
}
.keeper-figure.you { --fig-color: var(--keeper); filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.75)); }
.keeper-figure.diving .fig-body { animation: dive-stretch 0.45s ease; }
.keeper-figure.diving .fig-arm-left,
.keeper-figure.diving .fig-arm-right { transform: rotate(-72deg); }
.keeper-figure.block .fig-body { animation: block-punch 0.35s ease; }
@keyframes dive-stretch {
  0% { transform: scale(1); }
  35% { transform: scale(1.2, 0.82); }
  70% { transform: scale(0.9, 1.1); }
  100% { transform: scale(1); }
}
@keyframes block-punch {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.pitch-ground {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.kicker-figure {
  position: relative;
  z-index: 2;
  --fig-color: rgba(0, 230, 195, 0.4);
}
.kicker-figure.you { --fig-color: var(--kicker); filter: drop-shadow(0 0 6px rgba(0, 230, 195, 0.75)); }

@keyframes leg-kick {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(40deg); }
  48% { transform: rotate(-55deg); }
  72% { transform: rotate(-16deg); }
  100% { transform: rotate(0deg); }
}
@keyframes torso-strike {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-2px, 2px) rotate(-5deg); }
  48% { transform: translate(3px, -3px) rotate(7deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes arm-strike {
  0% { transform: rotate(-20deg); }
  48% { transform: rotate(-55deg); }
  100% { transform: rotate(-20deg); }
}
.kicker-figure.kicking .fig-leg-right { animation: leg-kick 0.5s cubic-bezier(.22,.8,.3,1); }
.kicker-figure.kicking .fig-torso { animation: torso-strike 0.5s ease; }
.kicker-figure.kicking .fig-arm-left { animation: arm-strike 0.5s ease; }

.dust-puff {
  position: absolute;
  width: 24px;
  height: 9px;
  left: var(--dx, 50%);
  top: var(--dy, 90%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 243, 236, 0.55), transparent 70%);
  pointer-events: none;
  z-index: 4;
}
@media (prefers-reduced-motion: no-preference) {
  .dust-puff { animation: dust-pop 0.5s ease forwards; }
}
@keyframes dust-pop {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

.pitch-ball {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 10px;
  height: 10px;
  margin-left: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d8d8d8 60%, #9aa0a8 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  z-index: 5;
}
.pitch-ball.fly-goal {
  animation: ball-flight-goal 0.56s cubic-bezier(.25,.55,.3,1) forwards;
}
.pitch-ball.fly-save {
  animation: ball-flight-save 0.62s cubic-bezier(.3,.6,.4,1) forwards;
}
@keyframes ball-flight-goal {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  50% { transform: translate(calc(var(--bx) * 0.5), calc(var(--by) * 0.5 - 22px)) scale(0.8) rotate(220deg); }
  100% { transform: translate(var(--bx), var(--by)) scale(0.4) rotate(430deg); opacity: 0.9; }
}
@keyframes ball-flight-save {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  58% { transform: translate(var(--mx), var(--my)) scale(0.74) rotate(320deg); }
  100% { transform: translate(var(--ex), var(--ey)) scale(0.5) rotate(560deg); opacity: 0.85; }
}

.goal-zone {
  position: relative;
  z-index: 1;
  border: 1px dashed rgba(245, 243, 236, 0.22);
  border-radius: 6px;
  background: rgba(245, 243, 236, 0.03);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.goal-zone:active { transform: scale(0.96); }
.goal-zone:hover { background: rgba(0, 230, 195, 0.12); border-color: var(--kicker); }

.zone-top-left { grid-column: 1; grid-row: 1; }
.zone-top-right { grid-column: 3; grid-row: 1; }
.zone-center { grid-column: 2; grid-row: 1 / span 2; }
.zone-bottom-left { grid-column: 1; grid-row: 2; }
.zone-bottom-right { grid-column: 3; grid-row: 2; }

.goal-zone.selected {
  background: rgba(255, 183, 3, 0.25);
  border-color: var(--gold);
  border-style: solid;
}

.goal-zone.disabled { pointer-events: none; opacity: 0.55; }
.goal-zone.selected.disabled { opacity: 1; }

.goal-zone.reveal-kicker { box-shadow: inset 0 0 0 3px var(--gold); }
.goal-zone.reveal-keeper { box-shadow: inset 0 0 0 3px var(--keeper), inset 0 0 0 3px var(--gold); }
.goal-zone.reveal-kicker.reveal-keeper {
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 6px var(--keeper);
}

.pick-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--mist);
}

/* ---------- Cut-in ---------- */

.cutin {
  position: fixed;
  left: 0;
  right: 0;
  top: 38%;
  z-index: 7;
  pointer-events: none;
  overflow: visible;
  height: 116px;
}
.cutin-stripe {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, var(--gold) 8%, var(--gold-hot) 50%, var(--gold) 92%, transparent 100%);
  clip-path: polygon(0 18%, 100% 0%, 100% 82%, 0% 100%);
  transform: translateX(-120%) skewX(-6deg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.cutin-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transform: translateX(-40%);
}
.cutin-word {
  font-family: var(--font-display);
  font-size: 62px;
  line-height: 1;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--void-deep);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.cutin-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(4, 6, 10, 0.72);
  white-space: nowrap;
}
.cutin.save .cutin-stripe {
  background: linear-gradient(100deg, transparent 0%, var(--keeper) 8%, #e6d1ff 50%, var(--keeper) 92%, transparent 100%);
}
.cutin.save .cutin-word { color: #2a0e47; }
.cutin.save .cutin-sub { color: rgba(42, 14, 71, 0.75); }

.cutin.play .cutin-stripe { animation: cutin-sweep 1.1s cubic-bezier(.16,.86,.2,1) both; }
.cutin.play .cutin-copy { animation: cutin-copy 1.1s cubic-bezier(.16,.86,.2,1) both; }
@keyframes cutin-sweep {
  0% { transform: translateX(-120%) skewX(-6deg); }
  30% { transform: translateX(0%) skewX(-6deg); }
  78% { transform: translateX(0%) skewX(-6deg); }
  100% { transform: translateX(120%) skewX(-6deg); }
}
@keyframes cutin-copy {
  0% { opacity: 0; transform: translateX(-40%) scale(0.9); }
  30% { opacity: 1; transform: translateX(0) scale(1.05); }
  38% { transform: translateX(0) scale(1); }
  78% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(40%) scale(0.9); }
}

/* reduced motion: cut-in becomes a simple centered pop, no sweep/shake */
@media (prefers-reduced-motion: reduce) {
  .cutin.play .cutin-stripe { animation: none; transform: translateX(0) skewX(0); }
  .cutin.play .cutin-copy { animation: none; opacity: 1; transform: none; }
}

/* ---------- Result screen ---------- */

.trophy { margin-bottom: 8px; filter: drop-shadow(0 6px 18px rgba(255, 183, 3, 0.35)); transition: filter 0.3s ease, opacity 0.3s ease; }
.trophy.lose { filter: grayscale(1) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4)); opacity: 0.55; }

.result-title {
  font-family: var(--font-display);
  font-size: 64px;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  background: linear-gradient(180deg, var(--gold-hot), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-title.lose {
  background: linear-gradient(180deg, #cdd3dc, #6c7686);
  -webkit-background-clip: text;
  background-clip: text;
}

.result-scoreline {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--ink);
  margin: 0 0 6px;
}

.result-opponent {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 8px;
}

.result-sub {
  color: var(--mist);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ---------- Responsive ---------- */

@media (max-width: 420px) {
  .title-line { font-size: 44px; }
  .title-cup { font-size: 74px; }
  .section-title { font-size: 32px; }
  .bug-value { font-size: 36px; }
  .result-title { font-size: 50px; }
  .cutin-word { font-size: 46px; }
}

[hidden] { display: none !important; }
