@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #111827;
  --muted: #6b7280;
  --accent: #b23a2f;
  --accent-2: #0c6b7a;
  --paper: #e9ecf4;
  --panel: #ffffff;
  --panel-2: #f4f7fc;
  --line: #dde1eb;
  --green: #15803d;
  --gold: #d97706;
  --bg: #ffffff;
  --text: #111827;
  --flash-yellow: #fef9c3;
  --flash-green: #dcfce7;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --hero-bg: linear-gradient(135deg, #0f1923 0%, #1c3a52 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Page layout ---- */

body {
  padding-top: 58px; /* reserve space for sticky nav */
}

.page {
  max-width: 900px;
  margin: 24px auto 40px;
  padding: 0 20px 40px;
}

/* ---- Sticky nav bar ---- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #0f1923;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  gap: 16px;
}

h1 {
  margin: 0;
  line-height: 1;
}

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

.date, .venue {
  display: none; /* event info moved below header in page content */
}

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-links a.nav-active {
  background: var(--accent);
  color: #fff;
}

.nav-links a.nav-secondary {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

.nav-links a.nav-secondary:hover {
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.07);
}

/* ---- Event info bar (below sticky nav) ---- */

.event-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--hero-bg);
  box-shadow: 0 4px 20px rgba(10, 25, 40, 0.22);
  border: none;
}

.event-info-bar .event-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.event-info-bar .event-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.58);
}

/* ---- Entry fee banner ---- */

.entry-fee-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1a3a5c 0%, #0c2d4a 100%);
  color: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(10, 40, 70, 0.18);
}

.entry-fee-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.entry-fee-banner strong {
  font-size: 16px;
  font-weight: 700;
}

.entry-fee-sub {
  display: block;
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

/* ---- Countdown timer ---- */

#deadline-bar {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.countdown-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.countdown-units {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.countdown-num {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  color: var(--accent);
}

.countdown-unit-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.countdown-sep {
  font-size: 36px;
  font-weight: 700;
  color: var(--line);
  margin-bottom: 14px;
  user-select: none;
}

.countdown-sublabel {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

#deadline-bar.deadline-urgent .countdown-num {
  color: #c0392b;
}

#deadline-bar.deadline-urgent {
  border-color: #f5c6c6;
  background: #fff8f8;
}

@media (max-width: 640px) {
  .countdown-num { font-size: 38px; }
  .countdown-unit { min-width: 52px; }
  .countdown-sep { font-size: 28px; }
}

/* ---- Player info strip ---- */

.player-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.field input[type="text"],
.field input[type="email"],
input[type="text"],
input[type="email"] {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: var(--accent-2);
}

/* ---- Fight cards ---- */

.fight,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
  animation: fadeInUp 0.3s ease both;
  transition: box-shadow 0.18s;
}

.fight:hover,
.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 8px 32px rgba(0,0,0,0.07);
}

.fight:nth-child(2), .card:nth-child(2) { animation-delay: 0.05s; }
.fight:nth-child(3), .card:nth-child(3) { animation-delay: 0.10s; }
.fight:nth-child(4), .card:nth-child(4) { animation-delay: 0.15s; }
.fight:nth-child(5), .card:nth-child(5) { animation-delay: 0.20s; }
.fight:nth-child(6), .card:nth-child(6) { animation-delay: 0.25s; }

/* Fight header: red tag + bout title on same line */

.fight-header,
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f4f7fc;
  border-bottom: 1px solid var(--line);
}

.tag,
.fight-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 5px;
  line-height: 1.4;
}

.bout {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.title-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff3cd;
  border: 1px solid #e8c84a;
  color: #7a6000;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---- Pick form body: 3-column layout ---- */

.fight-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0;
  padding: 0;
}

.group {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.group:last-child {
  border-right: none;
}

/* Column headers matching pick sheet style */
.group h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* Radio options */
.option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  font-size: 15px;
  cursor: pointer;
  line-height: 1.3;
}

.option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  background: #fff;
}

.option input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 1px;
}

.wiki-link {
  font-size: 11px;
  color: var(--accent-2);
  text-decoration: none;
  opacity: 0.55;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
}
.wiki-link:hover { opacity: 1; text-decoration: underline; }

