﻿:root {
  --gold: #ffd447;
  --gold-2: #f09b22;
  --ink: #07101b;
  --panel: rgba(8, 18, 35, 0.9);
  --line: rgba(255, 255, 255, 0.24);
  --text: #ffffff;
  --muted: #b9c4d4;
  --danger: #ec4b4b;
  --success: #52dd7f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #02070d;
  color: var(--text);
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sound-toggle {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.sound-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sound-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.landing {
  position: relative;
  min-height: 100vh;
  background: url("../img/bg.webp") center / cover no-repeat;
  isolation: isolate;
}

.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 212, 71, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(1, 8, 18, 0.15), rgba(1, 8, 18, 0.48));
  pointer-events: none;
  z-index: -1;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 100vh;
  padding: 32px clamp(24px, 4vw, 72px);
}

.screen.is-active {
  display: flex;
}

.screen-loader {
  align-items: center;
  justify-content: center;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -38px;
}

.loader-ball {
  position: relative;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
}

.loader-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 209, 56, 0.3));
}

.loader-ball-img {
  width: 98px;
  height: 98px;
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}

.loader-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: #fff;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.loader-label span {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.loader-star {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.loader-progress {
  width: 244px;
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 60px;
  background: #444e65;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.loader-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      135deg,
      #ff7c1e 0 4px,
      #f85a00 4px 8px
    );
  animation: loadbar 2s linear forwards, barberpole 0.7s linear infinite;
}

.screen-teams,
.screen-game {
  flex-direction: column;
  align-items: center;
}

.screen-game {
  justify-content: flex-start;
  padding-top: 40px;
  padding-bottom: 78px;
}

.screen-teams {
  justify-content: flex-start;
  padding-top: 36px;
  padding-bottom: 76px;
}

.teams-title {
  width: min(1060px, 92vw);
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}

.teams-title-top {
  margin: 0;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 72px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  color: #e5e8ee;
}

.teams-title h1 {
  margin: 5px 0 0;
  line-height: 0;
}

.title-svg {
  display: block;
  width: min(749px, 100%);
  height: auto;
  margin: 0 auto;
}

.teams-title-sub {
  margin: 20px 0 0;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  color: #e5e8ee;
}

.teams-reward {
  width: min(1040px, 92vw);
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 24px auto 24px minmax(80px, 1fr);
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 28px;
  font-weight: 300;
  line-height: 90%;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.teams-reward img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.reward-line {
  height: 1px;
  background:
    linear-gradient(197.55deg, #ae4e00 -52.18%, #b47e11 5.25%, #efd983 38.01%, #fef1a2 49.85%, #efd983 60.85%, #bc881b 120.11%, #a54e07 177.55%),
    #ff7c1e;
}

.hero-title {
  margin-top: 20px;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.hero-title p,
.hero-title span {
  margin: 0;
  color: var(--muted);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 600;
  letter-spacing: 0;
}

.hero-title h1,
.hero-title h2 {
  margin: -4px 0 2px;
  color: var(--gold);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(42px, 4.7vw, 88px);
  font-style: italic;
  font-weight: 700;
  line-height: 0.94;
}

.hero-title.compact {
  margin-top: 10px;
}

.hero-title.compact h2 {
  font-size: clamp(34px, 3.7vw, 68px);
}

.teams-grid {
  width: 1032px;
  max-width: 92vw;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 243px);
  justify-content: center;
  gap: 20px;
}

.team-card {
  position: relative;
  width: 243px;
  height: 252px;
  padding: 19px 24px 24px;
  border: 0;
  background: url("../img/bg_card.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.34));
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  transform: translateY(0);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.team-card:hover,
.team-card:focus-visible {
  outline: none;
  transform: translateY(-5px);
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.5));
}

.team-card.is-selected {
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.5));
}

