/* ============================================================
   TipsHQ WC2026 — Design System (Light Theme)
   Brand: #0064B4  Navy: #0D1C38  Gold: #F5A623
   Bootstrap 4 is loaded before this file — overrides below.
   ============================================================ */

/* ── Bootstrap resets ────────────────────────────────────── */
/* Keep Bootstrap's box-model and grid but restore our design */
a { color: var(--brand); }
a:hover { color: var(--brand-dark); text-decoration: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--text); }
.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge { font-size: 12px; }
table { border-collapse: collapse; }
.table th { background: var(--navy); color: #fff; }
.table-striped tbody tr:nth-of-type(odd) { background: var(--bg); }
.table-hover tbody tr:hover { background: var(--brand-light); }

:root {
  --brand:        #0064B4;
  --brand-dark:   #004f8f;
  --brand-light:  #e6f0fa;
  --brand-mid:    #b8d4f0;
  --gold:         #F5A623;
  --gold-dark:    #d48a0a;
  --gold-pale:    #fef6e8;
  --green:        #1B9A4C;
  --green-pale:   #e7f6ee;
  --red:          #D93025;
  --red-pale:     #fdecea;
  --navy:         #0D1C38;
  --text:         #1A2235;
  --text2:        #3D4E68;
  --muted:        #7A8FA8;
  --border:       #E2E8F0;
  --border-strong:#C8D5E3;
  --bg:           #F5F7FA;
  --bg2:          #EEF2F7;
  --white:        #FFFFFF;
  --font-main:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-cond:    'Arial Narrow', 'Helvetica Neue Condensed', 'Roboto Condensed', Impact, Arial, sans-serif;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --shadow-md:    0 4px 20px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP NAV ─────────────────────────────────────────────── */
.topnav {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 14px rgba(0,0,0,.28);
}
.topnav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100px;
  gap: 0;
}
.nav-logo {
  margin-right: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-logo img { height: 55px; display: block; }

/* Collapsible wrapper holds both the links and the right-side actions */
.nav-collapse {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  order: 1;          /* desktop: links sit right after the logo */
}
/* On desktop the always-visible chip sits to the right of the links */
.nav-user-chip-bar { order: 2; }
/* Hamburger toggle — hidden on desktop, shown on mobile via breakpoint */
.nav-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* The chip lives in the top bar at all widths. */
.nav-user-chip-bar {
  flex-shrink: 0;
}
.nav-flag {
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  color: var(--brand);
  margin-left: 15px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 6px 13px;
  border-radius: 6px;
  transition: all .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(150,150,150,.55); }
.nav-links a.active { color: #fff; background: rgba(0,100,180,.55); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}
.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.nav-username {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-nav-out {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 5px;
  border: var(--brand);
  background: var(--brand);
  transition: all .15s;
}
.btn-nav-out:hover { border: 1px solid var(--brand); background: #fff; }
.btn-nav-login {
  color: var(--brand);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.22);
  transition: all .15s;
}
.btn-nav-login:hover { background: var(--brand); color: #fff; }
.btn-nav-join {
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  transition: background .15s;
}
.btn-nav-join:hover { background: var(--gold-dark); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.page-wrap { flex: 1; padding: 32px 0 48px; }
.container  { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3     { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4     { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.group-table {display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:18px; margin-top: 40px;}
@media (max-width: 576px) { .group-table {display:grid;grid-template-columns:repeat(auto-fill,minmax(304px,1fr));gap:18px; margin-top: 40px;}}

/* ── SECTION HEADERS ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-mid), transparent);
  border-radius: 2px;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 16px 20px; }
.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--brand-light);
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a72 55%, #0064B4 100%);
  /* background: url('bground.png') center center/cover no-repeat #fff!important; */
  padding: 52px 20px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero > * { position: relative; }
.hero-title {
  font-family: var(--font-cond);
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.hero-title span { color: var(--gold); }
.hero-subtitle {
  color: rgba(255,255,255,.6);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 28px;
}
.countdown-wrap {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 14px 24px;
  margin-bottom: 8px;
}
.countdown-unit { text-align: center; padding: 0 10px; }
.countdown-num {
  display: block;
  font-family: var(--font-cond);
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  min-width: 56px;
}
.countdown-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary  { background: var(--brand); color: #fff; }
.btn-primary:hover  { background: var(--brand-dark); }
.btn-secondary { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-secondary:hover { background: rgba(255,255,255,.2); }
.btn-gold  { background: var(--gold); color: var(--navy); }
.btn-gold:hover  { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm  { padding: 7px 14px; font-size: 13px; border-radius: 6px; }
.btn-full { width: 100%; }
.btn.pulse { animation: btnpulse 2s ease-in-out infinite; }
@keyframes btnpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,166,35,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(245,166,35,0); }
}

/* ── MATCH CARDS ─────────────────────────────────────────── */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.match-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s;
}
.match-card:hover { box-shadow: var(--shadow-md); }
.match-card.predicted { border-left: 3px solid var(--brand); }
.match-card.completed { background: var(--bg); }
.match-card.completed { opacity: 0.85; }

.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.match-group-badge {
  background: var(--brand-light);
  color: var(--brand);
  font-family: var(--font-cond);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .3px;
}
.match-stage-badge {
  background: var(--gold-pale);
  color: var(--gold-dark);
  font-family: var(--font-cond);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.match-date-text { font-size: 12px; color: var(--muted); font-weight: 500; }
.points-badge {
  margin-left: auto;
  font-family: var(--font-cond);
  font-size: 16px;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 20px;
}
.points-badge.pts-5  { background: var(--green-pale); color: var(--green); }
.points-badge.pts-1  { background: var(--brand-light); color: var(--brand); }
.points-badge.pts-2  { background: var(--gold-pale); color: var(--gold-dark); }
.points-badge.pts-20 { background: var(--gold-pale); color: var(--gold-dark); font-weight: 900; }
.points-badge.pts-2 { background: var(--brand-light); color: var(--brand); }
.points-badge.pts-1 { background: var(--brand-light); color: var(--brand); }
.points-badge.pts-0 { background: var(--red-pale); color: var(--red); }

.match-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.team-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.team-side.away { align-items: center; }

/* Selectable team cards (KO picks — click directly on the team) */
.team-side.selectable {
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 8px 6px;
  transition: background 0.15s, border-color 0.15s;
}
.team-side.selectable:hover {
  background: var(--brand-light);
  border-color: var(--brand-mid);
}
.team-side.selectable.selected {
  background: var(--brand-light);
  border-color: var(--brand);
}
.team-side.selectable.selected .team-name { color: var(--brand); font-weight: 800; }
/* Card-level "needs your pick" pulse — strict: shown only when both sides
   are known. Sits on .match-teams so the whole matchup glows, not one half. */
.match-teams.needs-pick {
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--gold);
  animation: pulse-ko 2s infinite;
}
.ko-pick-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  padding-bottom: 2px;
}
.team-flag { width: 35px; border-radius: 4px; display: block; flex-shrink: 0; overflow: hidden; }
.team-flag img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.btn-flag { width: 28px; height: 19px; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 5px; flex-shrink: 0; overflow: hidden; }
.btn-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}
.match-vs {
  font-family: var(--font-cond);
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  padding: 0 6px;
}
.match-score-display {
  font-family: var(--font-cond);
  font-size: 28px;
  font-weight: 900;
  color: var(--brand);
  flex-shrink: 0;
  padding: 0 8px;
}

/* ── TIP INPUTS ──────────────────────────────────────────── */
.score-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.score-input {
  width: 54px;
  height: 48px;
  text-align: center;
  font-family: var(--font-cond);
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-light);
  border: 2px solid var(--brand-mid);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }
/* Unsaved / incomplete prediction — red tint until a score is saved */
.score-input.unsaved {
  background: #dc35450d;
  border: 2px solid #dc3545ad;
}
.score-input:focus { border-color: var(--brand); background: #fff; }
/* Focus always wins over the unsaved red, so typing feels clean */
.score-input.unsaved:focus { border-color: var(--brand); background: #fff; }
.score-dash {
  font-family: var(--font-cond);
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
}
.winner-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.winner-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
  width: 100%;
  text-align: left;
}
.winner-btn:hover { border-color: var(--brand); background: var(--brand-light); }
.winner-btn.selected { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.btn-flag { font-size: 20px; }

.save-status {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  transition: opacity .3s;
}
.save-status.saving { color: var(--muted); }
.save-status.saved  { color: var(--green); background: var(--green-pale); }
.save-status.error  { color: var(--red);   background: var(--red-pale); }

/* ── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  background: transparent;
  transition: all .15s;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--brand); background: var(--brand-light); }
.tab-btn.active {
  color: var(--brand);
  background: var(--white);
  border-color: var(--border);
  border-bottom-color: var(--white);
}

/* ── DATE DIVIDER ────────────────────────────────────────── */
.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
}
.date-divider-line { flex: 1; height: 1px; background: var(--border); }
.date-divider-text {
  font-family: var(--font-cond);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── LEADERBOARD ─────────────────────────────────────────── */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row:hover { background: var(--bg); }
.leaderboard-row.is-me { background: var(--brand-light); }
.lb-rank {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 900;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}
.lb-rank.rank-1 { color: #F5A623; }
.lb-rank.rank-2 { color: #8897A8; }
.lb-rank.rank-3 { color: #C07040; }
.lb-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-size: 12px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.lb-name { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-stat { text-align: center; min-width: 44px; }
.lb-stat span { display: block; font-family: var(--font-cond); font-size: 18px; font-weight: 800; color: var(--brand); }
.lb-stat { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.lb-pts {
  font-family: var(--font-cond);
  font-size: 24px;
  font-weight: 900;
  color: var(--brand);
  min-width: 48px;
  text-align: right;
}

/* ── GROUP STANDINGS ─────────────────────────────────────── */
.group-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.group-hd {
  background: var(--brand);
  color: #fff;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.group-letter { font-family: var(--font-cond); font-size: 18px; font-weight: 900; }
.standings-table { width: 100%; border-collapse: collapse; }
.standings-table th {
  background: var(--brand-light);
  color: var(--brand);
  font-family: var(--font-cond);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 7px 10px;
  text-align: center;
  border-bottom: 1px solid var(--brand-mid);
}
.standings-table th:first-child { text-align: left; }
.standings-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: center; }
.standings-table td:first-child { text-align: left; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr:hover td { background: var(--bg); }
.standings-table tr.qualify td { border-left: 3px solid var(--green); }
.st-team { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.st-flag { height: 25px; border-radius: 2px; display: inline-block; vertical-align: middle; overflow: hidden; }
.st-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-pts { font-family: var(--font-cond); font-size: 17px; font-weight: 900; color: var(--brand); }
.st-pts { font-family: var(--font-cond); font-weight: 900; font-size: 16px; color: var(--brand); }

/* ── FORMS ───────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 440px;
  margin: 0 auto;
}
.form-title {
  font-family: var(--font-cond);
  font-size: 28px;
  font-weight: 900;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.form-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,100,180,.12); }
.form-input::placeholder { color: var(--muted); }
.avatar-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.avatar-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all .15s;
}
.avatar-swatch.selected, .avatar-swatch:hover { border-color: var(--text); transform: scale(1.1); }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  border-left: 4px solid;
}
.alert-info    { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand); }
.alert-success { background: var(--green-pale);  color: #145c30;           border-color: var(--green); }
.alert-error   { background: var(--red-pale);    color: #8b1c16;           border-color: var(--red); }
.alert-gold    { background: var(--gold-pale);   color: #7a4a00;           border-color: var(--gold); }

/* ── SCORING PILLS ───────────────────────────────────────── */
.score-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.score-pill.exact  { background: var(--green-pale); }
.score-pill.result { background: var(--brand-light); }
.score-pill.ko     { background: var(--gold-pale); }
.score-pill-label  { font-size: 13px; font-weight: 600; }
.score-pill.exact  .score-pill-label  { color: var(--green); }
.score-pill.result .score-pill-label  { color: var(--brand); }
.score-pill.ko     .score-pill-label  { color: var(--gold-dark); }
.score-pill-pts {
  font-family: var(--font-cond);
  font-size: 22px;
  font-weight: 900;
}
.score-pill.exact  .score-pill-pts { color: var(--green); }
.score-pill.result .score-pill-pts { color: var(--brand); }
.score-pill.ko     .score-pill-pts { color: var(--gold-dark); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.45);
  padding: 28px 20px;
  font-size: 12px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-brand { color: rgba(255,255,255,.7); font-weight: 600; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.45); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: rgba(255,255,255,.8); }
.footer-legal a { color: rgba(255,255,255,.45); text-decoration: underline; }

/* ── UTILITIES ───────────────────────────────────────────── */
.text-brand  { color: var(--brand); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
.fw-bold     { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-title { font-size: 44px; }
  .countdown-num { font-size: 32px; min-width: 40px; }
  .countdown-unit { padding: 0 6px; }
  .matches-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE NAV ──────────────────────────────────────── */
/* Tablet / narrow desktop: tighten link spacing before collapse.
   NOTE: this block is intentionally ABOVE the 860px block so that
   when both match (width <= 860), the mobile rules win on source order. */
@media (max-width: 1000px) and (min-width: 861px) {
  .nav-links a { margin-left: 6px; padding: 6px 9px; font-size: 12px; }
  .nav-username { max-width: 90px; }
}

/* Mobile: single breakpoint, collapses everything into the drawer */
@media (max-width: 860px) {
  .topnav-inner { height: 70px; padding: 0 16px; position: relative; }
  .nav-logo { margin-right: 0; }
  .nav-logo img { height: 42px; }

  /* Chip stays in the bar, pushed to the right; hamburger sits after it */
  .nav-user-chip-bar { order: 0; margin-left: auto; margin-right: 8px; }
  .nav-toggle { order: 0; margin-left: 0; }

  /* Hamburger shows */
  .nav-toggle { display: flex; }

  /* Collapsible drawer drops below the bar */
  .nav-collapse {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
    border-top: 1px solid rgba(0,0,0,.08);
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    opacity: 0;
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
  }
  .nav-collapse.open {
    max-height: 85vh;
    overflow-y: auto;
    opacity: 1;
    padding: 8px 16px 16px;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    flex: none;
    gap: 2px;
    width: 100%;
  }
  .nav-links a {
    margin-left: 0;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
  }

  .nav-right {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.08);
    gap: 10px;
    width: 100%;
  }
  .btn-nav-out, .btn-nav-login, .btn-nav-join {
    text-align: center;
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* ── ACTUAL MATCH BANNER (KO Round 32, post-group) ──────── */
.ko-actual-header {
  background: linear-gradient(90deg, #1a2332 0%, #243044 100%);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -1px -1px 0;
}
.ko-actual-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 5px var(--green); flex-shrink: 0;
}
.ko-actual-label { color: #fff; }
.ko-actual-sub   { opacity: .5; }

.ko-section-divider {
  height: 1px; background: var(--border); margin: 6px 0;
}

.ko-prev-pick {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px; border-radius: 7px; margin: 0 0 4px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.ko-prev-pick.valid   { background: var(--green-pale); border-color: var(--green); color: #145c30; }
.ko-prev-pick.invalid { background: var(--gold-pale);  border-color: var(--gold);  color: #7a4a00; }
.ko-prev-pick.none    { background: var(--bg);         border-color: var(--border); color: var(--muted); }
.ko-pick-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* Visual separation between team cards and prediction status */
.ko-pred-section {
  background: var(--bg2);
  border-top: 2px solid var(--border);
  margin: 8px -1px -1px;
  padding: 10px 12px 8px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.ko-pick-subtext {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.ko-team-seed-btn {
  display: block; font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; opacity: .8;
}
.winner-btn.selected .ko-team-seed-btn { color: var(--brand); opacity: 1; }

.winner-btn.needs-pick {
  border-color: var(--gold) !important;
  animation: pulse-ko 2s infinite;
}
@keyframes pulse-ko {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,166,35,.4); }
  50%      { box-shadow: 0 0 0 4px rgba(245,166,35,.15); }
}
