/* ── Variables ─────────────────────────────────────── */
:root {
  --green:  #0c5d2f;
  --green2: #1a7a40;
  --night:  #02160a;
  --amber:  #ffb800;
  --white:  #ffffff;
  --muted:  rgba(255,255,255,0.55);
  --ff-heb: 'Rubik', 'Arial', sans-serif;
  --ff-lat: 'Bebas Neue', Impact, sans-serif;
  --ease:   cubic-bezier(0.16,1,0.3,1);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--night);
  color: var(--white);
  font-family: var(--ff-heb);
  font-size: clamp(15px, 2vw, 17px);
  overflow-x: hidden;
  direction: rtl;
}

/* ── Reveals ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── HERO ────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--night);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.stadium-bg {
  position: absolute;
  inset: 0;
  bottom: -1px;
}
.stadium-bg svg {
  width: 100%;
  height: 100%;
}

/* Pitch pattern on hero floor */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(255,255,255,0.018) 48px,
      rgba(255,255,255,0.018) 96px
    );
  pointer-events: none;
}

/* ── Scoreboard ──────────────────────────────────── */
.scoreboard {
  position: relative;
  z-index: 2;
  background: #0a0a0a;
  border: 3px solid var(--amber);
  border-radius: 8px;
  padding: 1.25rem 2.5rem;
  margin-bottom: 2rem;
  animation: popIn 0.8s var(--ease) 0.3s both;
  box-shadow: 0 0 40px rgba(255,184,0,0.25);
}

.scoreboard-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  direction: ltr;
}

.scoreboard-team {
  font-family: var(--ff-lat);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--amber);
  letter-spacing: 0.1em;
}

.scoreboard-divider {
  color: rgba(255,184,0,0.4);
  font-size: 2rem;
}

.scoreboard-score {
  display: flex;
  gap: 2px;
}

.flip-card {
  position: relative;
  width: clamp(42px, 8vw, 64px);
  height: clamp(56px, 10vw, 80px);
  background: #111;
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-face {
  font-family: var(--ff-lat);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.flip-back { display: none; }

.scoreboard-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: rgba(255,184,0,0.5);
  text-transform: uppercase;
  margin-top: 0.5rem;
  text-align: center;
  direction: rtl;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-family: var(--ff-lat);
  font-size: clamp(2.5rem, 8vw, 6rem);
  color: var(--white);
  letter-spacing: 0.08em;
  animation: popIn 0.8s var(--ease) 0.6s both;
}

.hero-sub {
  position: relative;
  z-index: 2;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--muted);
  margin-top: 0.8rem;
  animation: popIn 0.7s var(--ease) 0.9s both;
}

/* ── Section label bar ───────────────────────────── */
.section {
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.section-label-bar {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 0.6rem;
  display: flex;
  align-items: center;
}

.bar-label {
  font-family: var(--ff-lat);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--amber);
  letter-spacing: 0.22em;
}

/* ── Lineup ─────────────────────────────────────── */
.lineup-section { background: var(--green); }

.lineup-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.jersey-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.jersey-svg {
  width: min(220px, 55vw);
  cursor: pointer;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.jersey-svg:active { transform: scale(0.96); }
.jersey-svg.kick-anim { animation: jerseyKick 0.4s ease-in-out; }

.jersey-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.player-stats {
  padding: 1rem;
}

.stats-name {
  font-family: var(--ff-lat);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--amber);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.6rem 0;
  gap: 1rem;
}

.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.stat-val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