.team-card img {
  width: 195px;
  height: 144px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.team-card strong {
  display: block;
  margin-top: 33px;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 28px;
  color: #050914;
  font-weight: 500;
  line-height: 90%;
  letter-spacing: 0;
}

.info-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  overflow: hidden;
  color: #fff;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 48s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
}

.ticker-item {
  display: inline-block;
  white-space: nowrap;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.ticker-item img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
  vertical-align: middle;
}

.ticker-separator {
  width: 1px;
  height: 32px;
  flex: 0 0 auto;
  background:
    linear-gradient(197.55deg, #ae4e00 -52.18%, #b47e11 5.25%, #efd983 38.01%, #fef1a2 49.85%, #efd983 60.85%, #bc881b 120.11%, #a54e07 177.55%),
    #ff7c1e;
}

.game-header {
  position: relative;
  z-index: 2;
  width: min(1180px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.game-team-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #f2f5fb;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 72px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.game-team-label img {
  width: 66px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  transform: translateY(-7px);
}

.game-team-label span {
  color: #f2f5fb;
}

.strike-title-img {
  width: min(900px, 78vw);
  height: auto;
  display: block;
}

.plain-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(4, 13, 24, 0.58);
  color: var(--text);
  text-transform: uppercase;
}

.score-track {
  --progress: 0%;
  position: relative;
  width: min(756px, 68vw);
  height: 36px;
  margin: 42px 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
}

.score-track::before,
.score-track::after {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  top: 50%;
  height: 8px;
  border-radius: 60px;
  transform: translateY(-50%);
}

.score-track::before {
  background: #444e65;
}

.score-track::after {
  width: calc(var(--progress) * 1%);
  right: auto;
  background: repeating-linear-gradient(135deg, #ff7c1e 0 4px, #f85a00 4px 8px);
}

.score-dot {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: url("../img/ellipse.png") center / contain no-repeat;
  box-shadow: none;
  z-index: 2;
}

.score-dot.is-goal {
  background: url("../img/goal.png") center / 36px 36px no-repeat;
}

.score-dot.is-save {
  background: url("../img/ellipse_x.png") center / 36px 36px no-repeat;
}

/* 16:9 scene that mirrors `background: cover` so everything inside
   stays locked to the stadium/grass at any window size. */
.game-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.pitch {
  position: absolute;
  left: 50%;
  bottom: 9.7%;
  transform: translateX(-50%);
  width: 61.5%;
  aspect-ratio: 1477 / 831;
  pointer-events: auto;
  cursor: url("../img/cursor.png") 38 39, crosshair;
}

@media (max-width: 1200px) {
  .pitch {
    cursor: url("../img/cursor_sm.png") 23 23, crosshair;
  }
}

.goal-frame {
  display: none;
}

.gates-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.strike-arrows {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.strike-arrows .arrow {
  position: absolute;
  height: auto;
}

/* left/right curves meet the ball (bottom, near centre) and point up-out */
.arrow-left {
  right: 52%;
  bottom: 0%;
  width: 26%;
}

.arrow-right {
  left: 52%;
  bottom: 0%;
  width: 26%;
}

.arrow-center {
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  width: 2.4%;
}

.goalkeeper {
  position: absolute;
  left: 50%;
  top: 35%;
  width: 26%;
  max-width: 307px;
  min-width: 210px;
  transform: translateX(-50%);
  transition: transform 0.25s ease;
  z-index: 3;
}

.goalkeeper.dive-left {
  width: 36.6%;
  max-width: 432px;
  transform: translateX(-78%) translateY(-3%);
}

.goalkeeper.dive-right {
  width: 36.4%;
  max-width: 430px;
  transform: translateX(-22%) translateY(-2%);
}

.goalkeeper.dive-center {
  width: 26.4%;
  max-width: 312px;
  transform: translateX(-50%) translateY(-2%);
}

.ball {
  display: block;
}

.game-ball {
  position: absolute;
  left: 84%;
  top: 24%;
  width: clamp(58px, 4.6vw, 88px);
  height: auto;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0;
  transition: left 0.42s cubic-bezier(0.1, 0.76, 0.25, 1), top 0.42s cubic-bezier(0.1, 0.76, 0.25, 1), transform 0.42s ease;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.45));
}

.game-ball.is-active {
  opacity: 1;
}

.game-ball.is-hidden {
  opacity: 0;
}

.game-ball.kick-left {
  left: 27%;
  top: 45%;
  transform: translateX(-50%) scale(0.62) rotate(-420deg);
}

.game-ball.kick-center {
  left: 50%;
  top: 47%;
  transform: translateX(-50%) scale(0.58) rotate(-420deg);
}

.game-ball.kick-right {
  left: 73%;
  top: 45%;
  transform: translateX(-50%) scale(0.62) rotate(420deg);
}

.game-ball.save-left {
  left: 25%;
  top: 49%;
  transform: translateX(-50%) scale(0.58) rotate(-420deg);
}

.game-ball.save-center {
  left: 50%;
  top: 46%;
  transform: translateX(-50%) scale(0.58) rotate(-420deg);
}

.game-ball.save-right {
  left: 76%;
  top: 48%;
  transform: translateX(-50%) scale(0.58) rotate(420deg);
}

.game-ball.goal-left {
  left: 22%;
  top: 26%;
  transform: translateX(-50%) scale(0.52) rotate(-420deg);
}

.game-ball.goal-center {
  left: 50%;
  top: 22%;
  transform: translateX(-50%) scale(0.5) rotate(-420deg);
}

.game-ball.goal-right {
  left: 78%;
  top: 26%;
  transform: translateX(-50%) scale(0.52) rotate(420deg);
}

.strike-zone {
  position: absolute;
  top: 24%;
  height: 61%;
  border: 2px solid rgba(255, 212, 71, 0);
  border-radius: 6px;
  background: rgba(255, 212, 71, 0);
  color: transparent;
  z-index: 8;
  cursor: url("../img/cursor.png") 38 39, crosshair;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.strike-zone:hover,
.strike-zone:focus-visible {
  border-color: rgba(255, 212, 71, 0.8);
  background: rgba(255, 212, 71, 0.11);
  outline: none;
}

.strike-zone span {
  position: absolute;
  left: 50%;
  bottom: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(4, 13, 24, 0.74);
  color: #fff;
  font-family: Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.strike-zone:hover span,
.strike-zone:focus-visible span {
  opacity: 1;
}

.zone-left {
  left: 10%;
  width: 26%;
}

.zone-center {
  left: 37%;
  width: 26%;
}

.zone-right {
  left: 64%;
  width: 26%;
}

.strike-badge {
  position: absolute;
  left: 4%;
  bottom: 0;
  width: min(360px, 36vw);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9;
  pointer-events: none;
}

.strike-badge.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mobile-hint {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 5, 12, 0.76);
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

#resultModal {
  background: rgba(2, 5, 12, 0.58);
  overflow: hidden;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.final-popup {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 390px 340px;
  align-items: stretch;
  border-radius: 16px;
  overflow: hidden;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.48));
}

.win-panel {
  position: relative;
  width: 390px;
  min-height: 417px;
}

.win-art,
.win-art img {
  width: 100%;
  height: 100%;
  display: block;
}

.win-art img {
  object-fit: fill;
}

.win-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 68px;
  height: 105px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #070b14;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.win-copy p {
  margin: 0 0 8px;
  color: #666666;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 90%;
}

