/* ================================================================
   TIPOFF — Design System v2.0
   Colours: Navy #00385D (primary) · Red #E50022 (accent) · Grey #ABABAB
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a  { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
select, input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:       #00385D;
  --primary-dark:  #001E30;
  --primary-light: #004E7A;
  --accent:        #E50022;
  --accent-dark:   #B8001A;
  --accent-light:  #FEEAED;

  /* Neutrals */
  --bg:      #f4f6f9;
  --card:    #ffffff;
  --text:    #1e293b;
  --text2:   #64748b;
  --text3:   #ABABAB;
  --border:  #e2e8f0;
  --border2: #cbd5e1;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Misc */
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Legacy compat (used by game-card / tipping code) */
  --tip-blue:   var(--primary);
  --tip-light:  var(--accent-light);
  --espn-dark:  var(--primary-dark);
  --espn-red:   var(--accent);
  --green:      var(--success);
  --dark-green: #059669;
  --red:        var(--danger);
  --orange:     #f97316;
  --gold:       #f59e0b;
  --gray-light: #f8fafc;
  --gray-border: var(--border);
  --gray-text:  var(--text2);
}

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { color: var(--text2); line-height: 1.65; }

/* ── Containers ───────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* ── Site Header ──────────────────────────────────────────────── */
/* Keep legacy class name AND new for backward compat */
.site-header, .espn-header {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.topbar, .espn-topbar {
  /* 3-col grid: nav links | centred logo | nav actions */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 0 20px;
  height: 64px;        /* slightly taller for the bigger logo */
  max-width: 1280px;
  margin: 0 auto;
}

/* Logo — always in the centre column of the header grid */
.logo, .espn-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
  text-decoration: none;
  margin: 0;
}

/* Image logo */
.site-logo-img {
  height: 76px;
  width: auto;
  max-width: 270px;
  display: block;
  object-fit: contain;
  /* Layered white drop-shadows trace the logo's own contour —
     not a rectangle, not a circle, just a soft white outline
     that follows whatever shape the image actually has */
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 3px #fff)
    drop-shadow(0 0 5px rgba(255,255,255,0.55));
}

/* Legacy text-only logo (kept for backward compat) */
.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-text { line-height: 1.15; }

.logo-name, .espn-logo-text {
  display: block;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  font-style: normal;
}

