/* ═══════════════════════════════════════
   FOOTBALL: FIELD GOAL — css/football.css v1
   Adapted from css/hockey.css (settings/jumbotron chrome) — no goalie, no
   swing implement: the ball just launches on tap (same as Soccer's #scrBall,
   which has no visible kicking-foot sprite either).
   ═══════════════════════════════════════ */

#footballScreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: url('../Images/GameAssets/Football/background.webp') center/cover no-repeat,
    linear-gradient(180deg, #8bc34a 0%, #8bc34a 40%, #9ccc65 40%, #9ccc65 100%);
}

/* ── Settings cog (identical structure to hockey's) ── */
#ftbSettingsBtn {
  position: absolute; top: 14px; right: 14px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  background: none; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), background 0.2s;
  touch-action: manipulation; user-select: none;
}
#ftbSettingsBtn:active { transform: scale(.9); }
#ftbSettingsBtn.open   { transform: rotate(55deg); }

#ftbSettingsPanel {
  position: absolute; top: 70px; right: 14px; z-index: 39;
  background: rgba(8, 8, 12, 0.93);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px; padding: 14px 18px 16px; min-width: 210px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: none; pointer-events: none;
}
#ftbSettingsPanel.open {
  display: block; pointer-events: auto;
  animation: ftb-panel-in 0.28s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes ftb-panel-in {
  from { opacity: 0; transform: scale(0.88) translateY(-10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.ftb-setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: 'Baloo 2', cursive; font-size: 0.95rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.ftb-setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.ftb-setting-row:first-child { padding-top: 0; }
.ftb-setting-divider {
  font-size: 0.6rem; letter-spacing: 1.5px; color: rgba(102, 187, 106, 0.8);
  font-weight: 900; text-transform: uppercase; padding: 6px 0 2px;
}
.ftb-toggle {
  position: relative; width: 52px; height: 28px; border-radius: 14px;
  border: none; cursor: pointer; background: #333; transition: background 0.25s;
  flex-shrink: 0; touch-action: manipulation;
}
.ftb-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
.ftb-toggle.on { background: #66bb6a; }
.ftb-toggle.on::after { transform: translateX(24px); }

/* ── Jumbotron (same construction as hockey's) ── */
#ftbJumbotron {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 20; pointer-events: none; user-select: none;
  background: #0a0a0e; border: 3px solid #2a2a2a; border-radius: 14px;
  box-shadow: 0 0 0 2px #3a3a3a, 0 0 0 5px #111, 0 8px 28px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.06);
  padding: 6px 18px 8px; text-align: center; white-space: nowrap;
}
#ftbJumbotron::after {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px,
    rgba(0,0,0,.10) 3px, rgba(0,0,0,.10) 4px);
  pointer-events: none;
}
.ftb-jmb-brand {
  font-size: .58rem; letter-spacing: 1.5px; color: #66bb6a; font-weight: 900;
  text-shadow: 0 0 8px rgba(102,187,106,.55); margin-bottom: 2px; opacity: .9;
}
.ftb-jmb-stats { display: flex; align-items: center; justify-content: center; gap: 4px; }
.ftb-jmb-stat  { display: flex; flex-direction: column; align-items: center; padding: 0 10px; }
.ftb-jmb-divider { width: 1.5px; height: 36px; background: rgba(255,255,255,.12); border-radius: 1px; }
.ftb-jmb-lbl {
  font-size: .44rem; letter-spacing: 2px; color: #66bb6a; font-weight: 900;
  opacity: .5; text-transform: uppercase; margin-bottom: 1px;
}

/* ── Goalposts — fixed position, no crossbar (see generate_football_art.py):
   success is passing between the uprights above the notch, computed in
   js/football.js from this element's own rendered box. Bottom-anchored
   (Jason, 2026-09-26: "ensure the upright is bottom fixed to the field")
   so the post's base always sits on the horizon regardless of viewport
   aspect ratio — top-anchoring let the base drift since the rendered
   height (width:auto-scaled) varied with screen shape. The sprite itself
   is now cropped tight to its own content (generate_football_art.py /
   the flood-fill pass), so the element's own bottom edge IS the post's
   base — no extra offset needed to compensate for image padding. ── */
#footballGoal {
  position: absolute; bottom: 46%; left: 50%; transform: translateX(-50%);
  width: min(38%, 175px); z-index: 12; pointer-events: none;
}
#footballGoalImg { width: 100%; height: auto; display: block; user-select: none; }

/* ── Ball + tee ── */
#ftbTee {
  position: absolute; left: 50%; bottom: calc(18% - 6px); transform: translateX(-50%);
  width: 0; height: 0; z-index: 19;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 16px solid #e65100;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}
#ftbBall {
  position: absolute; top: 0; left: 0; width: 50px; height: 50px; z-index: 20;
  background: url('../Images/GameAssets/Football/ball.webp') center/contain no-repeat;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.4));
}
#ftbBall.ftb-idle { animation: ftb-ball-bob 1.6s ease-in-out infinite; }
@keyframes ftb-ball-bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }

/* ── Streak bar (reuses soccer's/hockey's .scr-streak-dot styling wholesale) ── */
#ftbStreakBar {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; gap: 10px; font-size: 1.8rem; pointer-events: none;
}

/* ── Hint text ── */
#ftbHint {
  position: absolute; top: 66px; left: 50%; transform: translateX(-50%);
  z-index: 20; background: rgba(255,255,255,.92); border-radius: 40px;
  padding: 8px 18px; font-family: 'Baloo 2', cursive; font-weight: 800;
  font-size: .95rem; color: #2e7d32; white-space: nowrap; pointer-events: none;
  transition: opacity .3s;
}