.win-copy strong {
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 90%;
}

.registration-panel {
  width: 340px;
  min-height: 417px;
  padding: 14px 24px 12px;
  background: #202a3d;
  color: #fff;
}

.registration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.registration-head h2 {
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.final-close {
  position: static;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 0;
  background: url("../img/close_popup.png") center / contain no-repeat;
}

.registration-slot {
  min-height: 320px;
}

.modal-panel {
  position: relative;
  width: min(468px, 92vw);
  min-height: 560px;
  padding: 54px 46px 42px;
  background: url("../img/popupgb.png") center / 100% 100% no-repeat;
  text-align: center;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.52));
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  background: url("../img/close.png") center / contain no-repeat;
}

#resultModal .final-close {
  position: static;
  width: 24px;
  height: 24px;
  background: url("../img/close_popup.png") center / contain no-repeat;
}

/* Team popup */
.team-panel {
  min-height: 0;
  padding: 0;
  aspect-ratio: 468 / 611;
}

.team-panel-label {
  position: absolute;
  left: 8.5%;
  top: 4.3%;
  height: 16.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.team-panel-label span {
  color: #8b94a4;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.team-panel-label strong {
  color: #0a0f1c;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 60px;
  font-weight: 400;
  line-height: 90%;
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.team-panel-body {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 24.5%;
  bottom: 4.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.team-panel-flag {
  width: 100%;
  display: flex;
  justify-content: center;
}

.team-panel-flag img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 380 / 275;
  object-fit: cover;
  border-radius: 26px;
  display: block;
}

.team-panel-text {
  margin: 0;
  color: #0a0f1c;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 90%;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.score-goals-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 396px;
  height: 60px;
  margin-top: auto;
  margin-bottom: 8px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #ff7c1e;
  box-shadow: 0 0 0 2px rgba(189, 79, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.2);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.score-goals-btn:hover,
.score-goals-btn:focus-visible {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)), #ff7c1e;
  outline: none;
}

.score-goals-btn:active {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), #ff7c1e;
  box-shadow: none;
}

