/* Red Zone Drill (American football) */
:root { --page-tint: #5a1414; --rz-red: #e23b3b; }
#app { max-width: 980px; margin: 0 auto; padding: 14px 14px 40px; }

/* ---------- Menu ---------- */
.hero { text-align: center; padding: 18px 8px 8px; }
.hero h1 {
  font-family: var(--display); font-size: clamp(2.6rem, 9vw, 4.6rem);
  text-transform: uppercase; letter-spacing: 2px; margin: 6px 0;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
.hero h1 span { color: var(--rz-red); }
.hero-sub { color: var(--muted); max-width: 540px; margin: 0 auto 6px; line-height: 1.45; }
.hero-date { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; color: var(--gold); }
.hero-board {
  display: inline-flex; flex-direction: column; align-items: center;
  background: #111; border: 3px solid #333; border-radius: 8px; padding: 4px 14px 2px;
  box-shadow: 0 0 0 2px #000, var(--shadow);
}
.hero-board-label { font-size: .6rem; letter-spacing: 2px; text-transform: uppercase; color: #aaa; }
.hero-board-num { font-family: var(--led); font-weight: 700; font-size: 1.7rem; color: var(--led-amber); text-shadow: 0 0 10px rgba(255, 176, 0, .8); }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.mode-card {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border-radius: var(--radius); border: 2px solid rgba(255, 255, 255, .1);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 40px),
    linear-gradient(160deg, #2f7d2a, #1f5a1c);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
@media (hover: hover) and (pointer: fine) { .mode-card:hover { transform: translateY(-3px); border-color: var(--gold); } }
.mode-card.practice { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 40px), linear-gradient(160deg, #24496f, #142c47); }
.mode-card.played { opacity: .85; }
.mode-tag { font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.mode-title { font-family: var(--display); font-size: 1.7rem; letter-spacing: 1px; text-transform: uppercase; }
.mode-teaser { color: #dce6f2; font-size: .92rem; line-height: 1.4; min-height: 2.8em; }
.mode-status { margin-top: auto; font-weight: 700; color: var(--gold); }

.stats-strip { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stat { background: var(--panel); border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: 8px 14px; text-align: center; min-width: 84px; }
.stat strong { display: block; font-size: 1.3rem; color: var(--gold); }
.stat span { font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* ---------- Scoreboard ---------- */
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  background: linear-gradient(180deg, #1d1d2b, #0e0e18); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .12); font-weight: 800;
}
.sb-team { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 1.1rem; letter-spacing: 1px; }
.sb-team.opp { justify-content: flex-end; }
.sb-badge { width: 26px; height: 26px; border-radius: 50% 50% 40% 40%; border: 3px solid #fff; flex: none; }
.sb-score { font-family: var(--led); font-size: 1.9rem; color: var(--led-amber); text-shadow: 0 0 8px rgba(255, 176, 0, .7); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.sb-score.bump { animation: bump .6s; }
@keyframes bump { 40% { transform: scale(1.4); color: #fff; } }
.sb-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #050608; padding: 4px 14px; border-left: 1px solid #222; border-right: 1px solid #222; }
.sb-clock { font-family: var(--led); color: #ff3b3b; text-shadow: 0 0 6px rgba(255, 59, 59, .8); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sb-clock.ot { color: var(--gold); }
.sb-down { font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--chalk); white-space: nowrap; }

.match-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 2px; color: var(--muted); font-size: .9rem; }
.drive-track { display: flex; gap: 8px; }
.drive-chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 6px; background: rgba(0, 0, 0, .3); border: 1px solid transparent; font-size: .7rem; font-weight: 800; }
.drive-chip.active { border-color: var(--gold); }
.drive-chip i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: block; }
.drive-chip i.ok { background: var(--good); }
.drive-chip i.td { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.drive-chip i.bad { background: var(--bad); }
.drive-chip i.now { background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { filter: brightness(1.3); opacity: .6; } }

/* ---------- Field ---------- */
.field-wrap { position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 4px solid #1b4d18; background: #2a6b26; }
#field { display: block; width: 100%; height: auto; }
.rz-yard-num { font-family: var(--display); font-size: 30px; fill: rgba(255, 255, 255, .85); letter-spacing: 2px; }
.rz-endzone-text { font-family: var(--display); font-size: 58px; letter-spacing: 10px; opacity: .9; }
.rz-player, .rz-ball { transform-box: view-box; }
.rz-player-inner { transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.rz-player .ring { opacity: 0; }
.rz-player.on-ball .ring { opacity: 1; animation: ring .8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes ring { to { transform: scale(1.25); } }
.rz-player.celebrate .rz-player-inner { animation: hop .4s ease-in-out infinite alternate; }
@keyframes hop { to { transform: scale(1.25); } }
.rz-player.down .rz-player-inner { transform: rotate(80deg) scale(.9); opacity: .8; }
.rz-ball-inner { transform-box: fill-box; transform-origin: center; }
.rz-ball.spin .rz-ball-inner { animation: spiral .25s linear infinite; }
@keyframes spiral { to { transform: rotate(360deg); } }
#rz-los { transition: opacity .3s; }
#rz-crossbar.flash { stroke: #fff; filter: drop-shadow(0 0 8px #ffd23f); }
.rz-trail { stroke-width: 4; stroke-dasharray: 10 8; fill: none; opacity: .85; animation: trail-in .5s ease-out both; stroke: #ffd23f; }
.rz-trail.run { stroke: #fff; }
.rz-trail.kick { stroke: #fff; stroke-width: 3; }
.rz-trail.lost { stroke: #ef4444; }
@keyframes trail-in { from { opacity: 0; } }

.field-banner {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5, 15, 30, .55); text-align: center; padding: 10px; pointer-events: none;
}
.field-banner.pop > * { animation: pop .35s ease-out both; }
.field-banner.pop > *:nth-child(2) { animation-delay: .1s; }
.field-banner.pop > *:nth-child(3) { animation-delay: .2s; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bn-big { font-family: var(--display); font-size: clamp(2rem, 8vw, 3.6rem); color: var(--chalk); letter-spacing: 2px; line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.bn-big.good { color: var(--gold); }
.bn-big.bad { color: #ff7a7a; }
.bn-small { font-weight: 700; font-size: clamp(.9rem, 2.6vw, 1.15rem); margin: 6px 0; }

/* ---------- 4th-down decision ---------- */
.decision { margin-top: 12px; background: var(--panel); border-radius: var(--radius); padding: 16px; border: 2px solid var(--gold); box-shadow: var(--shadow); animation: pop .3s; }
.decision-title { font-family: var(--display); font-size: 1.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin: 0; }
.decision-advice { margin: 4px 0 12px; font-weight: 700; }
.decision-advice.good { color: #86efac; }
.decision-advice.bad { color: #fca5a5; }
.decision-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .decision-btns { grid-template-columns: 1fr; } }
.decision-btn {
  font: inherit; color: inherit; cursor: pointer; text-align: left; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  padding: 14px; border-radius: 12px; background: var(--panel-2); border: 2px solid rgba(255, 255, 255, .15);
}
.decision-btn .d-icon { grid-row: span 2; font-size: 1.8rem; }
.decision-btn em { font-style: normal; color: var(--muted); font-size: .85rem; }
.decision-btn.go { border-color: rgba(226, 59, 59, .6); }
@media (hover: hover) and (pointer: fine) { .decision-btn:hover { border-color: var(--gold); transform: translateY(-1px); } }

/* ---------- Questions ---------- */
.question-panel { margin-top: 12px; background: var(--panel); border-radius: var(--radius); padding: 16px; border: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--shadow); transition: opacity .3s, filter .3s; }
.question-panel.dim { opacity: .35; filter: grayscale(.6); pointer-events: none; }
.question-panel.hard { border-color: var(--rz-red); box-shadow: 0 0 0 1px var(--rz-red), var(--shadow); }
.q-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.q-stage { color: var(--gold); }
.q-cat { color: var(--muted); }
.hard-tag { background: var(--rz-red); color: #fff; padding: 1px 7px; border-radius: 999px; margin-left: 6px; font-size: .7rem; }
.timer { height: 6px; background: rgba(255, 255, 255, .12); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; }
.timer-fill { height: 100%; width: 100%; background: var(--good); }
.timer-fill.warn { background: var(--bad); }
.q-text { font-size: clamp(1.05rem, 2.8vw, 1.3rem); font-weight: 700; line-height: 1.35; margin: 10px 0 14px; min-height: 2.7em; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .answers { grid-template-columns: 1fr; } }
.answer {
  font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 2px solid rgba(255, 255, 255, .12);
  transition: transform .1s, border-color .15s, background .2s;
}
@media (hover: hover) and (pointer: fine) { .answers:not(.fresh) .answer:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); } }
.answer:disabled { cursor: default; }
.answer-key { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); font-size: .8rem; font-weight: 800; }
.answer.correct { background: #166534; border-color: var(--good); animation: pop .3s; }
.answer.wrong { background: #7f1d1d; border-color: var(--bad); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 10px; }
#overlay-score { background: radial-gradient(circle, rgba(255, 210, 63, .35), rgba(5, 15, 30, .75) 70%); }
.score-text {
  font-family: var(--display); font-size: clamp(3rem, 15vw, 9rem); color: var(--gold); letter-spacing: 4px; line-height: 1;
  text-shadow: 0 6px 0 #a07800, 0 0 40px rgba(255, 210, 63, .8);
  animation: zoom .6s cubic-bezier(.2, 1.6, .4, 1) both, wobble 1s .6s ease-in-out infinite;
}
.score-sub { font-size: clamp(1.1rem, 4vw, 1.8rem); font-weight: 800; animation: pop .4s .4s both; margin-top: 10px; }
@keyframes zoom { from { transform: scale(.2) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes wobble { 50% { transform: scale(1.05) rotate(2deg); } }
#overlay-miss { background: rgba(60, 5, 5, .55); }
.miss-card { background: var(--panel); border-radius: var(--radius); padding: 20px 28px; box-shadow: var(--shadow); border: 2px solid var(--bad); animation: pop .35s both; max-width: 90vw; }
.miss-title { font-family: var(--display); font-size: 2rem; letter-spacing: 1px; text-transform: uppercase; color: #ff7a7a; }
.miss-sub { color: #dce6f2; margin-top: 6px; line-height: 1.4; }
.miss-ans { color: var(--gold); font-weight: 700; }

/* ---------- Result ---------- */
.result-card { margin: 20px auto; max-width: 560px; text-align: center; padding: 28px 22px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid rgba(255, 255, 255, .12); }
.result-card.res-W { border-color: var(--gold); background: linear-gradient(180deg, #2b4a1a, var(--panel) 60%); }
.result-card.res-L { border-color: rgba(239, 68, 68, .6); }
.result-icon { font-size: 4.5rem; animation: zoom .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.result-title { font-family: var(--display); font-size: clamp(2rem, 7vw, 3rem); text-transform: uppercase; letter-spacing: 1px; margin: 8px 0; }
.res-W .result-title { color: var(--gold); }
.result-score { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-score span { font-size: 1.1rem; color: var(--muted); vertical-align: middle; }
.result-sub { color: #dce6f2; }
.result-grid { font-size: 1.3rem; line-height: 1.4; margin: 14px 0; font-family: inherit; white-space: pre-wrap; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.result-next { color: var(--muted); font-size: .9rem; margin-top: 16px; }

/* ---------- Topic picker ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.topic-btn, .club-btn { font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; background: var(--panel-2); border: 2px solid rgba(255, 255, 255, .12); }
@media (hover: hover) and (pointer: fine) { .topic-btn:hover, .club-btn:hover { border-color: var(--gold); } }
.topic-btn span { font-size: 1.5rem; }
.topic-btn em { font-style: normal; color: var(--muted); font-size: .8rem; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; max-height: 280px; overflow-y: auto; }
.club-btn { flex-direction: row; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.club-btn .sb-badge { width: 20px; height: 20px; border-width: 2px; }

@media (max-width: 560px) {
  .sb-team { font-size: .9rem; padding: 6px 8px; gap: 6px; }
  .sb-score { font-size: 1.5rem; }
  .sb-mid { padding: 4px 8px; }
  .sb-down { font-size: .66rem; }
  .sb-badge { width: 20px; height: 20px; }
}