/* Round selector */
.rounds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.round-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  cursor: pointer;
}

.round-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  background: #fff;
}

.round-label input[type="radio"]:checked {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.round-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 1px;
}

.note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.footer-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  padding-left: 2px;
}

/* ---- Picks summary grid ---- */

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.pick {
  padding: 10px 12px;
  border-right: 1px dashed var(--line);
}

.pick:last-child {
  border-right: none;
}

.pick h3 {
  margin: 0 0 5px;
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pick .value {
  font-size: 14px;
  line-height: 1.3;
}

.pill {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  vertical-align: middle;
}

/* ---- Buttons ---- */

.btn-primary {
  display: inline-block;
  padding: 11px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(178,58,47,0.3);
  transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: #951f15;
  box-shadow: 0 4px 14px rgba(178,58,47,0.4);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--muted);
}

/* ---- Submit bar ---- */

.submit-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.submit-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Messages ---- */

.msg-error {
  color: #8b1a1a;
  background: #fff5f5;
  border: 1px solid #f0c0c0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 10px 0;
}

.msg-success {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.locked-banner {
  background: #fff8e1;
  border: 1px solid #e8d060;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 15px;
  color: #6b4f00;
  margin-bottom: 16px;
}

.locked-banner a {
  color: var(--accent-2);
}

.error {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

/* ---- Success screen ---- */

.success-screen {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  font-size: 48px;
  color: var(--green);
  line-height: 1;
  margin-bottom: 16px;
}

.success-screen h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
}

.success-screen p {
  color: var(--muted);
  font-size: 15px;
}

.success-screen a {
  color: var(--accent-2);
}

/* ---- OTP / step cards ---- */

.step-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}

.step-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

/* ---- Legend / badge ---- */

.legend {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
}

.legend .note {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
}

/* ---- Scores / Standings ---- */

.standings,
.results,
.breakdown {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

.standings-header,
.results-header,
.breakdown-header {
  padding: 12px 16px;
  background: #f4f7fc;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-size: 11px;
}

.standings-table,
.results-table,
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-table th,
.standings-table td,
.results-table th,
.results-table td,
.breakdown-table th,
.breakdown-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}

.standings-table th,
.results-table th,
.breakdown-table th {
  background: #f0f4fa;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.standings-table tbody tr:nth-child(even),
.results-table tbody tr:nth-child(even),
.breakdown-table tbody tr:nth-child(even) {
  background: #fafbfd;
}

.standings-table tbody tr:hover,
.results-table tbody tr:hover,
.breakdown-table tbody tr:hover {
  background: #f4f7fc;
}

.standings-table tr:last-child td,
.results-table tr:last-child td,
.breakdown-table tr:last-child td {
  border-bottom: none;
}

.rank-first td {
  background: #fffbe8;
  font-weight: 700;
  border-bottom-color: #fde68a;
}

.point-box {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
  background: #fff;
}

.pending {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

/* ---- Card grid for picks/admin ---- */

.cards {
  display: grid;
  gap: 10px;
}

/* ---- Admin fight footer ---- */

.fight-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #f4f7fc;
}

/* ---- Pot banner ---- */

.pot-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #1a3a1a 0%, #0f2a0f 100%);
  color: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(20, 80, 20, 0.25);
}

.pot-trophy {
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.pot-main {
  flex: 1;
}

.pot-amount {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: #f0d060;
}

.pot-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 2px;
}