.logo-tag, .espn-logo-ft {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Auth card logo image */
.auth-logo-img {
  height: 150px;
  width: auto;
  max-width: 300px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Desktop Nav — lives in the left column of the header grid */
.main-nav, .espn-nav {
  display: flex;
  align-items: center;
  list-style: none;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin: 0;
  gap: 2px;
}

.nav-link, .main-nav a, .espn-nav > li > a, .espn-nav > li > button {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover, .main-nav a:hover, .espn-nav > li > a:hover, .espn-nav > li > button:hover,
.nav-link.active, .main-nav a.active, .espn-nav > li.active > a, .espn-nav > li.active > button {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.nav-link.active, .espn-nav > li.active > a { border-bottom: 3px solid var(--accent); }

/* Dropdown nav */
.espn-nav li { position: relative; }
.nav-dropdown-trigger { background: none; border: none; }

.chevron { font-size: 10px; opacity: 0.7; transition: transform 0.2s; }
.espn-nav li.open .chevron { transform: rotate(180deg); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  background: #fff;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
/* Open nav dropdowns on hover (desktop / hover-capable devices) */
@media (hover: hover) {
  .espn-nav li:hover > .dropdown-menu,
  .main-nav li:hover  > .dropdown-menu { display: block; }
}

.dropdown-section { padding: 6px 0; }
.dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  padding: 6px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  transition: background 0.1s;
  height: auto;
}
.dropdown-menu a:hover  { background: var(--accent-light); color: var(--primary); }
.dropdown-menu a.active { color: var(--primary); font-weight: 700; }

/* Nav actions — lives in the right column of the header grid */
.nav-actions, .espn-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin: 0;
}

.espn-nav-actions a {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0 8px;
  height: 56px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.espn-nav-actions a:hover { color: #fff; }

/* Hamburger — right column on mobile (replaces nav-actions) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ── Mobile Nav Drawer ────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-dark);
  z-index: 999;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-nav.open { transform: translateX(0); }

.mobile-nav ul { list-style: none; padding: 8px 0; }
.mobile-nav ul li a,
.mobile-nav ul li button {
  display: block;
  color: rgba(255,255,255,0.8);
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.mobile-nav ul li a:hover,
.mobile-nav ul li button:hover { background: rgba(255,255,255,0.07); color: #fff; }

.mobile-nav .sub-items {
  padding-left: 0;
  background: rgba(0,0,0,0.25);
}
.mobile-nav .sub-items a {
  font-size: 13px;
  text-transform: none;
  padding: 10px 28px;
  border-bottom-color: rgba(255,255,255,0.04);
}
.mobile-nav-mobile-toggle { display: none; }
.mobile-sports-toggle { background: none !important; }
.hidden { display: none !important; }

/* ── Sub-Nav / Tabs ───────────────────────────────────────────── */
.sub-nav {
  background: #fff;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.sub-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-nav-inner::-webkit-scrollbar { display: none; }

.sub-nav a, .tab-link {
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  padding: 13px 18px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.sub-nav a:hover, .tab-link:hover { color: var(--primary); }
.sub-nav a.active, .tab-link.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  line-height: 1;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-accent    { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover  { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost     { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover   { background: rgba(255,255,255,0.2); }

.btn-ghost-dark { background: transparent; color: var(--text2); border-color: var(--border2); }
.btn-ghost-dark:hover { background: var(--bg); color: var(--text); }

.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #dc2626; border-color: #dc2626; }

.btn-sm  { padding: 7px 14px; font-size: 12px; }
.btn-lg  { padding: 14px 28px; font-size: 16px; }
.btn-xl  { padding: 16px 36px; font-size: 17px; font-weight: 700; border-radius: var(--radius-lg); }
.btn-w   { width: 100%; }

/* Legacy compat */
.btn-secondary { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,114,0.12);
}
.form-input::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 500;
}
.form-help {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-top: 5px;
}
.form-input.error { border-color: var(--danger); }
.form-input.success { border-color: var(--success); }

/* Password input wrapper */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.input-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  background: none;
  border: none;
}
.input-toggle-btn:hover { color: var(--text2); }

/* Checkbox & Radio */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.check-row input[type=checkbox],
.check-row input[type=radio] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.check-label {
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  line-height: 1.45;
}
.check-label strong { color: var(--text); font-weight: 600; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Auth Pages ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px 36px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-mark {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}
.auth-logo-name { font-size: 22px; font-weight: 900; color: var(--primary); }
.auth-logo-tag  { font-size: 11px; color: var(--text3); font-weight: 500; }

.auth-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; text-align: center; }
.auth-sub   { font-size: 14px; color: var(--text2); text-align: center; margin-bottom: 28px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text3);
  font-size: 12px;
  font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: 22px;
}
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Generic Cards ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-body { padding: 16px; }
.card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
}

/* Legacy sidebar card compat */
.sidebar-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.sidebar-card-header { background: var(--primary-dark); color: #fff; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-card-title  { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-card-sub    { display: flex; gap: 8px; align-items: center; }
.sidebar-select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 11px;
  padding: 3px 6px; border-radius: 4px;
  -webkit-appearance: none; appearance: none;
}

/* ── Competition Cards (new PRD design) ───────────────────────── */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.comp-grid-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.comp-grid-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.comp-grid-card-top {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.comp-grid-card-top::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.comp-grid-sport-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.comp-grid-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 4px;
}

.comp-grid-organiser {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.comp-grid-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comp-grid-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}
.comp-stat-item { text-align: center; flex: 1; }
.comp-stat-num  { font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1; }
.comp-stat-lbl  { font-size: 11px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }

.comp-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Legacy comp-card (sidebar list style) */
.comp-card { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background 0.1s; }
.comp-card:hover { background: #fafbfc; }
.comp-card:last-child { border-bottom: none; }
.comp-name { font-size: 13px; font-weight: 600; }
.comp-meta { font-size: 11px; color: var(--text2); margin-top: 1px; }
.comp-rank { font-size: 12px; font-weight: 700; color: var(--primary); }
.comp-join-btn { font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 4px; transition: background 0.15s; }
.comp-join-btn:hover { background: var(--primary-dark); }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-active   { background: #d1fae5; color: #065f46; }
.status-upcoming { background: #fef3c7; color: #92400e; }
.status-draft    { background: #f1f5f9; color: var(--text2); }
.status-completed { background: #e0e7ff; color: #3730a3; }
.status-archived { background: #fee2e2; color: #991b1b; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Page Layout ──────────────────────────────────────────────── */
.page-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.page-layout.no-sidebar { grid-template-columns: 1fr; }

.content-area { min-width: 0; }
.sidebar-area { position: sticky; top: 76px; }

.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}

.main-content { min-width: 0; }
.sidebar { position: sticky; top: 76px; }

/* Page header */
.page-title-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 24px;
}
.page-title-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title-bar h1 { font-size: 22px; color: var(--primary); }
.page-breadcrumb { font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.page-breadcrumb a { color: var(--text2); }
.page-breadcrumb a:hover { color: var(--primary); }
.page-breadcrumb span { margin: 0 6px; }

/* ── Section Headers ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.section-title span { color: var(--accent); }
.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}
.section-link:hover { text-decoration: underline; }

/* ── Dashboard Widgets ────────────────────────────────────────── */
.widget {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.widget-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.widget-body { padding: 18px; }

/* Stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}
.stat-card-num { font-size: 28px; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-card-label { font-size: 12px; color: var(--text2); font-weight: 500; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card-change { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 6px; }
.stat-card-change.down { color: var(--danger); }

/* Countdown timer */
.countdown-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}
.countdown-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.75; margin-bottom: 8px; }
.countdown-digits {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 900;
}
.countdown-unit { text-align: center; }
.countdown-unit span { font-size: 10px; font-weight: 500; opacity: 0.7; display: block; text-transform: uppercase; }

/* ── Tipping / Game Cards ─────────────────────────────────────── */
/* (Kept from v1 with updated colour vars) */

.date-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 12px 2px 6px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 8px;
  margin-top: 16px;
}
.date-header:first-of-type { margin-top: 0; }

.game-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.game-card:hover { box-shadow: var(--shadow-md); }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.game-meta { font-size: 11px; color: var(--text2); font-weight: 500; }
.game-meta span { margin-right: 8px; }
.game-meta .dot { color: var(--text3); }

.tip-entered-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--dark-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.tip-entered-badge::before { content: '✓'; font-weight: 900; }

.your-tip-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}

.game-body { padding: 12px 14px; }

.match-row { display: flex; align-items: center; gap: 8px; }

.team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  padding: 10px 6px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
/* Selected team: the whole side fills with the theme navy */
.team-side.selected {
  background: var(--primary);
  border-color: var(--primary-dark);
}
.team-side.selected .team-name-main { color: #fff; }
.team-side.selected .team-name-box {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}
.team-side.selected .team-odds {
  background: #fff;
  color: var(--primary);
}

.team-logo-wrap { position: relative; }
.team-logo {
  width: 46px; height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
.team-name-main {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-align: center; line-height: 1.2;
}
.team-name-box {
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.team-odds {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 3px;
}

.radio-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2.5px solid #9ca3af;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0; background: #fff;
  margin-top: 18px;
}
.radio-btn.selected { border-color: var(--accent); background: var(--accent); }
.radio-btn.selected::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%; background: #fff;
}

/* Tip percentage bar */
.tip-bar-section { padding: 6px 14px 2px; }
.tip-pct-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tip-pct-home { font-size: 14px; font-weight: 700; color: var(--primary); }
.tip-pct-away { font-size: 14px; font-weight: 700; color: var(--danger); }
.tip-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #eee; margin-bottom: 6px; }
.tip-bar-home { background: var(--primary); transition: width 0.4s; }
.tip-bar-away { background: var(--danger); transition: width 0.4s; }

/* Form guide */
.form-guide-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 14px;
  font-size: 11px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.5px;
  cursor: pointer; border-top: 1px solid var(--border);
  background: #fafbfc; transition: background 0.15s; user-select: none;
}
.form-guide-toggle:hover { background: var(--accent-light); }
.form-guide-toggle .chevron-icon { font-size: 10px; transition: transform 0.2s; }
.form-guide-toggle.open .chevron-icon { transform: rotate(180deg); }

.form-guide-panel { display: none; border-top: 1px solid var(--border); padding: 12px 14px; background: #fafbfc; }
.form-guide-panel.open { display: block; }

.fg-section-title {
  font-size: 11px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px; margin-top: 12px;
}
.fg-section-title:first-child { margin-top: 0; }

.fg-ladder { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 4px; }
.fg-ladder th { font-size: 10px; color: var(--text2); font-weight: 600; text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--border); text-transform: uppercase; white-space: nowrap; }
.fg-ladder th:first-child, .fg-ladder th:nth-child(2) { text-align: left; }
.fg-ladder td { padding: 4px 6px; text-align: right; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.fg-ladder td:first-child, .fg-ladder td:nth-child(2) { text-align: left; }
.fg-ladder tr:last-child td { border-bottom: none; }

.ladder-rank { font-weight: 700; color: var(--text2); font-size: 11px; }
.ladder-team-cell { display: flex; align-items: center; gap: 5px; }
.ladder-icon { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.ladder-team-name { font-weight: 600; }

/* Streak badges */
.streak-wrap { display: flex; gap: 2px; justify-content: flex-end; }
.streak-badge { width: 16px; height: 16px; border-radius: 3px; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.streak-badge.W { background: var(--dark-green); }
.streak-badge.L { background: var(--danger); }
.streak-badge.D { background: var(--warning); }
/* Compact streak badges so all 5 fit in the narrow tipping-page sidebar ladder */
.sidebar-ladder-mini .streak-wrap { gap: 1.5px; justify-content: flex-start; }
.sidebar-ladder-mini .streak-badge { width: 13px; height: 13px; font-size: 8px; border-radius: 2px; }

.result-badge { width: 16px; height: 16px; border-radius: 3px; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.result-badge.W { background: var(--dark-green); }
.result-badge.L { background: var(--danger); }

/* H2H */
.h2h-header { display: grid; grid-template-columns: 80px 1fr 80px; font-size: 11px; font-weight: 700; color: var(--text); padding: 4px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.h2h-header span:last-child { text-align: right; }
.h2h-row { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 4px 0; border-bottom: 1px solid #f0f2f5; font-size: 11px; }
.h2h-row:last-child { border-bottom: none; }
.h2h-result { display: flex; align-items: center; gap: 4px; }
.h2h-score { font-size: 11px; color: var(--text); text-align: center; }
.h2h-season { font-size: 10px; color: var(--text2); font-weight: 600; }
.h2h-right-result { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }

/* Byes */
.byes-section { background: var(--card); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); margin-top: 16px; margin-bottom: 10px; }
.byes-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.byes-teams { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.bye-team { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bye-logo { width: 36px; height: 36px; border-radius: 50%; }
.bye-name { font-size: 11px; font-weight: 600; color: var(--text); }

/* Submit / Options row */
.tips-footer-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  /* Float at the bottom of the screen while the games list scrolls, so the
     Submit button is always reachable; settles into place at the page end. */
  position: sticky;
  bottom: 10px;
  z-index: 40;
  border: 1px solid var(--border);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.15);
}
.fav-team-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fav-team-label { font-size: 13px; font-weight: 600; color: var(--text); }
.fav-team-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--border2);
  border-radius: 6px;
  font-size: 13px; color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer; min-width: 200px;
}
.fav-team-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,79,114,0.12); }

.submit-tips-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 16px; font-weight: 800;
  padding: 14px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.1s;
}
.submit-tips-btn:hover { background: var(--accent-dark); }
.submit-tips-btn:active { transform: scale(0.99); }
.submit-tips-btn:disabled { background: #9ca3af; cursor: not-allowed; }

.tip-options-row { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); margin-top: 8px; }
.show-tip-info { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.joker-btn { display: flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--primary); color: var(--primary); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; transition: background 0.15s, color 0.15s; }
.joker-btn:hover { background: var(--primary); color: #fff; }
.joker-icon { font-size: 16px; }

/* Round nav */
.round-nav { background: var(--card); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); margin-bottom: 12px; }
.round-nav-arrow { color: var(--primary); font-size: 22px; font-weight: 700; padding: 4px 12px; border-radius: 4px; transition: background 0.15s; line-height: 1; }
.round-nav-arrow:hover { background: var(--accent-light); }
.round-nav-arrow.disabled { color: var(--text3); pointer-events: none; }
.round-nav-info { text-align: center; flex: 1; }
.round-nav-title { font-size: 17px; font-weight: 700; color: var(--text); }
.round-nav-sport { font-size: 12px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Round progress */
.round-progress-bar { background: var(--card); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.round-progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.round-progress-label { font-size: 12px; color: var(--text2); font-weight: 600; }
.round-progress-count { font-size: 12px; font-weight: 700; color: var(--primary); }
.progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }

/* Last round stats */
.last-round-bar { background: var(--card); border-radius: var(--radius); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.last-round-score { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.last-round-label { color: var(--text2); font-weight: 500; }
.last-round-val { color: var(--text); font-weight: 700; font-size: 15px; }
.arrow-up { color: var(--success); font-size: 12px; }
.arrow-down { color: var(--danger); font-size: 12px; }
.rank-pct { color: var(--text2); font-size: 12px; }

/* Sport badge */
.sport-badge { background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.3px; }

/* ── Ladder / Tables ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  background: var(--gray-light);
}
.data-table th.text-right, .data-table td.text-right { text-align: right; }
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Sidebar ladder */
.sidebar-ladder { width: 100%; border-collapse: collapse; font-size: 11px; }
.sidebar-ladder th { font-size: 10px; color: var(--text2); font-weight: 600; text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--border); text-transform: uppercase; white-space: nowrap; background: #f8fafc; }
.sidebar-ladder th:nth-child(1), .sidebar-ladder th:nth-child(2) { text-align: left; }
.sidebar-ladder td { padding: 5px 8px; text-align: right; border-bottom: 1px solid #f0f2f5; white-space: nowrap; vertical-align: middle; }
.sidebar-ladder td:nth-child(1), .sidebar-ladder td:nth-child(2) { text-align: left; }
.sidebar-ladder tr:last-child td { border-bottom: none; }
.sidebar-ladder tr:hover td { background: #fafbfc; }

.sidebar-rank { font-weight: 700; color: var(--text2); font-size: 11px; width: 20px; }
.sidebar-team-cell { display: flex; align-items: center; gap: 5px; min-width: 90px; }
.sidebar-team-logo { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.sidebar-team-short { font-weight: 700; font-size: 11px; }
.sidebar-pts { font-weight: 700; }
.top-8-divider td { border-bottom: 2px solid var(--primary) !important; }

/* Odds badge */
.sidebar-odds-badge { background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; white-space: nowrap; }

/* ── Ads ──────────────────────────────────────────────────────── */
/* Ad containers — layout only; content injected by JS */
.ad-top-banner { width: 100%; min-height: 90px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.ad-slot-sidebar { margin-bottom: 14px; }

/* Preserved ad component styles */
.pointsbet-ad { border-radius: var(--radius); overflow: hidden; margin: 10px 0; box-shadow: var(--shadow); }
.pb-header { background: #000; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.pb-logo { font-size: 18px; font-weight: 900; font-style: italic; color: #fff; }
.pb-logo span { color: #e3111b; }
.pb-disclaimer { font-size: 10px; color: #aaa; text-align: right; line-height: 1.3; }
.pb-body { background: #1a1a1a; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0; }
.pb-col { padding: 10px 14px; border-right: 1px solid #333; }
.pb-col:last-child { border-right: none; }
.pb-col-label { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 3px; }
.pb-col-val { font-size: 16px; font-weight: 700; color: #fff; }
.pb-bet-btn { background: #e3111b; color: #fff; font-size: 14px; font-weight: 900; padding: 0 20px; text-transform: uppercase; letter-spacing: 0.5px; transition: background 0.15s; min-width: 100px; display: flex; align-items: center; justify-content: center; }
.pb-bet-btn:hover { background: #c00; }
.pb-footer { background: #1a1a1a; padding: 6px 14px; font-size: 10px; color: #888; text-align: center; border-top: 1px solid #333; }
.pb-submit-mobile { display: none; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  pointer-events: auto;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--primary); }
.toast.warning { border-left: 4px solid var(--warning); }
@keyframes toastIn  { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* Legacy compat */
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { transform: scale(0.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { color: rgba(255,255,255,0.65); font-size: 22px; line-height: 1; padding: 4px 6px; transition: color 0.15s; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; background: var(--gray-light); display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }

/* ── Loading States ───────────────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}
.loading-overlay.show { display: flex; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e5e7eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── News / Content ───────────────────────────────────────────── */
.news-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.news-item:hover { background: #fafbfc; }
.news-item:last-child { border-bottom: none; }
.news-headline { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 3px; }
.news-meta { font-size: 11px; color: var(--text2); }
.news-badge { display: inline-block; font-size: 10px; font-weight: 700; background: var(--danger); color: #fff; padding: 1px 5px; border-radius: 2px; text-transform: uppercase; margin-right: 4px; }

/* ── Tip Info Overlay ─────────────────────────────────────────── */
.tip-info-overlay { margin-top: 4px; padding: 6px 14px; background: #fffbeb; border-left: 3px solid var(--warning); font-size: 11px; color: #6b5300; }

/* ── Alert / Banner ───────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: #eff6ff; border-left: 4px solid var(--info); color: #1e40af; }
.alert-success { background: #ecfdf5; border-left: 4px solid var(--success); color: #065f46; }
.alert-warning { background: #fffbeb; border-left: 4px solid var(--warning); color: #92400e; }
.alert-danger  { background: #fef2f2; border-left: 4px solid var(--danger); color: #991b1b; }

/* ── Site Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 20px 28px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.footer-brand-name  { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 6px; }
.footer-brand-logo  { display: inline-block; margin-bottom: 12px; line-height: 0; }
.footer-brand-logo img {
  height: 190px;
  width: auto;
  max-width: 440px;
  display: block;
  object-fit: contain;
  /* Same white-contour outline as the header logo — layered white
     drop-shadows trace the logo's own shape, not a rectangle */
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 3px #fff)
    drop-shadow(0 0 5px rgba(255,255,255,0.55));
}
.footer-brand-tag   { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.footer-brand-desc  { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.5); }

.footer-col-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; }
.footer-col a    { display: block; font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.footer-copy { color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.45); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }

/* ── Utility ──────────────────────────────────────────────────── */
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.font-bold    { font-weight: 700; }
.font-heavy   { font-weight: 900; }
.text-green   { color: var(--success); }
.text-red     { color: var(--danger); }
.text-blue    { color: var(--primary); }
.text-teal    { color: var(--accent); }
.text-gray    { color: var(--text2); }
.text-small   { font-size: 12px; }
.text-muted   { color: var(--text3); }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-1 { flex: 1; }
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pb-submit-mobile { display: none; }

/* ── Empty States ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text2);
}
.empty-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.5; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-msg { font-size: 14px; color: var(--text2); margin-bottom: 20px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-wrapper  { grid-template-columns: 1fr; }
  .page-layout   { grid-template-columns: 1fr; padding: 16px; }
  .sidebar       { display: none; }
  .sidebar-area  { display: none; }
  .sidebar.show-mobile { display: block; }
  .footer-top    { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .main-nav, .espn-nav { display: none; }
  .nav-actions, .espn-nav-actions { display: none; }
  /* On mobile the grid is: [empty 1fr] | [logo auto] | [hamburger 1fr]
     so the logo stays centred and the hamburger sits on the right */
  .hamburger { display: flex; margin-left: 0; }
  .site-logo-img { height: 52px; }
  .mobile-nav { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .comp-grid  { grid-template-columns: 1fr; }
  .pb-body { grid-template-columns: 1fr 1fr 1fr; }
  .pb-bet-btn { display: none; }
  .pb-submit-mobile { display: block !important; }
  .team-logo { width: 38px; height: 38px; }
  .team-name-main { font-size: 12px; }
  .auth-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .page-wrapper { padding: 10px; gap: 10px; }
  .container, .container-sm { padding: 0 14px; }
  .topbar, .espn-topbar { padding: 0 14px; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stat-cards { grid-template-columns: 1fr; }
  .pb-body { grid-template-columns: 1fr 1fr; }
  .pb-col:nth-child(3) { display: none; }
}