.score-goals-btn span {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: Teko, "Bahnschrift Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 90%;
  letter-spacing: 0;
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.score-goals-btn::before,
.score-goals-btn::after {
  content: "";
  position: absolute;
  width: 314px;
  height: 43px;
  border-radius: 50%;
  background: rgba(104, 255, 28, 0.6);
  mix-blend-mode: plus-lighter;
  filter: blur(20px);
  pointer-events: none;
}

.score-goals-btn::before {
  left: calc(50% - 157px - 129px);
  bottom: -30px;
  z-index: 0;
}

.score-goals-btn::after {
  left: calc(50% - 157px + 175px);
  bottom: 47px;
  z-index: 1;
}

.team-panel .modal-close {
  top: 44px;
  right: 38px;
  width: 65px;
  height: 65px;
}

.modal-kicker {
  margin: 0 0 6px;
  color: #11243a;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-panel h2 {
  margin: 0;
  color: #6b42ff;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 40px;
  font-style: italic;
  line-height: 0.98;
  text-transform: uppercase;
}

.prize {
  width: fit-content;
  margin: 12px auto;
  padding: 8px 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffdc4a, #f28a19);
  color: #1c1405;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.final-score {
  margin: 10px 0 18px;
  color: #17233b;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
}

.signup-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.signup-form label {
  display: grid;
  gap: 5px;
  color: #1c2940;
  font-weight: 700;
  text-transform: uppercase;
}

.signup-form input {
  width: 100%;
  height: 46px;
  border: 1px solid #c9d3e2;
  border-radius: 5px;
  padding: 0 13px;
  background: #fff;
  color: #0d1422;
}

.cta-btn {
  height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffe45d, #fb941a);
  color: #181104;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 8px 0 #a94e0d, 0 18px 24px rgba(58, 35, 0, 0.28);
}

.is-shooting .strike-zone {
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loadbar {
  to {
    width: 100%;
  }
}

@keyframes barberpole {
  to {
    background-position: 24px 0;
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1400px), (max-height: 850px) {
  .screen-teams {
    padding-top: 26px;
    padding-bottom: 64px;
  }

  .teams-title-top {
    font-size: 48px;
  }

  .teams-title h1 {
    margin-top: -2px;
  }

  .title-svg {
    width: min(540px, 100%);
  }

  .teams-title-sub {
    margin-top: 4px;
    font-size: 30px;
  }

  .teams-reward {
    margin-top: 20px;
    gap: 16px;
    grid-template-columns: minmax(60px, 1fr) 20px auto 20px minmax(60px, 1fr);
    font-size: 22px;
  }

  .teams-reward img {
    width: 20px;
    height: 20px;
  }

  .teams-grid {
    width: 780px;
    margin-top: 24px;
    grid-template-columns: repeat(4, 180px);
    gap: 20px;
  }

  .team-card {
    width: 180px;
    height: 187px;
    padding: 14px 18px 18px;
  }

  .team-card img {
    width: 144px;
    height: 106px;
    border-radius: 14px;
  }

  .team-card strong {
    margin-top: 25px;
    font-size: 22px;
  }

  .info-ticker {
    bottom: 18px;
    font-size: 19px;
  }

  .ticker-group {
    gap: 20px;
    padding-right: 20px;
  }

  .ticker-item {
    gap: 9px;
  }

  .ticker-item img {
    width: 20px;
    height: 20px;
  }

  .ticker-separator {
    height: 28px;
  }
}

/* Tablet + mobile: team cards become a horizontal scroll strip */
@media (max-width: 1180px) {
  .teams-grid {
    width: 100vw;
    max-width: none;
    margin-top: 24px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 24px 40px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    cursor: grab;
  }

  .teams-grid.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  .teams-grid.is-dragging .team-card {
    pointer-events: none;
  }

  .teams-grid::-webkit-scrollbar {
    display: none;
  }

  .team-card {
    flex: 0 0 auto;
    width: 243px;
    height: 252px;
    padding: 19px 24px 24px;
    scroll-snap-align: center;
  }

  .team-card img {
    width: 195px;
    height: 144px;
    border-radius: 18px;
  }

  .team-card strong {
    margin-top: 33px;
    font-size: 28px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .sound-toggle {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
  }

  .screen {
    min-height: 100svh;
    padding: 38px 16px;
  }

  #resultModal {
    align-items: center;
    padding: 14px;
  }

  .final-popup {
    grid-template-columns: 1fr;
    width: min(288px, calc(100vw - 28px));
    max-height: calc(100svh - 28px);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 16px;
  }

  .win-panel {
    width: 100%;
    height: min(220px, calc((100vw - 28px) * 0.7639));
    min-height: 0;
  }

  .win-copy {
    left: 16px;
    right: 16px;
    top: 43px;
    height: 61px;
  }

  .win-copy p {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .win-copy strong {
    font-size: 38px;
  }

  .registration-panel {
    width: 100%;
    min-height: 0;
    padding: 14px 14px 14px;
  }

  .registration-head {
    margin-bottom: 22px;
  }

  .hero-title {
    margin-top: 18px;
  }

  /* no gold side lines on mobile — just stars + text */
  .teams-reward {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .reward-line {
    display: none;
  }

  /* match the real visible viewport → no leftover page scroll */
  .landing {
    min-height: 100dvh;
  }

  /* pin the ticker to the visible bottom so it shows on load (no scroll) */
  .screen-teams .info-ticker {
    position: fixed;
    bottom: 8px;
  }

  .topbar {
    width: 100%;
    margin-top: 0;
  }

  .pitch {
    width: 100%;
    margin-top: 6px;
    cursor: default;
  }

  .goal-frame {
    left: 3%;
    right: 3%;
    top: 7%;
    height: 58%;
    border-width: 7px;
  }

  .goalkeeper {
    min-width: 144px;
  }

  .game-ball {
    width: 62px;
  }

  .strike-zone {
    border-color: rgba(255, 212, 71, 0.55);
    background: rgba(255, 212, 71, 0.08);
  }

  .strike-zone span {
    opacity: 1;
    bottom: 8px;
  }

  .zone-left {
    left: 13%;
    width: 22%;
  }

  .zone-center {
    left: 34.5%;
    width: 31%;
  }

  .zone-right {
    left: 67%;
    width: 21%;
  }

  .strike-badge {
    left: 2%;
    width: 58vw;
  }

  .mobile-hint {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-family: Impact, "Arial Narrow", sans-serif;
    text-transform: uppercase;
  }

  .modal-panel {
    min-height: 0;
    padding: 46px 28px 34px;
  }

  #teamModal {
    padding: 16px;
  }

  #teamModal .team-panel {
    width: 320px;
    max-width: none;
    min-width: 320px;
    height: 418px;
    min-height: 0;
    padding: 0;
    aspect-ratio: auto;
  }

  #teamModal .team-panel-label {
    left: 8%;
    top: 3.6%;
    height: 72px;
    gap: 8px;
  }

  #teamModal .team-panel-label span {
    font-size: 18px;
    line-height: 90%;
  }

  #teamModal .team-panel-label strong {
    font-size: 45px;
    line-height: 90%;
  }

  #teamModal .team-panel .modal-close {
    top: 26px;
    right: 26px;
    width: 52px;
    height: 52px;
  }

  #teamModal .team-panel-body {
    left: 22px;
    right: 22px;
    top: 100px;
    bottom: 24px;
    gap: 12px;
  }

  #teamModal .team-panel-flag img {
    max-width: none;
    width: 260px;
    height: 196px;
    border-radius: 24px;
  }

  #teamModal .team-panel-text {
    font-size: 20px;
    line-height: 90%;
  }

  #teamModal .score-goals-btn {
    max-width: none;
    height: 40px;
    margin-bottom: 0;
    padding: 4px 10px;
    border-radius: 10px;
  }

  .arrow-right {
    left: 52%;
    bottom: 0%;
    width: 26%;
}

