/* ── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080808;
  --surface:   #161616;
  --surface2:  #1c1c1c;
  --border:    #2a2a2a;
  --text:      #e8e8e8;
  --muted:     #666666;
  --accent:    #e8c547;
  --orange:    #f97316;
  --blue:      #3b82f6;
  --purple:    #a855f7;
  --green:     #22c55e;
  --gold:      #e8c547;
  --red:       #ef4444;
  --radius:    4px;
  --radius-lg: 8px;
}

body {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Header ──────────────────────────────────────────────────────── */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
}

.header-top {
  padding: 28px 24px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.site-logo {
  height: 72px;
  width: auto;
  display: block;
}

.subtitle {
  font-family: Inter, sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 10px 20px 14px;
}

.nav-btn {
  padding: 7px 22px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover { color: var(--text); border-color: var(--accent); }

.nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #080808;
  font-weight: 700;
}

/* ── Sections ────────────────────────────────────────────────────── */
main { max-width: 960px; margin: 0 auto; padding: 32px 20px 60px; }

.section { display: none; }
.section.active { display: block; }

/* ── Week Cards ──────────────────────────────────────────────────── */
.week-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.week-header h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text);
}

.week-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  display: block;
  letter-spacing: 0.5px;
}

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.pdf-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Score Table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.score-table th {
  padding: 11px 14px;
  text-align: center;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.score-table th:first-child { text-align: left; }

.score-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.score-table tbody tr:last-child td { border-bottom: none; }

.game-label {
  text-align: left !important;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.winner-cell {
  font-weight: 700;
  color: var(--gold);
}

.crown { font-size: 0.8rem; }

.series-row td {
  font-weight: 700;
  background: var(--surface2);
  border-top: 2px solid var(--border) !important;
}

.series-cell { color: var(--accent); }

.game-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-badge.win { background: rgba(232, 197, 71, 0.12); color: var(--gold); }
.game-badge.tie { background: rgba(100, 116, 139, 0.15); color: var(--muted); }

.no-bet {
  display: block;
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Money / Standings ───────────────────────────────────────────── */
#money h2, #scores h2.section-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.money-header { margin-bottom: 28px; }

.money-header h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: var(--text);
}

.money-note { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.2px; }

.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}

.standing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  position: relative;
}

.standing-card.rank-1 { border-color: var(--gold); }

.rank {
  font-family: Inter, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.standing-card.rank-1 .rank { color: var(--gold); }

.standing-name {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.standing-amount {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 4px;
}

.standing-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.positive { color: var(--green); }
.negative { color: var(--red); }

/* ── Payments ────────────────────────────────────────────────────── */
.payments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.payer, .payee { font-weight: 700; }
.arrow { color: var(--muted); }
.payment-amount {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--accent);
  margin-left: 6px;
}

.venmo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #3d95ce;
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  transition: background 0.2s;
  white-space: nowrap;
}

.venmo-btn:hover { background: #2e7ab0; }

.venmo-note { font-size: 0.75rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.2px; }

.all-square {
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--green);
  margin-top: 8px;
}

/* ── Team Grid ───────────────────────────────────────────────────── */
#team h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
}

.team-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #fff;
  margin: 0 auto 14px;
}

.team-name {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.team-net { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }

.team-no-bet {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 2px;
  background: var(--surface2);
  display: inline-block;
}

.venmo-profile {
  font-size: 0.78rem;
  color: #3d95ce;
  text-decoration: none;
}

.venmo-profile:hover { text-decoration: underline; }

/* ── Season Filter ───────────────────────────────────────────────── */
.season-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 0 24px;
}

.season-pill {
  padding: 5px 14px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.season-pill:hover { color: var(--text); border-color: var(--accent); }
.season-pill.active { background: var(--surface2); border-color: var(--accent); color: var(--accent); }

/* ── Season Divider ──────────────────────────────────────────────── */
.season-divider {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  padding: 6px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.season-divider:not(:first-child) { margin-top: 36px; }

/* ── Absent / Partial ────────────────────────────────────────────── */
.absent { color: var(--muted); font-size: 0.8rem; font-style: italic; }
.partial { color: var(--muted); font-size: 0.75rem; }

/* ── No-bet badge ────────────────────────────────────────────────── */
.game-badge.none { background: rgba(100,116,139,0.1); color: var(--muted); }

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.empty-state p { color: var(--muted); font-size: 0.88rem; }

/* ── Player Icons ────────────────────────────────────────────────── */

/* Score table column header */
.player-th {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}

.player-th > span {
  white-space: nowrap;
}

.col-icon {
  height: 77px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Standings card */
.standing-icon {
  height: 96px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

/* Team card */
.team-avatar-img {
  height: 132px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}

/* ── Easter Egg ──────────────────────────────────────────────────── */
.easter-egg {
  text-align: center;
  padding: 48px 0 24px;
  opacity: 0.1;
  transition: opacity 0.4s;
}
.easter-egg:hover { opacity: 0.5; }
.easter-egg a { font-size: 1rem; text-decoration: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-top { padding: 20px 16px 8px; }
  .site-logo { height: 52px; }
  nav { padding: 8px 12px 12px; overflow-x: auto; justify-content: flex-start; }
  main { padding: 20px 14px 48px; }
  .payment-row { flex-direction: column; align-items: flex-start; }
  .venmo-btn { width: 100%; justify-content: center; }
  .week-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
