/* Friday Night Scoreboard — riktom.com */
:root {
  --bg:        #0f1419;
  --card-bg:   #1a2030;
  --card-bg-2: #232b3f;
  --accent:    #fdb515;
  --accent-2:  #c8102e;
  --text:      #f5f5f5;
  --muted:     #8a92a3;
  --border:    #2a3245;
  --radius:    12px;
  --warn:      #f59e0b;
  --warn-bg:   rgba(245, 158, 11, 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  line-height: 1.4;
}

a { color: var(--accent); }

/* HEADER */
.fns-header {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(180deg, #1a2030 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.fns-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
}
.subtitle {
  margin: .25rem 0 .75rem;
  color: var(--muted);
  font-size: 1rem;
}
.week-banner {
  display: inline-block;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-size: 1rem;
  margin-bottom: .35rem;
}
.disclaimer {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .9rem;
  font-style: italic;
}

.controls {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}
#search {
  flex: 1 1 280px;
  max-width: 420px;
  padding: .7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
}
#search:focus { outline: 2px solid var(--accent); }

.btn {
  padding: .7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--card-bg-2); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
.btn-primary:hover { background: #ffc63d; }

/* View toggle */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.view-btn {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.view-btn.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

/* FILTER BAR */
.filter-bar {
  position: sticky;
  top: 52px;
  z-index: 900;
  display: flex;
  gap: .4rem;
  padding: .6rem .9rem;
  background: rgba(15, 20, 25, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}
.chip {
  flex: 0 0 auto;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); }
.chip.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

/* MAIN */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}
main h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 1rem 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

#list-view { display: block; }
#list-view:not(.active) { display: none; }
#map-view { display: none; }
#map-view.active { display: block; }
#map-container {
  height: 520px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: .8rem;
  padding: .6rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--muted);
}
.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: .35rem;
  vertical-align: middle;
}

.closest-section {
  background: linear-gradient(180deg, rgba(253,181,21,.07), transparent);
  padding: .5rem;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
}

/* GAME CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1rem;
}
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform .15s, border-color .15s;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.matchup {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.teams {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}
.teams .helmet {
  font-size: 1.3rem;
  margin: 0 .15rem;
}
.teams .at { color: var(--muted); margin: 0 .25rem; font-weight: 600; }

.status-badge {
  font-size: .75rem;
  font-weight: 800;
  padding: .25rem .55rem;
  border-radius: 6px;
  background: var(--card-bg-2);
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
}
.status-badge.live { background: var(--accent-2); color: #fff; }
.status-badge.final { background: #374151; color: #fff; }

.stadium {
  font-size: .85rem;
  color: var(--muted);
}

.weather-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--card-bg-2);
  font-size: .8rem;
  color: var(--text);
  align-self: flex-start;
}
.weather-pill.alert {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn);
  font-weight: 700;
  text-decoration: none;
}
.weather-pill.alert:hover { background: rgba(245,158,11,.25); }

.distance {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}
.action {
  flex: 1 1 auto;
  text-align: center;
  padding: .5rem .65rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--card-bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background .15s;
}
.action:hover { background: var(--accent); color: #111; border-color: var(--accent); }
.action.live-score { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.action.live-score:hover { background: #e02540; color: #fff; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1rem;
}

/* FOOTER */
.fns-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.fns-footer a { color: var(--accent); }

/* LIVE SCORE ROW */
.score-row {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  background: linear-gradient(180deg, rgba(253, 181, 21, 0.08), rgba(253, 181, 21, 0.02));
  border: 1px solid rgba(253, 181, 21, 0.2);
  border-radius: 8px;
  padding: .65rem .85rem;
  margin: .5rem 0;
}
.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
}
.team-short { color: var(--text); }
.score {
  font-size: 1.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 2.5rem;
  text-align: right;
  letter-spacing: -0.02em;
}
.score.winning { color: var(--accent); }
.game-progress {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* STATUS BADGE STATES */
.status-badge.status-live {
  background: var(--accent-2);
  color: #fff;
  font-weight: 800;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}
.status-badge.status-final {
  background: #2a3245;
  color: var(--text);
  font-weight: 800;
}
.status-badge.status-ppd {
  background: #444;
  color: var(--muted);
}

/* MOBILE */
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .fns-header { padding: 1rem .75rem .75rem; }
  main { padding: .9rem; }
  .filter-bar { top: 52px; }
}