.arrow-center {
    left: 50%;
    bottom: 2%;
    transform: translateX(-50%);
    width: 2.4%;
}

.arrow-left {
    right: 52%;
    bottom: 0%;
    width: 26%;
}

  #teamModal .score-goals-btn span {
    font-size: 20px;
  }
}

@media (max-width: 460px) {
  .hero-title h1,
  .hero-title h2 {
    font-size: 34px;
  }

  .plain-btn {
    padding: 6px 9px;
    font-size: 13px;
  }

  .modal-panel h2 {
    font-size: 32px;
  }
}

@media (min-width: 1200px) and (min-height: 950px) {
  .screen-game {
    padding-top: 54px;
  }
}

@media (max-width: 1180px) {
  .screen-game {
    padding-top: 28px;
    padding-bottom: 62px;
  }

  .game-header {
    width: min(900px, 94vw);
    gap: 6px;
  }

  .game-team-label {
    gap: 10px;
    font-size: clamp(42px, 7.2vw, 64px);
  }

  .game-team-label img {
    width: clamp(46px, 6.2vw, 60px);
    height: clamp(34px, 4.5vw, 44px);
    transform: translateY(-5px);
  }

  .strike-title-img {
    width: min(760px, 92vw);
  }

  .score-track {
    width: min(720px, 78vw);
    margin: 28px 0 22px;
  }

  .goalkeeper {
    min-width: 150px;
  }

  .strike-badge {
    width: min(300px, 42vw);
  }
}