/* ── Penalty arena ───────────────────────────────── */
.penalty-arena {
  position: fixed;
  inset: 0;
  background: rgba(2,22,10,0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.penalty-arena.hidden { display: none; }

.penalty-inner {
  text-align: center;
  max-width: 380px;
  padding: 2rem;
}

.penalty-label {
  font-family: var(--ff-lat);
  font-size: 1.5rem;
  color: var(--amber);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.penalty-svg {
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 0 auto;
  background: var(--green);
  border-radius: 8px;
}

.goalie { transform-origin: 150px 55px; }
.goalie.dive-left  { animation: diveLft 0.5s ease 0.2s forwards; }
.goalie.dive-right { animation: diveRgt 0.5s ease 0.2s forwards; }

.ball.flying { animation: ballFly 0.55s ease forwards; }

.goal-text {
  font-family: var(--ff-lat);
  font-size: 2rem;
  color: var(--amber);
  letter-spacing: 0.2em;
  margin-top: 1rem;
  animation: popIn 0.4s var(--ease);
}
.goal-text.hidden { display: none; }

.penalty-close {
  margin-top: 1.5rem;
  background: transparent;
  border: 1px solid rgba(255,184,0,0.4);
  color: var(--muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.penalty-close:hover { border-color: var(--amber); color: var(--amber); }

/* ── Highlights grid ─────────────────────────────── */
.highlights-section { background: var(--night); }

.highlights-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.highlight-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s var(--ease);
}
.highlight-card:hover { transform: translateY(-4px); }

.card-tag {
  padding: 0.35rem 0.85rem;
  font-family: var(--ff-lat);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--tc, #fff);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.card-photo {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.card-photo--portrait { aspect-ratio: 4/5; }

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ph {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--muted);
}
.card-photo.img-error img { display: none; }
.card-photo.img-error .ph { display: flex; }

.card-body { padding: 1rem 1.25rem; }
.card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.card-body p  { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ── Halftime ─────────────────────────────────────── */
.halftime-section { background: var(--green); }

.halftime-inner { max-width: 540px; margin: 0 auto; }

.song-block { margin-bottom: 1.5rem; }

.song-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.song-title {
  font-family: var(--ff-lat);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--white);
  margin-bottom: 1.25rem;
  letter-spacing: 0.06em;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  direction: ltr;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.play-btn:hover, .play-btn.playing {
  background: var(--amber);
  color: var(--night);
}

.prog-wrap { flex: 1; }
.prog-bar {
  height: 20px;
  background: transparent;
  border-radius: 2px;
  overflow: visible;
  margin-bottom: 0.4rem;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.prog-bar::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}
.prog-fill {
  height: 3px;
  width: 0%;
  background: var(--amber);
  transition: width 0.25s linear;
  position: relative;
  z-index: 1;
}
.prog-fill::after {
  content: '';
  position: absolute;
  right: -7px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,184,0,.6);
}
.prog-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

.song-unavail {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.song-unavail.hidden { display: none; }

.ambient-row { text-align: center; }
.ambient-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--muted);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-family: var(--ff-heb);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.ambient-btn:hover, .ambient-btn.active {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── Interview ───────────────────────────────────── */
.interview-section { background: #050d08; }

.interview-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.mic-icon { font-size: 2.5rem; margin-bottom: 1.5rem; }

.interview-quote {
  font-family: var(--ff-heb);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  line-height: 1.9;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.interview-quote p { margin-bottom: 0.75rem; }

.interview-en {
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  color: var(--muted);
  font-style: italic;
  direction: ltr;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  background: var(--night);
  border-top: 2px solid rgba(255,184,0,0.2);
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
}

.footer-score {
  font-family: var(--ff-lat);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: rgba(255,184,0,0.15);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-txt {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.footer-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.2);
}

/* ── Keyframes ───────────────────────────────────── */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.88) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes jerseyKick {
  0%   { transform: rotate(0deg); }
  30%  { transform: rotate(-12deg); }
  60%  { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

@keyframes diveLft {
  to { transform: translate(-45px, 20px) rotate(-30deg); }
}
@keyframes diveRgt {
  to { transform: translate(45px, 20px) rotate(30deg); }
}

@keyframes ballFly {
  0%   { cx: 150; cy: 148; r: 9; }
  100% { cx: 150; cy: 55;  r: 7; opacity: 0.8; }
}

/* ── Progress bar seek ───────────────────────────── */

/* ── Song picker ─────────────────────────────────── */
.song-picker { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.song-pick {
  padding: .3rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .2s;
  opacity: .6;
}
.song-pick.active { background: rgba(212,175,55,.2); border-color: #d4af37; opacity: 1; }
.song-pick:hover:not(.active) { opacity: .9; background: rgba(255,255,255,.08); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 650px) {
  .lineup-content {
    grid-template-columns: 1fr;
  }
  .jersey-svg { width: min(160px, 50vw); }
  .highlights-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

@media (max-width: 400px) {
  .highlights-grid { grid-template-columns: 1fr; }
}