.pot-meta {
  text-align: right;
  font-size: 13px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* ---- Player accordion (picks summary) ---- */

.player-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.player-card:hover {
  border-color: #b0bdd4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.player-card-open { border-color: var(--accent-2); }

.player-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}

.player-card-name {
  font-size: 16px;
  font-weight: 600;
}

.player-card-chevron {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.player-card-body {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}

.player-pick-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.player-pick-row:last-child { border-bottom: none; }

.player-pick-fight {
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}

.player-pick-value { text-align: right; }
.player-pick-value.muted { color: var(--muted); font-style: italic; }

/* ---- Paid sticker ---- */

.paid-sticker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}

.paid-yes {
  background: #d4f5e2;
  color: #1a6b3a;
  border: 1px solid #7dd4a8;
}

.paid-no {
  background: #fff3cd;
  color: #7a5c00;
  border: 1px solid #e8d060;
}

.btn-paid-toggle {
  padding: 6px 14px;
  background: #fff;
  color: #1a6b3a;
  border: 1px solid #7dd4a8;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-paid-toggle:hover { background: #f0faf5; }

/* ---- Animations ---- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .page { margin: 12px auto 32px; padding: 0 12px 20px; }

  header { grid-template-columns: 1fr; gap: 4px; }
  h1 { font-size: 22px; }

  .player-info { grid-template-columns: 1fr; }
  .field input[type="text"],
  .field input[type="email"],
  input[type="text"],
  input[type="email"] { font-size: 16px; /* prevent iOS zoom */ }

  /* Fight body: 2-col on mobile (Fighter + Method), round below */
  .fight-body { grid-template-columns: 1fr 1fr; }
  .group:nth-child(3) {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid var(--line);
  }
  .group:nth-child(2) { border-right: 1px solid var(--line); }
  .group:nth-child(1) { border-bottom: none; }

  /* Bigger touch targets for radio options */
  .option { font-size: 15px; margin: 7px 0; }
  .option input[type="radio"] { width: 20px; height: 20px; }
  .option input[type="radio"]:checked::after { top: 3px; left: 3px; width: 10px; height: 10px; }

  .round-label input[type="radio"] { width: 20px; height: 20px; }
  .round-label input[type="radio"]:checked::after { top: 3px; left: 3px; width: 10px; height: 10px; }

  .btn-primary, .btn-secondary { width: 100%; text-align: center; padding: 13px 18px; font-size: 16px; }

  .submit-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .legend { grid-template-columns: 1fr; }

  .picks { grid-template-columns: 1fr; }
  .pick { border-right: none; border-bottom: 1px dashed var(--line); }
  .pick:last-child { border-bottom: none; }

  .step-actions { flex-direction: column; align-items: stretch; }

  /* Tables: allow horizontal scroll */
  .standings, .results, .breakdown { overflow-x: auto; }
}

/* ---- Scores two-column layout + aside panels ---- */

.scores-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.aside-col {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insights-locked {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0 4px;
  text-align: center;
}

/* ---- Insights panel ---- */

.insights-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.insights-panel-header {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}

.insights-panel-body {
  padding: 10px 12px 12px;
}

.insights-sub-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.insights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 2px;
}

.insights-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  background: #f4f5f9;
}

.insights-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.insight-upside {
  color: var(--muted);
  font-size: 11px;
}

.insight-max-highlight {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e;
}

.insight-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.insight-badge-leader {
  background: #fef9c3;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.insight-badge-alive {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.insight-badge-out {
  background: #f3f4f6;
  color: var(--muted);
  border: 1px solid var(--line);
}

.insight-fight {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
}

.insight-fight-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  background: #f4f5f9;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.insight-fight-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.insight-team {
  padding: 8px 10px;
}

.insight-team + .insight-team {
  border-left: 1px solid var(--line);
}

.insight-team-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
  margin-bottom: 5px;
}