/* Tablet + mobile game: ball on the spot, dashed strike arrows, no text zones */
@media (max-width: 1180px) {
  .strike-arrows {
    display: block;
  }

  .strike-zone {
    border-color: transparent;
    background: transparent;
  }

  .strike-zone span {
    display: none;
  }

  .mobile-hint {
    display: none;
  }

  /* ball resting on the penalty spot, centered and visible */
  .game-ball {
    left: 50%;
    top: 95%;
    bottom: auto;
    width: clamp(64px, 7vw, 92px);
    opacity: 1;
  }

  .game-ball.goal-left {
    left: 30%;
    top: 30%;
    transform: translateX(-50%) scale(0.6) rotate(-420deg);
  }

  .game-ball.goal-center {
    left: 50%;
    top: 26%;
    transform: translateX(-50%) scale(0.58) rotate(-420deg);
  }

  .game-ball.goal-right {
    left: 70%;
    top: 30%;
    transform: translateX(-50%) scale(0.6) rotate(420deg);
  }

  .game-ball.save-left {
    left: 25%;
    top: 46%;
    transform: translateX(-50%) scale(0.6) rotate(-420deg);
  }

  .game-ball.save-center {
    left: 50%;
    top: 44%;
    transform: translateX(-50%) scale(0.58) rotate(-420deg);
  }

  .game-ball.save-right {
    left: 75%;
    top: 46%;
    transform: translateX(-50%) scale(0.6) rotate(420deg);
  }
}

