/* ============================================
   NEXT SEC GAME - Apple Sports inspired
   One job: game, time, where to watch
   ============================================ */

:root {
  --bg: #000000;
  --bg-card: #1c1c1e;
  --bg-card-2: #2c2c2e;
  --sep: rgba(255, 255, 255, 0.08);
  --t1: #ffffff;
  --t2: rgba(255, 255, 255, 0.55);
  --t3: rgba(255, 255, 255, 0.3);
  --t4: rgba(255, 255, 255, 0.15);
  --team: #6366f1;
  --team-sec: #ffffff;
  --team-dim: rgba(99, 102, 241, 0.15);
  --green: #30d158;
  --red: #ff3b30;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, monospace;
  --r: 14px;
  --r-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--t1); min-height: 100dvh; }
#app { min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Team background - colored atmosphere for every team */
.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, var(--team), transparent 70%),
    radial-gradient(ellipse 60% 30% at 20% 10%, var(--team-dim), transparent),
    radial-gradient(ellipse 40% 30% at 80% 15%, var(--team-dim), transparent);
  opacity: 0.25;
}

/* Logo watermark (non-custom teams) */
.team-bg {
  position: fixed;
  top: -5%;
  right: -10%;
  width: 320px;
  height: 320px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  filter: grayscale(100%) brightness(2);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Custom pattern background (LSU tiger stripes, etc.) */
.team-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.25) 70%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.25) 70%, transparent 90%);
}

/* ================================================
   PICKER - Collegiate styled
   ================================================ */

/* Animated gradient background */
.picker-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 30% 20%, #364792 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 80%, #f2c83c22 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, #1a1a2e 0%, #000 100%);
  animation: bgShift 12s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { filter: brightness(0.8) hue-rotate(0deg); }
  100% { filter: brightness(1.1) hue-rotate(15deg); }
}

.picker {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100dvh;
  padding: 48px 20px; position: relative; z-index: 1;
}

.picker__header { text-align: center; margin-bottom: 32px; }

/* Bold blocky title */
.picker__title {
  font-family: 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  font-size: 48px; font-weight: 900; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #c0c0d0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* SEC logo - 2x size */
.picker__sec-logo {
  width: 65vw; max-width: 400px; height: auto; object-fit: contain;
  margin: 8px auto 20px; display: block;
  filter: drop-shadow(0 4px 20px rgba(54, 71, 146, 0.5));
}

/* Styled tagline - bigger, bolder */
.picker__sub {
  font-size: 22px; color: var(--t1); margin-top: 0;
  font-weight: 600; letter-spacing: 0.02em;
}
.picker__lock {
  font-weight: 900; font-style: italic;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #f2c83c; font-size: 24px;
}

/* Divider line */
.picker__divider {
  width: 60px; height: 2px; margin: 0 auto 24px;
  background: linear-gradient(90deg, transparent, rgba(242, 200, 60, 0.4), transparent);
}

.picker__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; max-width: 500px; width: 100%;
}

.picker__team {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px; border-radius: var(--r);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.picker__team:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); transform: scale(1.05); }
.picker__team:active { transform: scale(0.96); }
.picker__team-logo { width: 48px; height: 48px; object-fit: contain; }
.picker__team-name { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--t2); text-align: center; line-height: 1.3; }

/* Lock-in */
.lockin {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); opacity: 0; animation: liFade 1.3s ease forwards;
}
.lockin__logo { width: 88px; height: 88px; object-fit: contain; animation: liPulse 1.3s ease forwards; }
.lockin__text { margin-top: 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--t2); opacity: 0; animation: liText 1.3s ease forwards; }

@keyframes liFade { 0%{opacity:0} 10%{opacity:1} 70%{opacity:1} 100%{opacity:0;pointer-events:none} }
@keyframes liPulse { 0%{transform:scale(.5);opacity:0} 15%{transform:scale(1.08);opacity:1} 28%{transform:scale(1)} 70%{transform:scale(1)} 100%{transform:scale(1.2);opacity:0} }
@keyframes liText { 0%,20%{opacity:0;transform:translateY(5px)} 35%{opacity:1;transform:translateY(0)} 70%{opacity:1} 100%{opacity:0} }

/* ================================================
   DASHBOARD
   ================================================ */
.dash { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding-bottom: 60px; }

/* Sticky header */
.hdr {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 20px; position: relative; z-index: 10;
  background: none;
}
.hdr__logo { width: 120px; height: 120px; object-fit: contain; }
.hdr__btn { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; color: var(--team-sec); padding: 6px; transition: opacity 0.15s; }
.hdr__btn:hover { opacity: 0.6; }
.hdr__btn svg { display: block; }

/* ---- HERO CARD ---- */
.hero-card {
  margin: 16px 16px 0;
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
}

.hero-card__top {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 28px 20px 20px; text-align: center;
}


