:root {
  --bg: #0b1017;
  --surface: #121a25;
  --raised: #1a2533;
  --line: #2a3747;
  --text: #f4f7fb;
  --muted: #9aabbf;
  --accent: #c7f36b;
  --accent-ink: #10170b;
  --warn: #ffd166;
  --bad: #ff8c96;
  --display: "Bebas Neue", Impact, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, sans-serif;
  /* night game: soft stadium-light glow over a dark navy sky */
  background: radial-gradient(ellipse 120% 60% at 50% -20%, #1d3550 0%, var(--bg) 70%) var(--bg);
}
main { max-width: 600px; margin: 0 auto; padding: 12px 16px 24px; }
a { color: var(--muted); }
.muted { color: var(--muted); }
.display { font-family: var(--display); letter-spacing: 1px; font-weight: normal; }

/* header */
header { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 14px; }
h1 { font-family: var(--display); font-weight: normal; font-size: 36px; letter-spacing: 1.5px; margin: 0; line-height: 1; }
h1 b { color: var(--accent); font-weight: normal; }
#meta { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* scoreboard: field + drive summary */
.scoreboard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: 0 10px 30px #0006; }
.field { display: flex; height: 84px; border-radius: 8px; overflow: hidden; border: 2px solid #e8eef6; }
.endzone {
  width: 11%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 17px; letter-spacing: 3px; white-space: nowrap;
  color: #ffffffd9;
  background: repeating-linear-gradient(135deg, #ffffff10 0 6px, transparent 6px 12px), #173a2a;
}
.endzone span { transform: rotate(-90deg); }
.endzone.goal { color: var(--accent); }
.endzone.goal span { transform: rotate(90deg); }
.play {
  flex: 1;
  position: relative;
  border-left: 3px solid #e8eef6;
  border-right: 3px solid #e8eef6;
  background:
    linear-gradient(90deg, #ffffffb3 2px, transparent 2px) 0 0 / 10% 100%,          /* 10-yard lines */
    linear-gradient(90deg, #ffffff40 1px, transparent 1px) 5% 0 / 10% 100%,         /* 5-yard lines */
    linear-gradient(90deg, #ffffff66 1px, transparent 1px) 0 30% / 2% 5px repeat-x, /* hash marks */
    linear-gradient(90deg, #ffffff66 1px, transparent 1px) 0 70% / 2% 5px repeat-x,
    repeating-linear-gradient(90deg, #22703f 0 10%, #1d6338 10% 20%);               /* mowed stripes */
}
#gain {  /* yards gained so far, ending at the line of scrimmage */
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, #c7f36b10, #c7f36b33);
  border-right: 2px solid var(--accent);
  transition: width 0.6s ease-out;
}
#ball {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  font-size: 26px;
  transition: left 0.6s ease-out;
  filter: drop-shadow(0 2px 3px #000a);
}
.drive { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 0 2px; }
#yardage { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--accent); }
#yardage small { font-size: 18px; color: var(--muted); margin-left: 4px; }
#pips { display: flex; gap: 6px; }
#pips span { width: 26px; height: 8px; border-radius: 4px; background: var(--line); }
#pips .gain { background: var(--accent); }
#pips .miss { background: var(--bad); }
#pips .now { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }

/* cards and screens */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 14px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0; }
.prompt { font-size: 21px; font-weight: 600; line-height: 1.35; margin: 10px 0 4px; }
.steps { list-style: none; padding: 0; margin: 14px 0 4px; counter-reset: step; }
.steps li { position: relative; padding-left: 36px; margin: 12px 0; color: var(--muted); }
.steps li b { color: var(--text); font-weight: 600; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--raised); color: var(--accent);
}

/* play clock */
.clockrow { display: flex; justify-content: space-between; align-items: center; }
.timer { font-family: var(--display); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer.warn { color: var(--warn); }
.timer.danger { color: var(--bad); }
.bar { height: 4px; border-radius: 2px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
#bar { height: 100%; width: 100%; background: var(--accent); transition: width 40s linear; }

/* inputs and buttons */
input, button { width: 100%; font: inherit; border-radius: 12px; margin-top: 12px; }
input { font-size: 18px; padding: 14px 16px; background: var(--bg); color: var(--text); border: 1.5px solid var(--line); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px #c7f36b22; }
button {
  font-family: var(--display); font-size: 24px; letter-spacing: 1.5px;
  padding: 12px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 3px 0 #8fb33f;
}
button:active { transform: translateY(2px); box-shadow: 0 1px 0 #8fb33f; }
#msg { font-size: 14px; min-height: 21px; margin: 10px 0 0; }

/* results */
.result { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.result .name { font-size: 22px; font-weight: 600; }
.result .yds { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--accent); white-space: nowrap; }
.result .yds.zero { color: var(--bad); }
.big { font-family: var(--display); font-size: 88px; line-height: 0.9; color: var(--accent); margin: 8px 0 0; }
.big small { font-size: 28px; color: var(--muted); }
.emojis { font-size: 26px; letter-spacing: 4px; margin: 10px 0 0; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.row .yds { font-weight: 700; color: var(--accent); white-space: nowrap; }
.mini { padding: 14px 16px; }
.mini .prompt { font-size: 15px; font-weight: 500; color: var(--muted); margin: 4px 0; }

/* accepted answers */
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.answers { list-style: none; padding: 0; margin: 8px 0 0; font-size: 15px; }
.answers li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; }
.answers li:nth-child(odd) { background: var(--raised); }
.answers li.you { outline: 1.5px solid var(--accent); }
.answers b { color: var(--accent); font-weight: 700; }

footer { text-align: center; margin-top: 28px; font-size: 13px; color: var(--muted); }
button.secondary {
  background: transparent; color: var(--muted); box-shadow: none;
  border: 1.5px solid var(--line); font-size: 18px; padding: 8px; margin-top: 8px;
}
button.secondary:active { transform: none; box-shadow: none; background: var(--raised); }