/* Tablet only: cover-scene uses bg_tab and its aspect */
@media (min-width: 901px) and (max-width: 1180px) {
  .screen-game .game-stage {
    width: max(100vw, 117.19vh);
    height: max(85.33vw, 100vh);
    background: url("../img/bg_tab.webp") center / 100% 100% no-repeat;
  }

  .pitch {
    width: 86%;
    bottom: 14%;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  /* match the real visible viewport → field sits on the bottom, no page scroll */
  .landing {
    min-height: 100dvh;
  }

  .screen-game {
    min-height: 100dvh;
    padding: 44px 14px 58px;
    overflow: hidden;
    background: url("../img/bg_tab.webp") center bottom / cover no-repeat;
  }

  .game-team-label {
    font-size: clamp(34px, 8vw, 52px);
  }

  .game-team-label img {
    width: clamp(38px, 7vw, 52px);
    height: clamp(28px, 5.2vw, 38px);
    border-radius: 6px;
    transform: translateY(-4px);
  }

  .score-track {
    width: min(684px, 90vw);
    height: clamp(14px, 4vw, 28px);
    margin: 22px 0 16px;
  }

  .score-dot {
    width: clamp(14px, 4vw, 28px);
    height: clamp(14px, 4vw, 28px);
  }

  .score-dot.is-goal,
  .score-dot.is-save {
    background-size: 100% 100%;
  }

  .score-track::before,
  .score-track::after {
    left: clamp(7px, 2vw, 14px);
    right: clamp(7px, 2vw, 14px);
    height: clamp(4px, 1.1vw, 7px);
  }

  /* goal sized by height (like the F1 car) → static on width, tracks the bg */
  .game-stage {
    position: static;
    width: auto;
    height: auto;
    transform: none;
  }

  .pitch {
    position: absolute;
    left: 50%;
    bottom: 23vh;
    transform: translateX(-50%);
    width: auto;
    height: 33vh;
    max-width: none;
  }

  .goalkeeper {
    min-width: 118px;
  }

  .game-ball {
    width: clamp(42px, 8vw, 62px);
  }

  .game-ticker {
    bottom: 14px;
  }
}

@media (max-width: 640px) {
  .screen-game {
    padding-top: 36px;
  }

  .game-team-label {
    font-size: clamp(28px, 9vw, 40px);
  }

  .strike-title-img {
    width: 96vw;
  }

  .score-track {
    margin-top: 36px;
  }

  .strike-badge {
    width: min(250px, 55vw);
  }
}

@media (max-width: 900px) {
  .strike-badge {
    left: 50%;
    bottom: -42%;
    width: min(330px, 72vw);
    transform: translateX(-50%) translateY(20px) scale(0.96);
  }

  .strike-badge.is-visible {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .strike-badge {
    bottom: -42%;
    width: min(300px, 78vw);
  }
}
