:root {
  --grass: #2e7d32;
  --grass-dark: #256528;
  --line: #ffffff;
  --panel: #102a13;
  --accent: #ffd54f;
  --accent2: #f57c00;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at 50% 0%, #1b5e20 0%, #0a1f0c 70%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  width: 940px;
  max-width: 96vw;
}

.screen { display: none; flex-direction: column; align-items: center; gap: 18px; }
.screen.active { display: flex; }

/* ===== MENU ===== */
.title { width: 420px; max-width: 80%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.tagline { font-family: Arial, sans-serif; font-weight: bold; opacity: .85; letter-spacing: 1px; }

.team-select {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 8px;
}

/* ===== TEAM GRID ===== */
.grid-select { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: Arial, sans-serif; font-weight: bold; letter-spacing: 1px;
}
.grid-head #pickPrompt { font-size: 16px; color: var(--accent); }
.grid-matchup { font-size: 14px; opacity: .8; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.grid-card {
  background: var(--panel);
  border: 3px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .08s, border-color .08s;
}
.grid-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.4); }
.grid-card.you { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.grid-card.cpu { border-color: #ef5350; box-shadow: 0 0 0 2px #ef5350 inset; }
.grid-card .tag {
  font-family: Arial, sans-serif; font-size: 10px; font-weight: bold; letter-spacing: 1px;
  display: inline-block; padding: 2px 8px; border-radius: 10px; margin-bottom: 4px; min-height: 16px;
}
.grid-card.you .tag { background: var(--accent); color: #1b2a10; }
.grid-card.cpu .tag { background: #ef5350; color: #fff; }
.grid-card .helmet { width: 78px; height: 54px; margin: 0 auto 4px; }
.grid-card .tname { font-size: 14px; line-height: 1.05; }
.grid-card .tcity { font-family: Arial, sans-serif; font-weight: bold; font-size: 10px; opacity: .55; }
.grid-card .stats { margin-top: 8px; }
.picker { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.picker h2 { font-size: 16px; letter-spacing: 3px; opacity: .7; }
.vs { font-size: 34px; color: var(--accent); text-shadow: 0 2px 0 #000; }

.team-card {
  width: 230px;
  border-radius: 16px;
  padding: 16px;
  background: var(--panel);
  border: 3px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  text-align: center;
}
.team-card .helmet { width: 120px; height: 84px; margin: 0 auto 6px; }
.team-card .tname { font-size: 19px; line-height: 1.1; }
.team-card .tcity { font-family: Arial, sans-serif; font-weight: bold; font-size: 12px; opacity: .6; margin-bottom: 10px; }
.stats { font-family: Arial, sans-serif; font-size: 12px; text-align: left; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.stat { display: flex; align-items: center; gap: 6px; }
.stat .bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.stat .bar > i { display: block; height: 100%; background: var(--accent); }
.stat label { width: 42px; opacity: .7; }

.picker-nav { display: flex; gap: 10px; }
.nav-btn, .big-btn {
  font-family: "Arial Black", Arial, sans-serif;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  color: #1b2a10;
}
.nav-btn { width: 50px; height: 36px; font-size: 16px; background: var(--accent); }
.nav-btn:hover { background: #fff; }

.options { display: flex; gap: 26px; font-family: Arial, sans-serif; font-weight: bold; }
.options label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 1px; opacity: .85; }
.options select { padding: 6px 10px; border-radius: 8px; border: none; font-weight: bold; }

.big-btn {
  margin-top: 4px;
  padding: 16px 46px;
  font-size: 22px;
  letter-spacing: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 0 #b85c00;
  transition: transform .05s, box-shadow .05s;
}
.big-btn:hover { transform: translateY(-1px); }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b85c00; }
.big-btn.secondary { background: #455a64; box-shadow: 0 6px 0 #263238; color: #fff; }

.controls-hint { font-family: Arial, sans-serif; font-weight: bold; font-size: 13px; opacity: .8; }
.controls-hint b { color: var(--accent); }

/* ===== PLAY SELECT ===== */
#playSelect h2 { letter-spacing: 2px; }
.play-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; }
.play-card {
  background: var(--panel);
  border: 3px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: transform .08s, border-color .08s;
}
.play-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.play-card .ptype {
  display: inline-block; font-family: Arial, sans-serif; font-size: 11px; font-weight: bold;
  padding: 3px 8px; border-radius: 20px; letter-spacing: 1px; margin-bottom: 10px;
}
.play-card .ptype.pass { background: #1976d2; }
.play-card .ptype.run { background: #f57c00; }
.play-card .ptype.kick { background: #6a1b9a; }
.play-card h3 { font-size: 18px; margin-bottom: 8px; }
.play-card p { font-family: Arial, sans-serif; font-weight: bold; font-size: 13px; opacity: .75; line-height: 1.35; }

/* ===== GAME ===== */
.scoreboard {
  display: flex; align-items: center; justify-content: space-between;
  width: 900px; max-width: 96vw;
  background: var(--panel); border-radius: 12px 12px 0 0;
  padding: 10px 22px; border-bottom: 3px solid rgba(255,255,255,.1);
}
.sb-team { display: flex; align-items: center; gap: 10px; font-size: 22px; min-width: 230px; }
.sb-team.right { justify-content: flex-end; }
.sb-team .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; }
.sb-team .score { font-size: 30px; color: var(--accent); }
.sb-center { text-align: center; }
.sb-clock { font-size: 26px; }
.sb-qtr { font-family: Arial, sans-serif; font-size: 12px; opacity: .7; letter-spacing: 2px; }
.sb-down { font-family: Arial, sans-serif; font-size: 13px; color: var(--accent); margin-top: 2px; }

#field {
  width: 900px; max-width: 96vw; height: auto;
  border-radius: 0 0 12px 12px;
  display: block;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}

.announce {
  position: fixed; top: 38%; left: 50%; transform: translate(-50%,-50%);
  font-size: 60px; color: var(--accent); text-shadow: 0 4px 0 #000, 0 0 30px rgba(255,213,79,.6);
  pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s;
  text-align: center;
}
.announce.show { opacity: 1; transform: translate(-50%,-58%); }

/* sub-banner: shows the play call & defensive call at the snap */
.announce-sub {
  position: fixed; top: 12%; left: 50%; transform: translate(-50%, -8px);
  font-family: Arial, sans-serif; font-weight: bold; font-size: 16px; letter-spacing: 1px;
  background: rgba(16, 42, 19, 0.92); color: #fff;
  padding: 8px 18px; border-radius: 20px; border: 2px solid var(--accent);
  pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.announce-sub.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== RESULT ===== */
#result h1 { font-size: 56px; color: var(--accent); }
.result-score { font-size: 30px; display: flex; gap: 30px; align-items: center; }
.result-score .win { color: var(--accent); }