.insight-pick-row {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.insight-method {
  font-size: 10px;
  color: var(--muted);
}

.insight-no-pick {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.feed-aside {
  /* no longer needs position:sticky — aside-col handles it */
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feed-aside-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.feed-aside-sub {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.feed-aside-body {
  max-height: 680px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tweet-card {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.tweet-card:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.tweet-text {
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 5px;
  word-break: break-word;
}

.tweet-ago {
  font-size: 11px;
  color: var(--muted);
}

.feed-loading,
.feed-unavailable {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 4px;
  text-align: center;
}

.feed-unavailable a { color: var(--accent); }

@media (max-width: 860px) {
  .scores-layout {
    grid-template-columns: 1fr;
  }
  .aside-col {
    position: static;
  }
  .feed-aside-body {
    max-height: 360px;
  }
}

/* ---- Live scores bar ---- */

.live-bar {
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.live-bar.live-active {
  background: #052e10;
  color: #4ade80;
  border: 1px solid #166534;
}

.live-bar.live-complete {
  background: #1e3a5f;
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}

.live-bar.live-pending {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 400;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.updated-bar {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin-bottom: 8px;
  padding-right: 4px;
}

/* ---- Score change animations ---- */

@keyframes score-flash {
  0% { background: #fef9c3; }
  60% { background: #fef9c3; }
  100% { background: transparent; }
}

@keyframes result-flash {
  0% { background: #dcfce7; }
  60% { background: #dcfce7; }
  100% { background: transparent; }
}

.score-bumped { animation: score-flash 2s ease forwards; }
.result-new { animation: result-flash 2s ease forwards; }

.pts-perfect { background: #16a34a !important; color: #fff !important; }
.pts-zero { color: var(--muted); }

/* ---- Events history page ---- */

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.event-card:hover {
  border-left-color: var(--accent-2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.event-card-complete {
  border-left-color: var(--accent);
}

.event-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.event-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.event-card-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.event-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-badge-done {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.event-badge-live {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.event-badge-pending {
  background: #f3f4f6;
  color: var(--muted);
  border: 1px solid var(--line);
}

.event-winner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbf0;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.event-winner-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.event-winner-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}

.event-winner-pts {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.event-winner-pending {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
}

.event-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.event-meta-item {
  font-size: 12px;
  color: var(--muted);
}

.event-meta-arrow {
  margin-left: auto;
  color: var(--accent-2);
  font-weight: 600;
}

/* ---- Champ belt inline badge ---- */

.champ-belt {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(245,158,11,0.5));
  animation: belt-glow 2.5s ease-in-out infinite alternate;
}

.champ-belt svg {
  height: 22px;
  width: auto;
}

@keyframes belt-glow {
  from { filter: drop-shadow(0 1px 3px rgba(245,158,11,0.3)); }
  to   { filter: drop-shadow(0 1px 8px rgba(245,158,11,0.9)); }
}

/* ---- Win screen ---- */

.win-wrap {
  padding: 4px;
  border-radius: 20px;
  background: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #004dff, #750787, #e40303);
  background-size: 300% 100%;
  animation: rainbow-shift 2.5s linear infinite;
  margin-bottom: 16px;
  box-shadow: 0 8px 40px rgba(150,60,255,0.4), 0 2px 8px rgba(0,0,0,0.4);
}

@keyframes rainbow-shift {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

.win-card {
  background: linear-gradient(150deg, #1a0a2e 0%, #2d0a4e 30%, #0a1a3a 60%, #0d2a14 100%);
  border-radius: 17px;
  padding: 36px 24px 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.win-confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

.win-inner {
  position: relative;
  z-index: 1;
}

.win-crown {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
  animation: win-crown-float 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(245,158,11,0.8));
}

@keyframes win-crown-float {
  from { transform: translateY(0) rotate(-4deg); }
  to   { transform: translateY(-8px) rotate(4deg); }
}

.win-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 10px;
  opacity: 0.9;
}

.win-name {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  animation: win-name-shine 2s linear infinite;
  filter: drop-shadow(0 0 16px rgba(255,180,0,0.6));
}

@keyframes win-name-shine {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}


.win-pts {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.win-pot {
  font-size: 56px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(253,230,138,0.6);
}

.win-pot-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(253,230,138,0.6);
  margin-top: 4px;
  margin-bottom: 20px;
}

.win-belt {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 4px 16px rgba(245,158,11,0.5));
  animation: win-belt-pulse 3s ease-in-out infinite;
}

@keyframes win-belt-pulse {
  0%, 100% { filter: drop-shadow(0 4px 16px rgba(245,158,11,0.4)); }
  50%       { filter: drop-shadow(0 4px 32px rgba(245,158,11,0.9)); }
}

/* ---- Picks page login button + panel ---- */

.login-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.login-btn:hover { opacity: 0.88; }

.login-status {
  font-size: 13px;
  color: #16a34a;
  font-weight: 600;
}

.login-panel {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.login-panel-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

/* ---- Email gate (picks page unlock) ---- */

.email-gate {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  max-width: 420px;
  margin: 24px auto;
  box-shadow: var(--shadow);
}

.email-gate-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.email-gate-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}

.email-gate-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
}

.email-gate-error {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.email-gate-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.email-gate-input {
  flex: 1;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}

.email-gate-input:focus {
  outline: none;
  border-color: var(--accent);
}

.email-gate-btn {
  white-space: nowrap;
  padding: 11px 18px;
}

.email-gate-divider {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.email-gate-new {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.email-gate-new:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Scoring guide ---- */

.scoring-guide {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.scoring-guide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.scoring-guide-toggle::-webkit-details-marker { display: none; }

.scoring-guide-toggle::after {
  content: '▼';
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s;
  color: var(--muted);
}

.scoring-guide[open] .scoring-guide-toggle::after {
  transform: rotate(180deg);
}

.scoring-guide-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.scoring-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.scoring-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.scoring-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
}

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

.pts {
  font-weight: 700;
  text-align: center;
  width: 56px;
  border-radius: 6px;
  padding: 4px 8px;
}

.pts-0 { color: var(--muted); }
.pts-2 { color: #d97706; }
.pts-4 { color: #2563eb; }
.pts-5 { color: #16a34a; }

.scoring-note {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ---- Ticker ---- */

.ticker-wrap {
  overflow: hidden;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: 32px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll linear infinite;
  animation-duration: var(--ticker-duration, 40s);
  gap: 0;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-block;
  padding: 0 32px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
}

.ticker-item .ticker-hl { color: #FFD700; }
.ticker-sep {
  display: inline-block;
  padding: 0 8px;
  color: rgba(255,255,255,0.25);
}

.win-gritty {
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(247,73,2,0.7));
  animation: gritty-wobble 1.2s ease-in-out infinite alternate;
}

@keyframes gritty-wobble {
  from { transform: rotate(-6deg) scale(1); }
  to   { transform: rotate(6deg) scale(1.07); }
}

/* ---- All-Time Standings ---- */

.standings-summary {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.standings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.standings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.standings-card:first-child {
  border-left-color: #f59e0b;
  box-shadow: 0 2px 12px rgba(245,158,11,0.15), var(--shadow);
}

.standings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.standings-card-header:hover {
  background: #f4f7fc;
}

.standings-card:first-child .standings-card-header {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.standings-card:first-child .standings-card-header:hover {
  background: linear-gradient(135deg, #fef9d9 0%, #fde68a 100%);
}

.standings-rank {
  font-size: 20px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.standings-info {
  flex: 1;
  min-width: 0;
}

.standings-name {
  font-size: 16px;
  font-weight: 600;
}

.standings-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.standings-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.standings-wins {
  background: #d4edda;
  color: #1e7e34;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
}

.standings-wins-none {
  background: var(--paper);
  color: var(--muted);
}

.standings-card-body {
  border-top: 1px solid var(--line);
  padding: 10px 16px 14px;
}

.standings-events-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.standings-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
}

.standings-event-row.standings-event-won {
  background: #f0fff4;
}

.standings-event-name {
  flex: 1;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 500;
}

.standings-event-name:hover { text-decoration: underline; }

.standings-event-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.standings-event-pts {
  font-weight: 600;
  min-width: 52px;
  text-align: right;
}

.standings-event-trophy { font-size: 16px; }

.standings-event-rank {
  font-size: 12px;
  color: var(--muted);
  min-width: 24px;
  text-align: right;
}

/* ---- All-Time Standings Scoreboard ---- */

.at-scoring-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 10px;
}

.at-guide-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-right: 2px;
}

.at-guide-sep { color: var(--line); }

.at-guide-item { white-space: nowrap; }

.at-pts {
  display: inline-block;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 2px;
  font-size: 13px;
}

.at-pts-0 { color: var(--muted); background: #f3f4f6; }
.at-pts-2 { color: #92400e; background: #fef3c7; }
.at-pts-3 { color: #1d4ed8; background: #dbeafe; }
.at-pts-4 { color: #166534; background: #dcfce7; }

.at-summary {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 2px;
}

.at-col-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  padding-left: 2px;
}

.at-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.at-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}

.at-table thead th {
  background: #f0f4fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.at-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.at-table tbody tr:hover td { background: #f4f7fc !important; }

.at-row-gold td {
  background: #fffbe8;
  font-weight: 700;
  border-bottom-color: #fde68a;
}

.at-table tbody tr:nth-child(even):not(.at-row-gold) td {
  background: #fafbfd;
}

/* Column widths */
.at-rank  { text-align: center; min-width: 36px; width: 42px; font-size: 16px; }
.at-name  { font-weight: 600; font-size: 15px; min-width: 110px; }
.at-num   { text-align: center; width: 44px; color: var(--muted); font-size: 13px; }
.at-wins  { text-align: center; width: 60px; }
.at-total { text-align: center; width: 56px; font-weight: 700; font-size: 15px; }
.at-avg   { text-align: center; width: 52px; color: var(--muted); font-size: 13px; }
.at-ev-col { text-align: center; min-width: 62px; }
.at-ev    { text-align: center; font-weight: 600; font-size: 14px; }

.at-ev-link {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
}
.at-ev-link:hover { text-decoration: underline; }

.at-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.at-th-sort:hover { background: #e4eaf6; }
.at-th-active { background: #dce5f5 !important; color: var(--ink) !important; }
.at-sort-arrow { font-size: 10px; color: var(--muted); opacity: 0.7; }
.at-th-active .at-sort-arrow { opacity: 1; color: var(--accent-2); }
.at-sort-hint { font-style: italic; }

.at-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 2px;
}

.at-section-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

.at-ev-absent { color: #d1d5db; font-weight: 400; }
.at-ev-live   { color: var(--muted); font-style: italic; font-size: 12px; font-weight: 400; }
.at-ev-won    { color: #d97706; }

.at-wins-yes {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

.at-wins-no { color: #d1d5db; font-weight: 400; }

@media (max-width: 640px) {
  .at-table { font-size: 13px; }
  .at-name  { font-size: 14px; }
  .at-total { font-size: 14px; }
}

/* ---- Theme toggle button ---- */

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
  padding: 5px 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover { background: rgba(255,255,255,0.1); }

/* ---- Fighter meta on pick cards (light base) ---- */

.option-fighter { align-items: flex-start; }

.option-fighter-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}

.fighter-meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.odds-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}

.odds-fav { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.odds-dog { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.name-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.name-suggestions-label {
  font-size: 12px;
  color: var(--muted);
}

.name-chip {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}

.name-chip:hover { border-color: var(--accent-2); }

.name-chip-active {
  background: rgba(76, 196, 217, 0.15);
  border-color: var(--accent-2);
  font-weight: 600;
}

/* ---- Crowd consensus panel (light base) ---- */

.consensus-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.consensus-header {
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.consensus-body { padding: 10px 16px 14px; }

.consensus-fight { margin: 10px 0 14px; }

.consensus-fight-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 5px;
}

.consensus-names {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.consensus-pct { font-variant-numeric: tabular-nums; }
.consensus-left .consensus-pct { color: #b23a2f; }
.consensus-right { text-align: right; }
.consensus-right .consensus-pct { color: #2563eb; }

.consensus-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef1f7;
  border: 1px solid var(--line);
}

.consensus-bar-red { background: linear-gradient(90deg, #b23a2f, #e04a3a); }
.consensus-bar-blue { background: linear-gradient(90deg, #2a5da8, #4a8fd4); }

.consensus-method {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---- Trash talk board (light base) ---- */

.trash-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.trash-form input[type="text"] {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 6px;
}

.trash-form-row { display: flex; gap: 6px; }
.trash-form-row input { flex: 1; min-width: 0; }

.trash-post-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.trash-post-btn:hover:not(:disabled) { opacity: 0.88; }
.trash-post-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.trash-post {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fafbfd;
}

.trash-post-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 2px;
}

.trash-post-msg {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.trash-post-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.trash-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 10px 4px;
}

/* ---- Flash animations via theme vars ---- */

@keyframes score-flash {
  0% { background: var(--flash-yellow); }
  60% { background: var(--flash-yellow); }
  100% { background: transparent; }
}

@keyframes result-flash {
  0% { background: var(--flash-green); }
  60% { background: var(--flash-green); }
  100% { background: transparent; }
}

/* ============================================================
   Dark UFC-style theme — active when html[data-theme="dark"]
   ============================================================ */

html[data-theme="dark"] {
  --ink: #e8ecf4;
  --muted: #94a0b4;
  --accent: #e04a3a;
  --accent-2: #4cc4d9;
  --paper: #0d1320;
  --panel: #161f30;
  --panel-2: #1c2740;
  --line: #283349;
  --green: #4ade80;
  --gold: #f0c95c;
  --bg: #0d1320;
  --text: #e8ecf4;
  --flash-yellow: #3a3410;
  --flash-green: #123a20;
  --shadow: 0 1px 3px rgba(0,0,0,0.35), 0 4px 14px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.5);
  --hero-bg: linear-gradient(135deg, #16202f 0%, #33202a 100%);
}

html[data-theme="dark"] .fight-header,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .fight-footer,
html[data-theme="dark"] .standings-header,
html[data-theme="dark"] .results-header,
html[data-theme="dark"] .breakdown-header { background: var(--panel-2); }

html[data-theme="dark"] .option input[type="radio"],
html[data-theme="dark"] .round-label input[type="radio"] { background: #0d1320; border-color: #55637d; }

html[data-theme="dark"] .field input[type="text"],
html[data-theme="dark"] .field input[type="email"],
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"] { background: #0d1320; color: var(--ink); border-color: var(--line); }

html[data-theme="dark"] .pill,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .point-box,
html[data-theme="dark"] .btn-paid-toggle { background: var(--panel-2); }
html[data-theme="dark"] .btn-paid-toggle { color: #6ee7a0; border-color: #2c6b45; }
html[data-theme="dark"] .btn-paid-toggle:hover { background: #1a3325; }

html[data-theme="dark"] .title-badge { background: #3a2f10; border-color: #8a6d1f; color: var(--gold); }

html[data-theme="dark"] #deadline-bar.deadline-urgent { background: #2a1515; border-color: #5c2626; }
html[data-theme="dark"] #deadline-bar.deadline-urgent .countdown-num { color: #ff6b5b; }

html[data-theme="dark"] .standings-table th,
html[data-theme="dark"] .results-table th,
html[data-theme="dark"] .breakdown-table th { background: #1a2438; }
html[data-theme="dark"] .standings-table tbody tr:nth-child(even),
html[data-theme="dark"] .results-table tbody tr:nth-child(even),
html[data-theme="dark"] .breakdown-table tbody tr:nth-child(even) { background: #19233a; }
html[data-theme="dark"] .standings-table tbody tr:hover,
html[data-theme="dark"] .results-table tbody tr:hover,
html[data-theme="dark"] .breakdown-table tbody tr:hover { background: #202c46; }

html[data-theme="dark"] .rank-first td { background: rgba(240,201,92,0.10); border-bottom-color: rgba(240,201,92,0.35); }

html[data-theme="dark"] .msg-error { color: #ff9f9f; background: #2a1515; border-color: #5c2626; }
html[data-theme="dark"] .locked-banner { background: #2a2410; border-color: #6b5a1a; color: #e8d060; }

html[data-theme="dark"] .paid-yes { background: #10331f; color: #6ee7a0; border-color: #2c6b45; }
html[data-theme="dark"] .paid-no { background: #332a10; color: #e8c860; border-color: #6b5a1a; }

html[data-theme="dark"] .insights-panel-header,
html[data-theme="dark"] .insights-table th,
html[data-theme="dark"] .insight-fight-label { background: #1a2438; }
html[data-theme="dark"] .insight-fight { background: #131c2e; }
html[data-theme="dark"] .insight-max-highlight { background: #3a2f10 !important; border-color: #8a6d1f !important; color: var(--gold); }
html[data-theme="dark"] .insight-badge-leader { background: #3a2f10; color: var(--gold); border-color: #8a6d1f; }
html[data-theme="dark"] .insight-badge-alive { background: #10331f; color: #6ee7a0; border-color: #2c6b45; }
html[data-theme="dark"] .insight-badge-out { background: #1c2438; color: var(--muted); border-color: var(--line); }

html[data-theme="dark"] .tweet-card { background: #131c2e; color: var(--ink); }

html[data-theme="dark"] .event-winner { background: rgba(240,201,92,0.08); border-color: rgba(240,201,92,0.3); }
html[data-theme="dark"] .event-badge-done { background: #10331f; color: #6ee7a0; border-color: #2c6b45; }
html[data-theme="dark"] .event-badge-live { background: #332a10; color: #e8c860; border-color: #6b5a1a; }
html[data-theme="dark"] .event-badge-pending { background: #1c2438; color: var(--muted); border-color: var(--line); }

html[data-theme="dark"] .standings-card-header:hover { background: #1c2740; }
html[data-theme="dark"] .standings-card:first-child .standings-card-header { background: linear-gradient(135deg, #2a2410 0%, #1f1c0e 100%); }
html[data-theme="dark"] .standings-card:first-child .standings-card-header:hover { background: linear-gradient(135deg, #332c14 0%, #262210 100%); }
html[data-theme="dark"] .standings-wins { background: #10331f; color: #6ee7a0; }
html[data-theme="dark"] .standings-wins-none { background: #1c2438; color: var(--muted); }
html[data-theme="dark"] .standings-event-row.standings-event-won { background: rgba(74,222,128,0.07); }

html[data-theme="dark"] .at-pts-0 { color: var(--muted); background: #1c2438; }
html[data-theme="dark"] .at-pts-2 { color: #e8c860; background: #332a10; }
html[data-theme="dark"] .at-pts-3 { color: #7db4f5; background: #14243d; }
html[data-theme="dark"] .at-pts-4 { color: #6ee7a0; background: #10331f; }
html[data-theme="dark"] .at-table thead th { background: #1a2438; }
html[data-theme="dark"] .at-table tbody tr:nth-child(even):not(.at-row-gold) td { background: #19233a; }
html[data-theme="dark"] .at-table tbody tr:hover td { background: #202c46 !important; }
html[data-theme="dark"] .at-row-gold td { background: rgba(240,201,92,0.10); border-bottom-color: rgba(240,201,92,0.3); }
html[data-theme="dark"] .at-th-sort:hover { background: #243252; }
html[data-theme="dark"] .at-th-active { background: #2a3a5e !important; color: var(--ink) !important; }
html[data-theme="dark"] .at-ev-absent { color: #3a4661; }
html[data-theme="dark"] .at-ev-won { color: var(--gold); }
html[data-theme="dark"] .at-wins-yes { background: #10331f; color: #6ee7a0; border-color: #2c6b45; }

html[data-theme="dark"] .pts-2 { color: #e8a13d; }
html[data-theme="dark"] .pts-3 { color: #7db4f5; }
html[data-theme="dark"] .pts-4 { color: #6ee7a0; }

html[data-theme="dark"] .odds-fav { background: #10331f; color: #6ee7a0; border-color: #2c6b45; }
html[data-theme="dark"] .odds-dog { background: #332a10; color: #e8c860; border-color: #6b5a1a; }

html[data-theme="dark"] .consensus-left .consensus-pct { color: #ff8f82; }
html[data-theme="dark"] .consensus-right .consensus-pct { color: #7db4f5; }
html[data-theme="dark"] .consensus-bar { background: #0d1320; }

html[data-theme="dark"] .trash-form { background: #131c2e; }
html[data-theme="dark"] .trash-post { background: #131c2e; }

/* ---- Trash talk threading ---- */

.trash-reply {
  margin-left: 22px;
  border-left: 3px solid var(--accent-2);
}

.trash-reply-btn {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.trash-reply-btn:hover { text-decoration: underline; }

.trash-replying-bar {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 2px 0;
}

.trash-replying-bar a { color: var(--accent); text-decoration: none; margin-left: 6px; }

.ticker-trash { cursor: pointer; }
.ticker-trash:hover .ticker-hl { text-decoration: underline; }
.ticker-reply-hint { color: rgba(255,255,255,0.4); font-size: 11px; }

/* ---- Trash talk reactions ---- */

.trash-react-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.trash-react {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}

.trash-react:hover { border-color: var(--accent-2); transform: scale(1.08); }

.trash-react-zero { opacity: 0.45; }
.trash-react-zero:hover { opacity: 1; }

.trash-react-mine {
  background: rgba(76,196,217,0.15);
  border-color: var(--accent-2);
  opacity: 1;
}

.trash-react-count {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