.hero-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex: 1; }
.hero-side__logo { width: 64px; height: 64px; object-fit: contain; margin: 0 auto; }
.hero-side__score { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-mid__vs { font-size: 11px; font-weight: 600; color: var(--t4); text-transform: uppercase; letter-spacing: 0.08em; }
.hero-mid__sport { font-size: 12px; color: var(--t3); }

/* Countdown */
.cd { display: flex; align-items: baseline; justify-content: center; padding: 0 20px 16px; gap: 1px; }
.cd__seg { display: flex; flex-direction: column; align-items: center; }
.cd__val { font-family: var(--mono); font-size: 48px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; min-width: 2ch; text-align: center; }
.cd__sep { font-family: var(--mono); font-size: 36px; font-weight: 200; color: var(--t4); line-height: 1; padding: 0 1px; }
.cd__unit { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t3); margin-top: 4px; }

/* LIVE badge */
.live-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; font-size: 14px; font-weight: 700; color: var(--red);
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Info bar (date + venue + broadcast) */
.info-bar {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 20px 16px;
  border-top: 0.5px solid var(--sep);
  text-align: center;
}
.info-bar__date { font-size: 15px; font-weight: 600; }
.info-bar__venue { font-size: 13px; color: var(--t3); }

/* WHERE TO WATCH - clean, no background */
.watch {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px;
  background: none;
  border-top: 0.5px solid var(--sep);
  font-size: 14px;
}
.watch__icon { display: flex; align-items: center; color: var(--team-sec); }
.watch__icon svg { display: block; }
.watch__label { color: var(--t3); font-weight: 500; }
.watch__net { font-weight: 700; color: var(--t1); }
.watch__tbd { font-weight: 500; color: var(--t3); font-style: italic; }
.watch__arrow { color: var(--t3); font-size: 18px; }
a.watch { text-decoration: none; cursor: pointer; transition: opacity 0.15s; }
a.watch:hover { opacity: 0.7; }

/* ---- UPCOMING (grouped) ---- */
.section { padding: 0 16px; margin-top: 24px; }
.section__title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 8px; padding-left: 4px; }

.list { background: var(--bg-card); border-radius: var(--r); overflow: hidden; }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-height: 56px;
}
.row + .row { border-top: 0.5px solid var(--sep); }

.row__logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.row__emoji { width: 32px; text-align: center; font-size: 18px; flex-shrink: 0; }
.row__body { flex: 1; min-width: 0; }
.row__title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { font-size: 12px; color: var(--t2); margin-top: 1px; }
.row__right { text-align: right; flex-shrink: 0; min-width: 70px; }
.row__date { font-size: 13px; font-weight: 500; color: var(--t2); }
.row__time { font-size: 12px; color: var(--t3); }
.row__bc { font-size: 11px; font-weight: 600; color: var(--team); margin-top: 1px; }
.row__live { font-size: 11px; font-weight: 700; color: var(--red); }

/* States */
.loading { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; gap: 12px; }
.spinner { width: 24px; height: 24px; border: 2.5px solid var(--sep); border-top-color: var(--t2); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
.loading__text { font-size: 14px; color: var(--t3); }

.empty { text-align: center; padding: 60px 20px; }
.empty__title { font-size: 17px; color: var(--t2); }
.empty__sub { font-size: 13px; color: var(--t3); margin-top: 4px; }

/* Footer: Team logo + on + ESPN logo */
.footer-link {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 32px 20px 16px; text-decoration: none;
  transition: opacity 0.15s;
}
.footer-link:hover { opacity: 0.7; }
.footer-link__team { width: 48px; height: 48px; object-fit: contain; }
.footer-link__on { font-size: 16px; font-weight: 400; color: var(--t3); font-style: italic; }
.footer-link__espn { width: 80px; height: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.7; }

/* Hero card accent */
.hero-card { border-top: 2px solid var(--team); }

/* Gameday badge */
.gameday {
  text-align: center; padding: 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--team); background: rgba(255,255,255,0.03);
  border-bottom: 0.5px solid var(--sep);
}

/* Last result */
.last-result {
  text-align: center; padding: 10px 16px; font-size: 13px; color: var(--t3);
  margin: 0 16px;
}
.lr-win { font-weight: 700; color: var(--green); }
.lr-loss { font-weight: 700; color: var(--red); }
.lr-score { font-weight: 600; color: var(--t2); }
.lr-opp { color: var(--t3); }
.lr-sport { font-size: 12px; }

/* Today highlight in rows */
.row__today { font-size: 13px; font-weight: 600; color: var(--team); }

.fade { animation: fadeIn .25s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Responsive */
@media (max-width: 480px) {
  .picker__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .picker__team { padding: 20px 12px; }
  .picker__team-logo { width: 56px; height: 56px; }
  .picker__team-name { font-size: 11px; }
  .picker__title { font-size: 38px; }
  .picker__sec-logo { width: 70vw; max-width: 320px; }
  .picker__sub { font-size: 20px; }
  .picker__lock { font-size: 22px; }
  .cd__val { font-size: 40px; }
  .cd__sep { font-size: 28px; }
  .hero-card { margin: 12px 12px 0; }
  .section { padding: 0 12px; }
}
