/* UTILITY CLASSES for consistent spacing and layout */
:root {
  --brand-blue: #0A1931;
  --brand-blue-rgb: 10, 25, 49;
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --menu-font: var(--font-sans);
  /* Keep primary-color in sync with brand */
  --primary-color: var(--brand-blue);
  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;
  /* Container system */
  --container-max: 1400px;
  --container-edge-gap: 20px;
  --container-padding-x: 2%;
  --container-width: min(var(--container-max), calc(100vw - var(--container-edge-gap)));
  /* Shared layout variables (migrated from overrides.css) */
  --section-side-gap: 60px;
  --section-max-width: 1200px;
  --section-inner-gutter: 1.5rem;
  --home-gap: 2rem;
  --ui-border: #E5E7EB;
  --leaders-arrow-width: 8px;
  --leaders-arrow-length: 12px;
  --leaders-arrow-thickness: 8px;
  --leaders-arrow-offset: 16px;
  --leader-portrait-width: clamp(165px, 45%, 240px);
  /* Mobile layout tuning */
  --gutter-mobile: 12px;
  --banner-height: var(--fs-top-banner-total-height);
  --banner-height-mobile: calc(var(--banner-height) * 1.3);
  --logo-size-mobile: clamp(28px, 8vw, 40px);
  --search-font-mobile: clamp(0.85rem, 3.2vw, 0.95rem);
  --search-placeholder-mobile: clamp(0.7rem, 3vw, 0.85rem);
  --bookmark-size-mobile: 36px;
  --bookmark-icon-mobile: 0.95rem;
  /* Shared top banner sizing (player/team/search) */
  --fs-top-banner-radius: 16px;
  --fs-top-banner-padding-top: 0.75rem;
  --fs-top-banner-padding-x: 2rem;
  --fs-top-banner-player-size: 17.9rem;
  --fs-top-banner-content-height: var(--fs-top-banner-player-size);
  --fs-top-banner-total-height: calc(var(--fs-top-banner-content-height) + var(--fs-top-banner-padding-top));
  --mobile-menu-vh: 100vh;
  --mobile-menu-bottom-gap: 0.9rem;
  --mobile-menu-bottom-gap: calc(0.9rem + env(safe-area-inset-bottom));
}

@supports (height: 100dvh) {
  :root {
    --mobile-menu-vh: 100dvh;
  }
}

/* Deferred home sections and carousel placeholders */
.home-deferred-placeholder {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.home-deferred-header {
  margin-bottom: 0.15rem;
}

.home-deferred-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.home-deferred-subtitle {
  margin: 0.35rem 0 0 0;
  color: #475569;
  font-size: 0.9rem;
}

.home-deferred-status,
.carousel-deferred-status {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  color: #1e40af;
  font-size: 0.86rem;
  font-weight: 600;
}

.home-deferred-status::before,
.carousel-deferred-status::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(30, 64, 175, 0.25);
  border-top-color: #1e40af;
  animation: homeDeferredSpin 0.9s linear infinite;
}

@keyframes homeDeferredSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  :root {
    --fs-top-banner-padding-top: 0.6rem;
    --fs-top-banner-padding-x: 1.5rem;
    --fs-top-banner-player-size: 11.2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --fs-top-banner-padding-top: 0.5rem;
    --fs-top-banner-padding-x: 1.25rem;
    --fs-top-banner-player-size: 10.1rem;
  }
}

@media (max-width: 820px) {
  :root {
    --container-edge-gap: 0px;
    --container-padding-x: var(--gutter-mobile);
    --fs-top-banner-total-height: calc((var(--fs-top-banner-content-height) + var(--fs-top-banner-padding-top)) * 1.4);
    --banner-height-mobile: var(--fs-top-banner-total-height);
    --bookmark-size-mobile: 30px;
    --bookmark-icon-mobile: 0.85rem;
    --search-placeholder-mobile: clamp(0.65rem, 2.8vw, 0.8rem);
    --search-h: 40px;
  }
}
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 2rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 1rem !important; }
.p-2 { padding: 2rem !important; }

.w-100 { width: 100% !important; }
.flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-start { align-items: flex-start !important; }
.justify-center { justify-content: center !important; }
.gap-1 { gap: 1rem !important; }
.gap-2 { gap: 2rem !important; }

/* Clearfix utility */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
}

body {
  font-family: var(--font-sans);
  background-color: #F4F4F4;
  color: #333;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

/* Horizontal scroll wrapper for wide tables */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.table-wrap > table,
.table-wrap .profile-table-inner > table {
  min-width: 100%;
}

.table-wrap th,
.table-wrap td {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* Home + profile layout (migrated from overrides.css) */
.home-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--home-gap);
  margin-top: 0;
  overflow-x: visible;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.home-sections > * {
  min-width: 0;
}

/* Hero container: Season Leaders container */
.home-hero {
  position: relative;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--ui-border);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 0;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-blue);
  border-radius: 16px 16px 0 0;
}
.home-hero-content {
  position: relative;
  padding: 1.5rem;
}
.home-hero h2 { font-size: 1.75rem; color: #0f172a; letter-spacing: 0.2px; }
.home-hero p { color: #475569; max-width: 60ch; }
.home-cta {
  margin-top: 0.5rem;
  align-self: flex-start;
  appearance: none; border: none; cursor: pointer;
  padding: 0.65rem 1.1rem; border-radius: 12px;
  color: #fff; font-weight: 600; letter-spacing: 0.2px;
  background: var(--brand-blue);
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.22);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.home-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(var(--brand-blue-rgb),0.28); }
.home-cta:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(var(--brand-blue-rgb),0.20); }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--home-gap); align-items: start; }
.home-card {
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  padding: 1.25rem 1.25rem;
  min-height: 220px;
}
.home-card h3 { color: #0f172a; margin-bottom: 0.25rem; }
.home-card p { color: #475569; }
.home-column { display: flex; flex-direction: column; gap: var(--home-gap); }
.recent-questions-card { display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden; }
.recent-questions-card::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 6px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue)); border-top-left-radius: 12px; border-top-right-radius: 12px; pointer-events: none; }
.recent-questions-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ui-border); padding-bottom: 0.75rem; }
.recent-questions-title h3 { margin: 0; letter-spacing: 0.2px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.recent-questions-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #475569; font-size: 0.75rem; margin: 0 0 0.15rem 0; }
.recent-questions-sub { margin: 0.1rem 0 0 0; color: #6b7280; font-size: 0.9rem; }
.recent-questions-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.65rem; border-radius: 999px; background: rgba(var(--brand-blue-rgb), 0.08); color: var(--brand-blue); font-weight: 700; font-size: 0.85rem; height: fit-content; }
.recent-questions-list { display: flex; flex-direction: column; gap: 0.6rem; }
.recent-question-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 12px; border: 1px solid #e5e7eb; background: #ffffff; text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.recent-question-row:visited { color: inherit; }
.recent-question-row:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); border-color: rgba(var(--brand-blue-rgb), 0.25); }
.recent-question-row:focus-visible { outline: 2px solid rgba(var(--brand-blue-rgb), 0.6); outline-offset: 2px; }
.recent-question-time { display: inline-flex; align-items: center; padding: 0.25rem 0.55rem; border-radius: 999px; background: rgba(var(--brand-blue-rgb), 0.12); color: var(--brand-blue); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.02em; white-space: nowrap; }
.recent-question-text { flex: 1; min-width: 0; font-weight: 600; color: #0f172a; font-size: 0.92rem; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.recent-question-arrow { color: #94a3b8; font-weight: 700; }
.recent-questions-empty { color: #6b7280; margin: 0; }
.round-highs-card { display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden; }
.round-highs-card::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 6px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue)); border-top-left-radius: 12px; border-top-right-radius: 12px; pointer-events: none; }
.round-highs-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ui-border); padding-bottom: 0.75rem; }
.round-highs-title h3 { margin: 0; letter-spacing: 0.2px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.round-highs-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #475569; font-size: 0.75rem; margin: 0 0 0.15rem 0; }
.round-highs-sub { margin: 0.1rem 0 0 0; color: #6b7280; font-size: 0.9rem; }
.round-highs-chips { display: flex; align-items: center; gap: 0.35rem; flex-wrap: nowrap; }
.round-highs-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.65rem; border-radius: 999px; background: rgba(var(--brand-blue-rgb), 0.08); color: var(--brand-blue); font-weight: 700; font-size: 0.85rem; line-height: 1; white-space: nowrap; }
.round-highs-pill.subtle { background: #f3f4f6; color: #1f2937; font-weight: 600; }
.round-highs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.85rem; }
.round-highs-tile { border: 1px solid var(--ui-border); border-radius: 12px; background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%); padding: 0.9rem; display: flex; flex-direction: column; gap: 0.65rem; box-shadow: 0 3px 12px rgba(0,0,0,0.04); }
.round-highs-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.round-highs-value { font-weight: 800; font-size: 1.4rem; color: #0f172a; }
.round-highs-leader { display: grid; grid-template-columns: auto 1fr auto; gap: 0.65rem; align-items: center; padding: 0.55rem; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid var(--team-primary, var(--brand-blue)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }
.round-highs-avatar { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #e2e8f0; border: 1px solid var(--ui-border); }
.round-highs-name { display: flex; gap: 0.25rem; font-weight: 700; color: #0f172a; text-decoration: none; line-height: 1.2; }
.round-highs-name .last { text-transform: uppercase; }
.round-highs-team { font-size: 0.85rem; color: #475569; }
.round-highs-team .vs { margin-left: 0.35rem; color: #94a3b8; font-weight: 600; }
.round-highs-badge { width: 32px; height: 32px; border-radius: 10px; background: var(--team-primary, var(--brand-blue)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; box-shadow: 0 6px 12px rgba(0,0,0,0.12); }
.round-highs-others { border-top: 1px dashed #e2e8f0; padding-top: 0.45rem; display: flex; flex-direction: column; gap: 0.35rem; }
.round-highs-other-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: center; padding: 0.2rem 0; }
.round-highs-other-row .rank { font-weight: 700; color: #6b7280; width: 24px; text-align: center; }
.round-highs-other-row .other-info { display: flex; flex-direction: column; gap: 0.1rem; }
.round-highs-other-row .other-name { font-weight: 600; color: var(--brand-blue); text-decoration: none; font-size: 0.95rem; }
.round-highs-other-row .other-team { font-size: 0.78rem; color: #94a3b8; }
.round-highs-other-row .other-value { font-weight: 700; color: #0f172a; }
.round-highs-empty { color: #6b7280; margin: 0.5rem 0 0 0; }
.season-free-kicks-card { width: 100%; margin-top: 0.25rem; display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden; }
.season-free-kicks-card::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 6px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue)); border-top-left-radius: 12px; border-top-right-radius: 12px; pointer-events: none; }
.season-free-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ui-border); padding-bottom: 0.75rem; }
.season-free-title h3 { margin: 0; letter-spacing: 0.2px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.season-free-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #475569; font-size: 0.75rem; margin: 0 0 0.15rem 0; }
.season-free-sub { margin: 0.1rem 0 0 0; color: #6b7280; font-size: 0.9rem; }
.season-free-pill { display: inline-flex; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(var(--brand-blue-rgb), 0.08); color: var(--brand-blue); font-weight: 700; font-size: 0.9rem; height: fit-content; }
.season-free-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.season-free-grid--expandable { position: relative; padding-bottom: 3.2rem; }
.season-free-column { border: 1px solid var(--ui-border); border-radius: 12px; background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%); padding: 0.85rem; box-shadow: 0 3px 12px rgba(0,0,0,0.04); display: flex; flex-direction: column; gap: 0.5rem; }
.season-free-column-head { display: flex; align-items: center; justify-content: space-between; }
.season-free-label { font-weight: 800; font-size: 0.95rem; color: #0f172a; }
.season-free-label.positive { color: #047857; }
.season-free-label.negative { color: #b91c1c; }
.season-free-meta { color: #94a3b8; font-weight: 700; font-size: 0.85rem; }
.season-free-list { display: flex; flex-direction: column; gap: 0.35rem; }
.season-free-extra { display: none; margin-top: 0.4rem; }
.season-free-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.season-free-toggle-input:checked ~ .season-free-grid .season-free-extra { display: flex; flex-direction: column; gap: 0.35rem; }
.season-free-expand-trigger { position: absolute; right: 0.6rem; bottom: 0.2rem; width: 36px; height: 36px; border-radius: 999px; border: 1px solid #e5e7eb; background: #f8fafc; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 12px rgba(0,0,0,0.08); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.season-free-expand-trigger:hover { background: #eef2f7; transform: translateY(-1px); box-shadow: 0 8px 14px rgba(0,0,0,0.12); }
.season-free-expand-trigger::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--brand-blue); border-bottom: 2px solid var(--brand-blue); transform: rotate(45deg); transition: transform .2s ease; }
.season-free-toggle-input:checked ~ .season-free-grid .season-free-expand-trigger::before { transform: rotate(-135deg); }
.season-free-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; padding: 0.55rem 0.5rem; border-radius: 10px; border: 1px solid #e5e7eb; background: #ffffff; border-left: 5px solid var(--team-primary, var(--brand-blue)); }
.season-free-row .rank { width: 28px; text-align: center; font-weight: 800; color: #6b7280; }
.season-free-row .team-block { display: inline-flex; align-items: center; gap: 0.5rem; }
.season-free-row .team-logo { width: 24px; height: 24px; object-fit: contain; }
.season-free-row .team-name-link { font-weight: 700; color: #0f172a; text-decoration: none; }
.season-free-row .value-block { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.season-free-row .value { font-weight: 800; color: #0f172a; }
.season-free-row .avg { color: #6b7280; font-weight: 700; font-size: 0.82rem; }
.season-free-empty { color: #6b7280; margin: 0; }
@media (max-width: 900px) {
  .home-hero { min-height: 220px; }
  .home-grid { grid-template-columns: 1fr; }
  .recent-questions-header { flex-direction: column; align-items: flex-start; }
  .recent-question-row { align-items: flex-start; }
  .recent-question-text { white-space: normal; }
  .round-highs-header { flex-direction: column; align-items: flex-start; }
  .round-highs-grid { grid-template-columns: 1fr; }
  .season-free-header { flex-direction: column; align-items: flex-start; }
  .season-free-row { grid-template-columns: auto 1fr auto; gap: 0.35rem; }
}

/* Profile layout aligning with home */
.hero-section {
  position: relative;
  border-radius: var(--fs-top-banner-radius);
  background: var(--team-primary, #ffffff);
  border: 1px solid var(--ui-border);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 0;
  margin-bottom: var(--home-gap);
  width: 100%;
  max-width: 100%;
}

.hero-section .hero-content { position: relative; padding: 1.5rem; }
.profile-nav {
  border-radius: 16px; background: #ffffff; border: 1px solid var(--ui-border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06); padding: 0; margin-bottom: var(--home-gap);
  width: 100%; max-width: 100%; box-sizing: border-box; display: flex; gap: 0; overflow-x: auto;
  position: relative; overflow-y: hidden;
}
.profile-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color, var(--team-primary, var(--brand-blue))),
    var(--primary-color, var(--team-primary, var(--brand-blue))),
    var(--primary-color, var(--team-primary, var(--brand-blue)))
  );
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}
.content-card {
  border-radius: 16px; background: #ffffff; border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06); padding: 1.25rem 1.25rem; margin-bottom: 1.5rem; min-height: 220px;
}
/* 404 page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2.5rem 1.5rem;
}
.error-panel {
  width: min(680px, 100%);
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  padding: 2.75rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.error-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-blue), #1f3b6d);
}
.error-code {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-bottom: 0.35rem;
}
.error-title {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  color: #0f172a;
  margin-bottom: 0.65rem;
}
.error-message {
  color: #475569;
  font-size: 1rem;
  max-width: 48ch;
  margin: 0 auto 1.6rem auto;
}
.error-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.error-btn.primary {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(10, 25, 49, 0.2);
}
.error-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(10, 25, 49, 0.28);
}
.error-btn.ghost {
  color: var(--brand-blue);
  border: 1px solid rgba(10, 25, 49, 0.18);
  background: rgba(10, 25, 49, 0.04);
}
.error-btn.ghost:hover {
  background: rgba(10, 25, 49, 0.1);
}
@media (max-width: 820px) {
  .error-panel {
    padding: 2.2rem 1.5rem;
  }
  .error-actions {
    width: 100%;
    flex-direction: column;
  }
  .error-btn {
    width: 100%;
  }
}
.tab-content { margin: 0; padding: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.data-table-wrapper { overflow-x: auto; max-width: 100%; }
.overview-grid, .performance-grid, .bio-grid { display: grid; gap: var(--home-gap); }
.home-sections table { width: 100% !important; table-layout: auto !important; }
.home-sections td, .home-sections th { overflow: visible !important; text-overflow: clip !important; max-width: none !important; }

/* Ensure scroll-wrapped tables keep cells readable */
.table-wrap th,
.table-wrap td {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Season Leaders carousel */
.leaders-header { display:flex; align-items:center; justify-content:space-between; position:relative; margin:0; padding-bottom:.5rem; border-bottom:2px solid #E5E7EB; margin-bottom:1.5rem; }
.leaders-title { font-size:1.25rem; font-weight:700; color:#0A1931; margin:0; letter-spacing:.5px; text-align:left; background:none; -webkit-background-clip:initial; -webkit-text-fill-color:initial; }
.leaders-toggle { position:absolute; right:0; top:-8px; display:inline-flex; align-items:center; background:transparent; border:none; padding:0; gap:2px; }
.leaders-toggle button { appearance:none; border:none; background:transparent; color:#6b7280; padding:.35rem .75rem; border-radius:8px; cursor:pointer; font-weight:600; transition:all .2s ease; }
.leaders-toggle button[aria-pressed="true"] { background: var(--brand-blue); color:#fff; }
.leaders-shell { position:relative; overflow:hidden; padding:0 50px; }
.leaders-track { display:flex; align-items:stretch; transition: transform .3s ease; gap: var(--home-gap); padding:0; }
.leaders-card { position:relative; display:flex; flex-direction:column; flex:0 0 calc((100% - (2 * var(--home-gap))) / 3); border:1px solid var(--ui-border); border-radius:12px; background:#fff; overflow:hidden; min-height:320px; box-shadow:0 4px 12px rgba(0,0,0,0.04); transition: transform .2s ease, box-shadow .2s ease; }
.leaders-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.leaders-card .stat-label { display:flex; align-items:center; justify-content:space-between; margin-bottom:.75rem; }
.stat-label .name { font-weight:700; color:#0f172a; }
.stat-label .meta { color:#6b7280; font-size:.9rem; }
.leader-row { display:flex; align-items:center; gap:.75rem; padding:.875rem; border-radius:8px; background:#f8fafc; border-left:4px solid var(--team-primary, var(--brand-blue)); transition: background .2s ease; }
.leader-row:hover { background:#f1f5f9; }
.leader-row .avatar-img { width:56px; height:56px; border-radius:50%; object-fit:cover; border:2px solid var(--team-primary, #cbd5e1); background:#e2e8f0; }
.leader-row .avatar { width:42px; height:42px; border-radius:50%; background:#e2e8f0; display:flex; align-items:center; justify-content:center; color:#0f172a; font-weight:700; border:2px solid var(--team-primary, #cbd5e1); }
.leader-row .info { flex:1; }
.leader-row .info .player-name { font-weight:700; color:#0f172a; }
.leader-row .info .player-team { color:#475569; font-size:.85rem; }
.leader-row .value { font-weight:800; color:#0f172a; font-size:1.25rem; }
.others-list { margin-top:.4rem; }
.others-item { display:flex; align-items:center; gap:.75rem; padding:.45rem .15rem; border-top:1px solid var(--ui-border); min-height:36px; }
.others-item:first-child { border-top:0; }
.others-item .rank { width:20px; text-align:center; color:#64748b; font-weight:700; font-size:.75rem; }
.others-item .name { flex:1; color: var(--brand-blue); font-weight:600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .68rem; line-height: 1.15; }
.others-item .name a { color: inherit; text-decoration: none; font-size: inherit; }
.others-item .team { color:#64748b; font-size:.75rem; }
.others-item .value { color: var(--brand-blue); font-weight:700; font-size:.9rem; line-height:1.15; }
.others-thumb { width:28px; height:28px; border-radius:50%; object-fit:cover; background:#e2e8f0; border:1px solid var(--ui-border); }
.leaders-list { padding: .15rem .75rem .35rem .75rem; background:#fff; }
.leaders-nav { position:absolute; top:0; left:0; right:0; height:100%; pointer-events:none; z-index:30; }
.leaders-nav button { appearance:none; cursor:pointer; pointer-events:auto; position:absolute; top:50%; transform: translateY(-50%); z-index:30; border:none; width:40px; height:40px; background:rgba(255,255,255,0.95); backdrop-filter: blur(10px); border:1px solid rgba(0,0,0,0.12); border-radius:50%; font-size:22px; color:#374151; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,0.15); transition: all .2s ease; }
.leaders-nav #leadersPrev { left: 5px; }
.leaders-nav #leadersNext { right: 5px; }
.leaders-nav button:hover:not(:disabled) { background: var(--brand-blue); color:white; transform: translateY(-50%) scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.team-chip { display:inline-block; margin-left:.4rem; padding:.15rem .4rem; border:1px solid var(--ui-border); border-radius: 999px; font-size:.75rem; color: var(--brand-blue); text-decoration:none; }
@media (max-width: 1200px) { .leaders-card { flex: 0 0 calc((100% - var(--home-gap)) / 2); } }
@media (max-width: 768px) { .leaders-card { flex: 0 0 100%; min-height:300px; } .home-hero-content { padding:1rem; } .leaders-header { margin-left:0; margin-right:0; padding-left:0; padding-right:0; } .leaders-title { font-size:1.25rem; } .leaders-shell { padding: 0 40px; } .leaders-nav button { width:35px; height:35px; font-size:18px; } }

@media (max-width: 820px) {
  .leaders-shell {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0 16px;
  }

  .leaders-shell::-webkit-scrollbar {
    display: none;
  }

  .leaders-track {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
  }

  .leader-row .info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .leader-row .info .player-name {
    font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  }

  .leader-row .info .player-team {
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    text-align: left;
  }
}

/* CONTAINER: Responsive width management */
.container {
  width: 100%; /* Full width */
  max-width: var(--container-width); /* Responsive max width with buffer */
  margin: 0 auto;
  padding: 0 var(--container-padding-x); /* Responsive padding */
  box-sizing: border-box;
  overflow-x: visible; /* Changed to visible to prevent cutoff */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* TOP BAR */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  min-height: 50px;
}
.left-top {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2001;
}
.logo .logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--brand-blue);
}

.logo .logo-heading {
  margin: 0;
  font-size: inherit;
  line-height: 0;
}

.logo .logo-image {
  display: block;
  height: 36.15px;
  width: auto;
  transition: none;
}

/* Desktop-only: gently scale the header logo down as viewport narrows
   so left header spacing remains visually consistent. */
@media (min-width: 821px) {
  .logo .logo-image {
    height: clamp(24px, calc(12px + 2vw), 36.15px);
  }
}

/* Near-mobile desktop widths need extra breathing room so the logo never clips. */
@media (min-width: 821px) and (max-width: 980px) {
  .left-top {
    gap: 0.75rem;
  }

  .logo .logo-image {
    height: clamp(22px, 2.6vw, 31px);
  }

  .search-form {
    width: min(62%, 700px);
  }
}

/* Accessible utility */
.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;
}

/* Mobile menu */
.mobile-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-menu-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.mobile-menu-button:active {
  transform: translateY(0);
}

.mobile-menu-icon {
  position: relative;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-icon::before {
  top: -6px;
}

.mobile-menu-icon::after {
  top: 6px;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 16000;
}

body.menu-open .mobile-menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu-close {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: var(--brand-blue);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* AUTH BUTTONS => fix alignment */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.8rem; /* Reduced gap for tighter layout */
  min-width: 150px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.auth-buttons a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

/* Login button - subtle outline style */
.auth-buttons a[href*="login"] {
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  background: transparent;
}

.auth-buttons a[href*="login"]:hover {
  background-color: var(--brand-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(var(--brand-blue-rgb), 0.2);
}

/* Sign up button - filled style */
.auth-buttons a[href*="register"] {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(var(--brand-blue-rgb), 0.1);
}

.auth-buttons a[href*="register"]:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--brand-blue-rgb), 0.3);
}

/* Authenticated user styles - Account link with profile pic */
.auth-buttons .user-info-link {
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.auth-buttons .user-info-link:hover {
  background-color: var(--brand-blue);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(var(--brand-blue-rgb), 0.2);
}

.auth-buttons .top-bar-profile-pic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.2);
}

/* Logout button - filled style like register button */
.auth-buttons .logout-link {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(var(--brand-blue-rgb), 0.1);
  font-weight: 500;
}

.auth-buttons .logout-link:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--brand-blue-rgb), 0.3);
}

/* SEARCH AREA */
.search-form {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(68.04%, 936px);
  max-width: 100%;
  z-index: 15000; /* Keep search UI above global overlays */
}
.search-area {
  --search-area-pad-x: 1rem;
  --search-area-pad-y: 0.3rem;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: var(--search-area-pad-y) var(--search-area-pad-x);
  width: 100%;
  transition: border-color 0.2s ease;
  position: relative;
  z-index: 15001; /* Ensure the bar itself remains visible over darken overlays */
}

.search-area.dropdown-open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none; /* Seamless join with live results container */
}

.search-area:focus-within {

  outline: none !important;
  box-shadow: 0 0 5px rgba(var(--brand-blue-rgb), 0.2) !important;
}

/* Complete search bar border removal - targeting everything */
.search-area,
.search-area *,
.search-form,
.search-form *,
#searchInput,
.search-area form,
.search-area input {
  outline: none !important;
  box-shadow: none !important;
}

/* Override any browser defaults for form elements */
input[type="text"],
input[type="search"],
input.form-control {
  border: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Fix for Firefox specific outline */
::-moz-focus-inner {
  border: 0;
}

/* Fix for WebKit browsers */
*:focus {
  outline: none;
}

.search-area form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

[data-testid="search-wrapper"] {
  flex: 1;
  min-width: 0;
}

#searchInput {
  flex: 1;
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  font-size: 0.95rem;
  padding-left: 1rem;
  border-radius: 10px;
}

/* Remove outline from search input when focused */
#searchInput:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.search-btn {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(10, 25, 49, 0.2);
  position: relative;
  overflow: hidden;
}

.search-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.search-btn:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(10, 25, 49, 0.3);
}

.search-btn:hover::before {
  left: 100%;
}

.search-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 8px rgba(10, 25, 49, 0.4);
}

/* Style the search icons - CSS arrow and clear X */
.search-icon-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.search-icon-arrow::before {
  content: '';
  width: 12px;
  height: 2px;
  background: white;
  border-radius: 999px;
  transform: translateX(-1px);
  transition: transform 0.2s ease;
}

.search-icon-arrow::after {
  content: '';
  position: absolute;
  right: 4px;
  width: 6px;
  height: 6px;
  border-top: 2px solid white;
  border-right: 2px solid white;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.search-icon-clear {
  font-size: 18px;
  color: white;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.search-btn:hover .search-icon-arrow {
  transform: translateX(1px) scale(1.05);
}

.search-btn:hover .search-icon-arrow::before {
  transform: translateX(0);
}

.search-btn:hover .search-icon-arrow::after {
  transform: rotate(45deg) translate(1px, -1px);
}

.search-btn:hover .search-icon-clear {
  transform: scale(1.1);
}

/* Hide the old arrow icon */
.search-arrow-icon {
  display: none;
}

/* Hide the old icon element if it exists */
.search-icon {
  display: none;
}

/* Dark overlay when search is focused */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 11000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Enhance search bar appearance when focused */
.search-area.focused {
  z-index: 1000;
  box-shadow: 0 0 0 2px #0A1931, 0 0 15px rgba(10, 25, 49, 0.25);
  position: relative;
  background-color: white;
  border-radius: 20px 20px 0 0;
  /* Ensure no outline is added */
  outline: none;
}

/* LIVE SEARCH RESULTS */
.live-search-results {
  position: absolute;
  top: calc(100% + var(--search-area-pad-y));
  left: calc(-1 * (var(--search-area-pad-x) + 1px));
  right: calc(-1 * (var(--search-area-pad-x) + 1px));
  width: auto;
  background: #ffffff;
  z-index: 15002; /* Keep the dropdown above overlay/animation layers */
  margin-top: 0;
  border: 1px solid #E5E7EB; /* Match search bar border styling */
  border-radius: 0 0 20px 20px;
  max-height: 450px;
  overflow-y: auto;
  z-index: 12010;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0 12px 12px;
}

.search-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border, #E5E7EB);
  border-left: 4px solid var(--card-accent, transparent);
  background: var(--card-surface, #FFFFFF);
  color: var(--card-text-secondary, #475569);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
  min-height: 68px;
}

.search-card:not(:last-child) {
  margin-bottom: 10px;
}

.search-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: var(--card-accent, #1D4ED8);
}

.search-card.selected {
  border-color: var(--card-accent, #1D4ED8);
  background: var(--card-selected-surface, rgba(29, 78, 216, 0.1));
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
}

.search-card .card-content {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Stabilize live search text sizing across pages */
.live-search-results .team-card .team-name,
.live-search-results .player-card .player-name,
.live-search-results .coach-card .coach-name {
  font-size: 0.98rem;
  line-height: 1.25;
}

.live-search-results .team-card .team-name[data-long-name="true"] {
  font-size: 0.9rem;
}

.live-search-results .search-question-card .search-text {
  font-size: 0.95rem;
  line-height: 1.25;
}

/* Search Question Card */
.search-question-card {
  --card-accent: #6B7280;
  --card-border: rgba(148, 163, 184, 0.35);
  --card-surface: #F8FAFC;
  --card-text-secondary: #4B5563;
}

.search-question-card .card-content {
  justify-content: flex-start;
}

.search-question-card .search-icon {
  font-size: 1.15rem;
  color: #4B5563;
}

.search-question-card .search-text {
  color: #1F2937;
  font-weight: 500;
}

/* Team Card */
.team-card {
  --card-text-secondary: #475569;
  --card-text-primary: #0F172A;
  --card-border: rgba(15, 23, 42, 0.08);
  --team-logo-surface: rgba(15, 23, 42, 0.05);
}

.team-card .card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.team-card .team-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--team-logo-surface);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 6px;
  flex-shrink: 0;
}

.team-card .team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-card .team-info {
  flex: 1;
  min-width: 0;
}

.team-card .team-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--card-text-primary, #0F172A);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.team-card .team-name[data-long-name="true"] {
  font-size: 0.9rem;
}

.team-card:hover {
  border-color: var(--card-accent, #1D4ED8);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* Player Card */
.player-card {
  --card-text-primary: #0F172A;
  --card-text-secondary: #475569;
  --card-type-tag-background: rgba(15, 23, 42, 0.08);
  --card-type-tag-color: #0F172A;
  --avatar-ring: var(--card-accent, #CBD5F5);
  --card-border: rgba(148, 163, 184, 0.35);
}

.player-card .player-image {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 2px solid var(--avatar-ring);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.player-card .player-retired-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #B91C1C;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.player-card .player-retired-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B91C1C;
  display: block;
}

.player-card .player-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.player-card .player-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-card .player-info {
  flex: 1;
  min-width: 0;
}

.player-card .player-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--card-text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.player-card .player-status {
  font-size: 0.8rem;
  margin-bottom: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--card-text-secondary);
}

.player-card .player-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-accent, #1D4ED8);
  display: inline-block;
}

.player-card .player-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--card-type-tag-background);
  color: var(--card-type-tag-color);
}

.player-card .all-teams {
  font-size: 0.78rem;
  margin-top: 4px;
  color: var(--card-text-secondary);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-card:hover {
  border-color: var(--card-accent, #1D4ED8);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.player-card:hover .player-image {
  transform: scale(1.05);
}

/* Bookmark in search card */
.search-card-bookmark {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 5;
}

.search-card-bookmark .bookmark-bubble,
.search-card-bookmark .bookmark-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.12);
  width: 34px;
  height: 34px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.search-card-bookmark .bookmark-bubble i,
.search-card-bookmark .bookmark-btn i {
  color: var(--card-text-secondary, #475569);
}

.player-card.has-bookmark .player-info {
  padding-right: 60px;
}

/* Coach Card */
.coach-card {
  --card-text-primary: #0F172A;
  --card-text-secondary: #4B5563;
  --card-type-tag-background: rgba(15, 23, 42, 0.08);
  --card-type-tag-color: #0F172A;
  --avatar-ring: var(--card-accent, #CBD5F5);
  --card-border: rgba(148, 163, 184, 0.35);
}

.coach-card .coach-image {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 2px solid var(--avatar-ring);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.coach-card .coach-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coach-card .coach-info {
  flex: 1;
  min-width: 0;
}

.coach-card .coach-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--card-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.coach-card .coach-teams {
  font-size: 0.8rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--card-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.coach-card .coach-teams::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-accent, #1D4ED8);
  display: inline-block;
}

.coach-card .coach-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--card-type-tag-background);
  color: var(--card-type-tag-color);
}

.coach-card:hover {
  border-color: var(--card-accent, #1D4ED8);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.coach-card:hover .coach-image {
  transform: scale(1.05);
}


/* Search Error and Loading */
.search-error,
.search-loading {
  padding: 16px;
  text-align: center;
  font-size: 14px;
}

.search-error {
  color: #DC2626;
}

.search-loading {
  color: #6B7280;
  font-style: italic;
}

/* Search Loading Animation */
.search-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Same dark overlay as search */
  z-index: 13000; /* Above header elements so everything darkens during the loading state */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.search-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sherrin-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sherrin-ball {
  width: 80px;
  height: 80px;
  background-image: url('/static/images/Logos/logo.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  animation: realisticBounce 2s linear infinite;
  transform-origin: center center;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

/* Remove the old CSS ball styling - no longer needed */
.sherrin-ball::before,
.sherrin-ball::after {
  display: none;
}

.sherrin-shadow {
  width: 60px;
  height: 10px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: 65px;
  animation: realisticShadow 2s linear infinite;
  filter: blur(2px);
}

.loading-text {
  color: #ffffff; /* White text for dark background */
  font-size: 18px;
  font-weight: 500;
  margin-top: 20px;
  text-align: center;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-family: var(--font-sans);
}

/* FASTER AFL bounce starting WAY higher */
@keyframes realisticBounce {
  0% {
    transform: translateX(0px) translateY(-80px) rotate(0deg);
  }

  10% {
    transform: translateX(15px) translateY(-65px) rotate(36deg);
  }

  20% {
    transform: translateX(30px) translateY(-45px) rotate(72deg);
  }

  30% {
    transform: translateX(45px) translateY(-20px) rotate(108deg);
  }

  40% {
    transform: translateX(55px) translateY(0px) rotate(144deg);
  }

  50% {
    transform: translateX(60px) translateY(30px) rotate(180deg);
  }

  60% {
    transform: translateX(55px) translateY(5px) rotate(216deg);
  }

  70% {
    transform: translateX(45px) translateY(-25px) rotate(252deg);
  }

  80% {
    transform: translateX(30px) translateY(-50px) rotate(288deg);
  }

  90% {
    transform: translateX(15px) translateY(-70px) rotate(324deg);
  }

  100% {
    transform: translateX(0px) translateY(-80px) rotate(360deg);
  }
}

/* Faster shadow with ball starting way higher */
@keyframes realisticShadow {
  0% {
    transform: translateX(0px) scale(0.3);
    opacity: 0.15;
  }

  10% {
    transform: translateX(15px) scale(0.4);
    opacity: 0.2;
  }

  20% {
    transform: translateX(30px) scale(0.6);
    opacity: 0.3;
  }

  30% {
    transform: translateX(45px) scale(0.9);
    opacity: 0.45;
  }

  40% {
    transform: translateX(55px) scale(1.1);
    opacity: 0.6;
  }

  50% {
    transform: translateX(60px) scale(1.4);
    opacity: 0.7;
  }

  60% {
    transform: translateX(55px) scale(1.0);
    opacity: 0.55;
  }

  70% {
    transform: translateX(45px) scale(0.8);
    opacity: 0.4;
  }

  80% {
    transform: translateX(30px) scale(0.5);
    opacity: 0.25;
  }

  90% {
    transform: translateX(15px) scale(0.4);
    opacity: 0.2;
  }

  100% {
    transform: translateX(0px) scale(0.3);
    opacity: 0.15;
  }
}

@keyframes shadowBounce {
  0%, 90%, 100% {
    transform: scale(1) translateY(0);
    opacity: 0.4;
  }
  45% {
    transform: scale(0.4) translateY(-5px);
    opacity: 0.1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sherrin-ball,
  .sherrin-shadow {
    animation: none;
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .sherrin-ball {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  }
  
  .sherrin-shadow {
    width: 55px;
    height: 10px;
    margin-top: 18px;
  }
  
  .loading-text {
    font-size: 16px;
    margin-top: 20px;
  }
}

/* Responsive adjustments for search */
@media (max-width: 768px) {
  .live-search-results {
    max-height: 350px;
  }
  
  .search-card {
    padding: 10px 14px;
    min-height: 50px;
  }
  
  .team-card .team-logo {
    width: 38px;
    height: 38px;
  }
  
  .team-card .team-name {
    font-size: 16px;
  }
  
  .player-card .player-image,
  .coach-card .coach-image {
    width: 40px;
    height: 40px;
  }
  
  .player-card .player-name,
  .coach-card .coach-name {
    font-size: 14px;
  }
}

/* Mobile responsiveness for auth buttons */
@media (max-width: 768px) {
  .auth-buttons {
    gap: 0.5rem;
    min-width: 120px;
  }
  
  .auth-buttons a[href*="login"],
  .auth-buttons a[href*="register"] {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .left-top {
    min-width: 150px;
  }
  
  .search-form {
    position: relative;
    width: calc(100% - 2rem);
    max-width: 100%;
    left: 0;
    transform: none;
    margin: 0 1rem;
  }
  
  .left-top {
    position: static;
    margin-bottom: 0.5rem;
  }
  
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .auth-buttons {
    flex-direction: column;
    gap: 0.4rem;
    min-width: 90px;
  }
  
  .auth-buttons a[href*="login"],
  .auth-buttons a[href*="register"] {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 80px;
    text-align: center;
  }
  
  .left-top {
    min-width: 100px;
  }
  
  .logo .logo-image {
    height: var(--logo-size-mobile);
    width: auto;
  }
  
  .search-form {
    position: relative;
    width: calc(100% - 1rem);
    max-width: 100%;
    left: 0;
    transform: none;
    margin: 0 0.5rem;
  }
  
  .top-bar {
    min-height: 50px;
  }
}

@media (max-width: 820px) {
  .top-bar {
    --mobile-header-top-gap: clamp(0.5rem, 1.8vw, 0.75rem);
    --mobile-header-bottom-gap: clamp(0.22rem, 1vw, 0.38rem);
    --mobile-header-side-gap: clamp(0.9rem, 3vw, 1.2rem);
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.4rem;
    min-height: calc(var(--search-h) + var(--mobile-header-top-gap) + var(--mobile-header-bottom-gap));
    height: calc(var(--search-h) + var(--mobile-header-top-gap) + var(--mobile-header-bottom-gap));
    padding-top: var(--mobile-header-top-gap);
    padding-bottom: var(--mobile-header-bottom-gap);
    padding-left: var(--mobile-header-side-gap);
    padding-right: var(--mobile-header-side-gap);
    position: sticky;
    top: 0;
    box-sizing: border-box;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    z-index: 15500;
    margin-top: 0;
    background: rgba(244, 244, 244, 0.96);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    transition: box-shadow 0.24s ease, background-color 0.24s ease;
  }

  .top-bar::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: rgba(15, 23, 42, 0.12);
    opacity: 0;
    transition: opacity 0.22s ease;
  }

  .top-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(
      90deg,
      rgba(10, 25, 49, 0) 0%,
      rgba(10, 25, 49, 0.44) 22%,
      rgba(10, 25, 49, 0.96) 50%,
      rgba(24, 49, 92, 0.9) 72%,
      rgba(10, 25, 49, 0) 100%
    );
    transform: translateY(1px) scaleX(0.55);
    transform-origin: center;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(10, 25, 49, 0.22));
    transition: transform 0.24s ease, opacity 0.24s ease, filter 0.24s ease;
    pointer-events: none;
  }

  .top-bar.is-mobile-scrolled {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    border-radius: 0;
  }

  .top-bar.is-mobile-scrolled::before {
    opacity: 1;
  }

  .top-bar.is-mobile-scrolled::after {
    transform: translateY(0) scaleX(1);
    opacity: 0.97;
    filter: drop-shadow(0 0 8px rgba(10, 25, 49, 0.3));
  }

  .top-bar.mobile-stick-enter::after {
    animation: mobileTopBarStickIn 380ms cubic-bezier(0.22, 0.76, 0.24, 1) both;
  }

  .top-bar.mobile-stick-exit::after {
    animation: mobileTopBarStickOut 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  .top-bar.is-mobile-scrolled .left-top {
    left: var(--mobile-header-side-gap);
  }

  @keyframes mobileTopBarStickIn {
    0% {
      opacity: 0;
      transform: translateY(1px) scaleX(0.55);
      filter: drop-shadow(0 0 4px rgba(10, 25, 49, 0.18));
    }
    62% {
      opacity: 1;
      transform: translateY(0) scaleX(1.02);
      filter: drop-shadow(0 0 10px rgba(10, 25, 49, 0.34));
    }
    100% {
      opacity: 0.97;
      transform: translateY(0) scaleX(1);
      filter: drop-shadow(0 0 8px rgba(10, 25, 49, 0.3));
    }
  }

  @keyframes mobileTopBarStickOut {
    0% {
      opacity: 0.97;
      transform: translateY(0) scaleX(1);
      filter: drop-shadow(0 0 8px rgba(10, 25, 49, 0.3));
    }
    100% {
      opacity: 0;
      transform: translateY(1px) scaleX(0.55);
      filter: drop-shadow(0 0 4px rgba(10, 25, 49, 0.18));
    }
  }

  .left-top {
    position: absolute;
    top: var(--mobile-header-top-gap);
    left: var(--mobile-header-side-gap);
    margin-bottom: 0;
    flex-shrink: 0;
    gap: 0.35rem;
    min-width: 0;
    display: flex;
    align-items: stretch;
    height: var(--search-h);
  }

  .left-top .logo {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: var(--search-h);
    height: var(--search-h);
  }

  .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
  }

  .sidebar-logo .logo-image {
    display: block;
    width: auto;
    height: 34px;
    margin: 0;
  }

  .sidebar-logo-text {
    display: none;
  }

  .logo .logo-image {
    height: var(--logo-size-mobile);
  }

  .search-form {
    position: absolute;
    top: var(--mobile-header-top-gap);
    left: 50%;
    transform: translateX(-50%);
    width: min(calc((100vw - (4 * var(--mobile-header-side-gap))) * 0.8), 448px);
    max-width: 448px;
    min-width: 0;
    margin: 0;
    height: var(--search-h);
    display: flex;
    align-items: stretch;
  }

  .search-area {
    --search-area-pad-x: 0.25rem;
    --search-area-pad-y: 0;
    min-width: 0;
    width: 100%;
    margin: 0;
    height: 100%;
    padding: var(--search-area-pad-y) var(--search-area-pad-x);
    align-items: stretch;
  }

  .search-area form {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
  }

  [data-testid="search-wrapper"] {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
  }

  #searchInput {
    width: 100%;
    height: 100%;
    line-height: 1;
    padding: 0 calc(var(--search-h) + 0.25rem) 0 0.9rem;
    min-width: 0;
    font-size: 0.95rem;
  }

  .search-btn {
    position: absolute;
    right: 0.15rem;
    top: 0;
    bottom: 0;
    transform: none;
    margin-left: 0;
    height: 100%;
    width: var(--search-h);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  [data-testid="search-dropdown"] {
    left: calc(-1 * (var(--search-area-pad-x) + 1px));
    right: calc(-1 * (var(--search-area-pad-x) + 1px));
    width: auto;
    top: calc(100% + var(--search-area-pad-y));
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }

  [data-testid="search-dropdown"] [data-testid="search-card"] {
    width: 100%;
    display: block;
    box-sizing: border-box;
  }

  #searchInput::placeholder {
    font-size: var(--search-placeholder-mobile);
  }

  [data-testid="hero-banner"]:not(.mc-scoreboard) {
    min-height: var(--fs-top-banner-total-height);
    height: var(--fs-top-banner-total-height);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
  }

  [data-testid="hero-banner"] [data-testid="banner-bg"] {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  [data-testid="hero-banner"] .hero-content,
  [data-testid="hero-banner"] .bubble-content {
    position: relative;
    z-index: 1;
  }

  [data-testid="banner-image"] {
    margin-top: auto;
  }

  #player-profile .hero-content,
  #coach-profile .hero-content,
  #team-profile .hero-content {
    height: 100%;
    align-items: stretch;
  }

  #player-profile .player-header,
  #coach-profile .player-header,
  #team-profile .team-header {
    height: 100%;
    align-items: flex-end;
  }

  .content-row {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }

  .auth-buttons {
    display: none;
  }

  .profile-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .profile-nav::-webkit-scrollbar {
    display: none;
  }

  .profile-nav .nav-tab {
    flex: 0 0 auto;
  }

  .scorecards-container {
    --carousel-gap: 0.4rem;
    --carousel-tile-min: 120px;
    gap: var(--carousel-gap);
    margin: 0 28px 0 0;
    width: calc(100% - 28px);
  }

  [data-testid="scorecards-container"] [data-testid="score-tile"] {
    min-width: var(--carousel-tile-width, var(--carousel-tile-min));
    flex: 0 0 var(--carousel-tile-width, var(--carousel-tile-min));
    max-width: var(--carousel-tile-width, var(--carousel-tile-min));
    padding: 0.4rem;
  }

  .score-logo {
    width: 14px;
    height: 14px;
  }

  .score-tile .team-name {
    font-size: 0.65rem;
  }

  .score-score {
    font-size: 0.7rem;
  }

}

/* Keep desktop live-search cards on the original card layout */
@media (min-width: 821px) {
  [data-testid="search-wrapper"] {
    position: static;
  }

  [data-testid="search-dropdown"] {
    left: calc(-1 * (var(--search-area-pad-x) + 1px));
    right: calc(-1 * (var(--search-area-pad-x) + 1px));
    width: auto;
    top: calc(100% + var(--search-area-pad-y));
    padding: 0;
    overflow: hidden;
  }

  [data-testid="search-dropdown"] [data-testid="search-card"] {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--card-border, #E5E7EB);
    box-shadow: none;
  }

  [data-testid="search-dropdown"] [data-testid="search-card"]:not(:last-child) {
    margin-bottom: 0;
  }

  [data-testid="search-dropdown"] [data-testid="search-card"]:last-child {
    border-bottom: 0;
  }

  [data-testid="search-dropdown"] [data-testid="search-card"]:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Games Carousel */
.games-carousel {
  margin: 0;
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 0;
}

.games-carousel-header {
  margin: 0 0 0.2rem 0;
  width: 100%;
}

.games-carousel-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #475569;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

.games-carousel-divider::before,
.games-carousel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), rgba(10, 25, 49, 0.28), rgba(148, 163, 184, 0.18));
}

.games-carousel-divider--top {
  justify-content: flex-start;
}

.games-carousel-divider--top::before {
  display: none;
}

.games-carousel-round {
  margin: 0;
  padding: 0;
  font-size: 0.6rem;
  font-weight: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.games-carousel-nav {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  pointer-events: auto;
}

/* Container for arrows and content */
.carousel-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: visible;
}

/* The scrollable container */
.scorecards-container {
  --carousel-gap: 0.5rem;
  --carousel-tile-min: 237px;
  --carousel-tile-width: var(--carousel-tile-min);
  --score-tile-status-row-height: 1.215rem;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth; /* Smooth scrolling */
  gap: var(--carousel-gap);
  padding: 0.75rem 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
  
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scorecards-container.is-centered {
  justify-content: center;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scorecards-container::-webkit-scrollbar {
  display: none;
}

/* Make sure spacer works correctly */
.arrow-spacer {
  min-width: 20px;
  flex-shrink: 0;
}

/* Navigation arrows */
.carousel-arrow {
  appearance: none;
  position: static;
  width: 1.32rem;
  height: 1.32rem;
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.28);
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.carousel-arrow::before {
  line-height: 1;
}

.carousel-arrow:hover:not(.disabled) {
  border-color: rgba(30, 64, 175, 0.42);
  background: #eff6ff;
  transform: translateY(-1px);
}

.carousel-arrow.disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.carousel-arrow.disabled:hover {
  transform: none;
}

.carousel-arrow.is-hidden {
  display: none;
}

.prev-arrow::before {
  content: '\2039';
  font-size: 0.92rem;
  font-weight: 700;
}

.next-arrow::before {
  content: '\203A';
  font-size: 0.92rem;
  font-weight: 700;
}

/* Legacy arrow styles retained for non-header variants */
.carousel-arrow.legacy-overlay {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 100;
}

/* Add glow effect with pseudo-element to prevent cutoff */
.carousel-arrow.legacy-overlay::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 25, 49, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

/* Position arrows at the edges */
.carousel-arrow.legacy-overlay:hover:not(.disabled) {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 12px rgba(10, 25, 49, 0.25);
}

.carousel-arrow.legacy-overlay:hover:not(.disabled)::after {
  opacity: 1;
}

.carousel-arrow.legacy-overlay:hover:not(.disabled)::before {
  color: white;
}

.carousel-arrow.legacy-overlay.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  background: #f3f4f6;
  transition: opacity 0.4s ease;
}

.carousel-arrow.legacy-overlay.disabled:hover {
  transform: translateY(-50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.carousel-arrow.legacy-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.carousel-arrow.legacy-overlay.prev-arrow {
  left: 20px; /* Further increased to prevent glow cutoff */
}

.carousel-arrow.legacy-overlay.prev-arrow::before {
  content: '\2039';
  font-size: 24px;
  font-weight: bold;
  color: #374151;
  line-height: 1;
}

.carousel-arrow.legacy-overlay.next-arrow {
  right: 20px; /* Further increased to prevent glow cutoff */
}

.carousel-arrow.legacy-overlay.next-arrow::before {
  content: '\203A';
  font-size: 24px;
  font-weight: bold;
  color: #374151;
  line-height: 1;
}

/* Score tiles - AFL game cards */
.score-tile {
  --score-tile-height-scale: 0.9;
  --score-tile-accent: var(--brand-blue);
  --score-tile-accent-soft: rgba(var(--brand-blue-rgb), 0.16);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid #dbe7f6;
  border-radius: 9px;
  padding: calc(0.525rem * var(--score-tile-height-scale)) 0.525rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  min-width: var(--carousel-tile-width, 237px);
  max-width: var(--carousel-tile-width, 237px);
  flex: 0 0 var(--carousel-tile-width, 237px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  align-self: stretch;
}

.score-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--score-tile-accent), var(--score-tile-accent), var(--score-tile-accent));
  opacity: 0.98;
  transition: opacity 0.2s ease;
}

.score-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.score-tile:hover::before {
  opacity: 1;
}

.score-tile[data-match-centre-href] {
  cursor: pointer;
}

.score-tile[data-match-centre-href]:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Game status header */
.score-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: calc(0.35rem * var(--score-tile-height-scale));
  padding-bottom: calc(0.175rem * var(--score-tile-height-scale));
  border-bottom: 1px solid #f3f4f6;
  min-height: var(--score-tile-status-row-height);
}

.score-header.is-live {
  justify-content: center;
}

.game-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue);
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.game-status.is-live {
  padding: 2px 7px;
  background: rgba(var(--brand-blue-rgb), 0.08);
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.2);
}

.game-status--date {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  font-size: 0.58rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.55);
  animation: game-status-live-pulse 1.6s ease-out infinite;
}

@keyframes game-status-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.game-live-period {
  display: inline-flex;
  align-items: center;
  font-size: 0.56rem;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
}

/* Teams container */
.teams-container {
  display: flex;
  flex-direction: column;
  gap: calc(0.3rem * var(--score-tile-height-scale));
  margin-bottom: calc(0.35rem * var(--score-tile-height-scale));
  padding-top: 2px; /* Small padding at top to compensate for removed header */
}

/* Team row styling - more compact */
.team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: calc(0.25rem * var(--score-tile-height-scale)) 0;
  min-width: 0;
}

.team.home-team {
  padding-bottom: calc(0.25rem * var(--score-tile-height-scale));
}

.team.away-team {
  padding-top: calc(0.25rem * var(--score-tile-height-scale));
}

.team-details {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  flex-grow: 1;
  min-width: 0;
  margin-left: 6px; /* Reduced margin */
}

/* Logo styling */
.score-logo {
  width: 16px; /* Smaller logo */
  height: 16px; /* Smaller logo */
  object-fit: contain;
}

/* Modify team name display for wider cards */
.score-tile .team-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  color: #333;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.score-tile .team-name-label--abbr {
  display: none;
}

/* Team name hover effect */
a.team-name:hover {
  color: #0A1931 !important;
  text-decoration: underline !important;
}

/* Style for winning team */
.score-tile .team-name.winner {
  font-weight: 700;
  color: #0A1931; /* Darker, more prominent color */
}

.score-score.winner {
  font-weight: 700;
  color: #0A1931; /* Match the team name */
}

/* Style for losing team */
.score-tile .team-name.loser {
  font-weight: normal;
  color: #888; /* More subdued color */
}

.score-score.loser {
  font-weight: normal;
  color: #888; /* Match the team name - more subdued */
}

/* Adjust score display for balanced layout */
.score-score {
  flex: 0 0 auto;
  min-width: 3ch;
  font-weight: bold;
  color: #0A1931;
  font-size: 0.75rem;
  margin-left: auto;
  width: auto;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.score-score--masked {
  background: transparent;
  color: #0f172a !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Enhanced game info layout */
.game-info {
  margin-top: auto;
  padding-top: 2px;
  padding-bottom: 0;
  border-top: 1px solid #eee;
  font-size: 0.6rem;
  color: #666;
  text-align: center;
  line-height: calc(1.2 * var(--score-tile-height-scale));
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
}

.game-info-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  min-width: 0;
}

.game-round {
  font-weight: 700;
  color: #334155;
  font-size: 0.66rem;
  max-width: 58%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-result {
  font-weight: 600;
  color: #2c7be5;
  margin-bottom: 2px;
}

.upcoming-game {
  display: flex;
  flex-direction: column;
  gap: 0px; /* Minimal gap */
}

/* For upcoming games, show venue and date on same line */
.upcoming-game-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styling for the dot separator between venue and date */
.game-separator {
  font-size: 0.5rem;
  color: #999;
  margin: 0 1px;
}

/* Make venue text fit better in the wider cards */
.game-venue {
  font-weight: 500;
  color: #475569;
  font-size: 0.66rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42%;
  margin: 0 auto;
  text-align: center;
}

.game-time {
  color: #64748b;
  font-size: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-time--live {
  color: var(--brand-blue);
  font-weight: 700;
}

/* NEW LAYOUT SYSTEM */
.page-layout {
  width: 100%;
  min-width: 0;
}

.site-main {
  width: 100%;
  min-width: 0;
  display: block;
}

/* SIDEBAR LAYOUT (for all pages) */
.sidebar-layout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6); /* Increase gutter between menu and content */
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  min-width: 0;
}

.sidebar-layout .sidebar {
  width: 220px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 1.5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.sidebar-layout .sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue), var(--brand-blue));
  border-radius: 16px 16px 0 0;
}

.sidebar-layout .content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: 0;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.break-long {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 820px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .sidebar-layout {
    display: block;
    gap: var(--space-4);
  }

  .sidebar-layout .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: var(--mobile-menu-vh);
    max-height: var(--mobile-menu-vh);
    width: min(85vw, 320px);
    max-width: 320px;
    transform: translateX(-110%) !important;
    transition: transform 0.25s ease;
    z-index: 17000;
    margin: 0;
    gap: 0.75rem;
    padding-bottom: var(--mobile-menu-bottom-gap);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: var(--mobile-menu-bottom-gap);
  }

  body:not(.menu-open) .sidebar-layout .sidebar {
    transform: translateX(-110%) !important;
  }

  body.menu-open .sidebar-layout .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-layout .content-area {
    width: 100%;
  }

  .mobile-menu-close {
    display: inline-flex;
  }

  .sidebar-layout .sidebar .sidebar-divider--primary {
    margin: 0.35rem 0;
    background: linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.15),
      rgba(10, 25, 49, 0.32),
      rgba(148, 163, 184, 0.15)
    );
  }

  .sidebar-layout .sidebar .sidebar-divider--primary + .auth-links {
    margin-top: 0;
  }

  .sidebar-layout .sidebar .auth-links {
    margin-top: 0;
    padding-top: 0;
  }
}

/* Home page content row under Season Leaders - FIXED LAYOUT */
.content-row {
  width: 100%; /* Full width */
  max-width: 1400px; /* Wider max width */
  margin: 0 auto 2rem auto;
  display: grid;
  grid-template-columns: 400px 1fr; /* Fixed left column, flexible right */
  gap: 1rem; /* REDUCED gap between columns */
  box-sizing: border-box;
  align-items: start;
  padding: 0 30px; /* Add horizontal padding */
}

/* Column containers */
.left-col, .right-col { 
  min-width: 0; /* Prevent grid blowout */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Trending blocks container */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* AFL Ladder container */
.right-col {
  display: flex;
  flex-direction: column;
}

.right-col .afl-ladder { 
  width: 100%; 
  margin: 0; /* Remove any default margins */
}

@media (max-width: 1024px) {
  .content-row { 
    grid-template-columns: 1fr; /* Stack on smaller screens */
    gap: 2rem;
  }
}

/* Modern sidebar logo */
.sidebar-logo {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #E5E7EB;
  text-align: left;
}

.sidebar-logo-text {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-sans);
  color: #0A1931;
  letter-spacing: 0.02em;
}

@media (max-width: 820px) {
  .sidebar-logo {
    display: flex;
  }
}

/* Navigation links in sidebar */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-links li.is-active::before {
  content: '';
  position: absolute;
  left: -0.4rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #0A1931;
  box-shadow: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #374151;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  will-change: transform;
}

.nav-links a::before {
  content: none;
}

.nav-links a:hover::before {
  left: auto;
}

.nav-links a:hover {
  background: transparent;
  color: #0A1931;
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.nav-links li.is-active > a {
  background: transparent;
  color: #0A1931;
  border-color: transparent;
  box-shadow: none;
}

.nav-links a:active {
  transform: none;
}

.nav-links img:not(.sidebar-profile-pic) {
  width: 22px;
  height: 22px;
  object-fit: contain;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
  filter: opacity(0.8);
}

.nav-links a:hover img:not(.sidebar-profile-pic) {
  filter: opacity(1);
  transform: scale(1.1);
}

/* Subtle motion cue for main + debugger menu items (exclude auth links). */
.nav-links:not(.auth-links) a:hover {
  transform: translateX(2px);
  color: #111827;
}

.nav-links:not(.auth-links) a:active {
  transform: translateX(1px);
}

.nav-links:not(.auth-links) a:hover img:not(.sidebar-profile-pic) {
  transform: translateX(1px) scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .nav-links:not(.auth-links) a:hover,
  .nav-links:not(.auth-links) a:active {
    transform: none;
  }

  .nav-links:not(.auth-links) a:hover img:not(.sidebar-profile-pic) {
    transform: none;
  }
}

.nav-links li.is-active > a img:not(.sidebar-profile-pic) {
  filter: opacity(1);
}

/* Match main page headers to the Menu font */
.home-sections .home-hero h2,
.home-sections .leaders-title,
.home-sections .recent-questions-title h3,
.home-sections .ladder-header h3,
.home-sections .round-highs-title h3,
.home-sections .season-free-title h3 {
  font-family: var(--font-sans);
}

/* Sidebar divider */
.sidebar-divider {
  height: 2px;
  background: #E5E7EB;
  margin: 1rem 0 0.5rem 0;
  border-radius: 1px;
}

/* Auth links styling */
.auth-links {
  margin-top: auto;
  padding-top: 0;
  gap: 0.2rem !important;
}

/* User profile item in sidebar */
.user-profile-item .user-profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.user-profile-item .user-profile-link:hover {
  background: transparent;
  color: #111827;
  transform: translateX(2px);
  border-color: transparent;
  box-shadow: none;
}

.sidebar-profile-pic {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E5E7EB;
  transition: all 0.3s ease;
  filter: opacity(0.9);
  flex-shrink: 0;
}

.user-profile-link:hover .sidebar-profile-pic {
  border-color: #E5E7EB;
  filter: opacity(0.9);
  transform: none;
}

.username-text {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ensure auth links match main nav styling */
.auth-links a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Hide empty auth buttons in top bar */
.top-bar .auth-buttons:empty {
  display: none;
}

/* Auth icon styling - match existing icons */
.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-blue);
  transition: all 0.3s ease;
  opacity: 0.8;
  z-index: 2;
  position: relative;
}

.nav-links a:hover .auth-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Add subtle animation on page load */
.sidebar {
  animation: slideInFromLeft 0.6s ease-out;
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Ensure content elements align properly */
.content-area > *:first-child {
  margin-top: 0;
}

/* LAYOUT ROW - DEPRECATED (keeping for compatibility) */
.layout-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.sidebar {
  width: 220px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 1.5rem;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue), var(--brand-blue));
  border-radius: 16px 16px 0 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0;
}

/* Ensure main content elements align properly */
.main-content > *:first-child {
  margin-top: 0;
}


/* Responsive column widths */
.left-col {
  width: 40%; /* Increased from 32% to 40% (25% wider: 32% x 1.25 = 40%) */
  max-width: 40%;
  flex: 0 0 40%;
  box-sizing: border-box;
  min-width: 0;
}

.right-col {
  width: 58.5%; /* Reduced from 66.5% to 58.5% to accommodate wider left column */
  max-width: 58.5%;
  flex: 0 0 58.5%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  position: relative; /* Create stacking context */
  z-index: 1; /* Ensure right column has proper stacking */
  overflow: visible; /* Allow content but manage stacking */
}

/* Ensure all containers in the right column respect their container width */
.right-col > * {
  width: 100%;
  box-sizing: border-box;
  overflow: visible; /* Remove horizontal scrolling */
  min-width: 0;
}

/* Ensure all direct children of columns respect container width */
.left-col > *,
.right-col > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* TRENDING BLOCKS */
.trending-blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.trending-block {
  border-radius: 12px;
  color: #fff;
  padding: 1.25rem; /* Bigger padding */
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  gap: 1.25rem;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
  width: 100%;
  min-height: 140px; /* BIGGER height */
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trending-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.trending-block img {
  width: 100px; /* BIGGER images */
  height: 100px; /* BIGGER images */
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.trending-block > div {
  flex: 1;
  font-size: 0.95rem; /* Bigger text */
  line-height: 1.5;
}
.trending-block strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem; /* Bigger text */
}
.trending-block.blue { background-color: var(--brand-blue); }
.trending-block.purple { background-color: #6A1B9A; }
.trending-block.maroon { background-color: #AD1457; }


/* FORMS ON LOGIN / SIGNUP / ACCOUNT - Modern Redesign */
.login-signup-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin-top: 2rem;
  padding: 1rem;
  min-height: calc(100vh - 200px);
}

.styled-form-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: none;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 450px;
  margin-bottom: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.styled-form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue), var(--brand-blue));
  border-radius: 20px 20px 0 0;
}

.styled-form-container fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.styled-form-container legend {
  font-size: 2rem;
  font-weight: 700;
  color: #0A1931;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
  padding: 0;
  border: none;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.styled-form-container .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-control-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control.form-control-lg {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  background: #F8FAFC;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #1F2937;
}

.form-control.form-control-lg:focus {
  border-color: #0A1931;
  background: white;
  box-shadow: 0 0 0 4px rgba(10, 25, 49, 0.1), 0 4px 12px rgba(10, 25, 49, 0.15);
  outline: none;
  transform: translateY(-2px);
}

.form-control.form-control-lg::placeholder {
  color: #9CA3AF;
  font-style: normal;
  font-weight: 400;
}

/* Enhanced button styling */
.styled-form-container .btn.btn-outline-info {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 50%, var(--brand-blue) 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.styled-form-container .btn.btn-outline-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.styled-form-container .btn.btn-outline-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--brand-blue-rgb), 0.3);
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 50%, var(--brand-blue) 100%);
}

.styled-form-container .btn.btn-outline-info:hover::before {
  left: 100%;
}

.styled-form-container .btn.btn-outline-info:active {
  transform: translateY(-1px);
}

/* Form validation styling */
.is-invalid {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.invalid-feedback {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: block;
  font-weight: 500;
}

/* Link styling */
.signup-login-link, .forgot-pass-link {
  text-decoration: none;
  font-size: 0.9rem;
  color: #0A1931;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.signup-login-link::after, .forgot-pass-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue));
  transition: width 0.3s ease;
}

.signup-login-link:hover::after, .forgot-pass-link:hover::after {
  width: 100%;
}

.signup-login-link:hover, .forgot-pass-link:hover {
  color: var(--brand-blue);
  text-decoration: none;
}

.border-bottom.mb-4 {
  border-bottom: none !important;
  margin-bottom: 1rem !important;
}

.border-top.pt-3 {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #E5E7EB;
  text-align: center;
}

.text-muted {
  color: #6B7280 !important;
  font-size: 0.9rem;
}

/* ACCOUNT PAGE STYLES - Match login/signup page design */
.account-info-wrapper {
  margin-bottom: 2rem;
  margin-top: 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ACCOUNT PAGE STYLES - Complete Implementation */
.account-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.account-layout {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  width: 100%;
  align-items: stretch;
}

.account-left-column {
  flex: 0 0 40%;
  max-width: 600px;
  display: flex;
}

.account-right-column {
  flex: 1;
  min-width: 0;
  display: flex;
}

/* Account Section Styling */
.account-section {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #E5E7EB;
  margin-top: -0.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.account-header {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  padding: 1.5rem;
  border-bottom: none;
  min-height: 70px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.account-header h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.account-header svg {
  flex-shrink: 0;
}

.account-content {
  padding: 2rem;
  flex: 1;
}

/* Account Profile Section */
.account-profile-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #E5E7EB;
}

.profile-image-container {
  flex-shrink: 0;
}

.profile-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #E5E7EB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0A1931;
  margin: 0 0 0.25rem 0;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-email {
  color: #6B7280;
  font-size: 1rem;
  margin: 0;
}

/* Account Update Form */
.account-update-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  background: #F9FAFB;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #1F2937;
}

.form-input:focus {
  border-color: #0A1931;
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 25, 49, 0.1);
  outline: none;
}

.form-input.is-invalid {
  border-color: #EF4444;
  background: #FEF2F2;
}

.error-feedback {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* File Upload Section */
.file-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-upload-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-upload-input {
  padding: 0.75rem;
  font-size: 0.9rem;
  border: 2px dashed #D1D5DB;
  border-radius: 8px;
  background: #F9FAFB;
  transition: all 0.3s ease;
  cursor: pointer;
  color: #6B7280;
}

.file-upload-input:hover {
  border-color: #0A1931;
  background: #F3F4F6;
  color: #0A1931;
}

.file-upload-input:focus {
  outline: none;
  border-color: #0A1931;
  box-shadow: 0 0 0 3px rgba(10, 25, 49, 0.1);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn-update {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-update:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--brand-blue-rgb), 0.3);
}

.btn-update:active {
  transform: translateY(0);
}

/* Logout Section */
.logout-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #E5E7EB;
  display: flex;
  justify-content: center;
}

.logout-section .logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #DC2626;
  text-decoration: none;
  border: 2px solid #DC2626;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.logout-section .logout-link:hover {
  background: #DC2626;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.logout-section .logout-link svg {
  flex-shrink: 0;
}

/* Bookmarks Section */
.bookmarks-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #E5E7EB;
  margin-top: -0.5rem;
}

.bookmarks-header {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  transition: background 0.3s ease;
  border: none;
  min-height: 70px;
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  appearance: none;
}

.bookmarks-header:hover {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue) 100%);
}

.bookmarks-header h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.bookmarks-header svg {
  flex-shrink: 0;
}

.bookmarks-content {
  flex: 1;
  padding: 2rem;
  display: block;
  background: #FAFBFC;
}

.bookmarks-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: #6B7280;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #E5E7EB;
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.bookmark-card {
  --bookmark-accent: var(--brand-blue);
  background: linear-gradient(160deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: none;
}

.bookmark-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bookmark-accent);
}

.bookmark-card::after {
  content: none;
}

.bookmark-card:hover {
  transform: translateY(-3px);
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.55);
}

.bookmark-card[data-bookmark-type="player"],
.bookmark-card[data-bookmark-type="player-stats"] {
  --bookmark-accent: #1D4ED8;
}

.bookmark-card[data-bookmark-type="team"],
.bookmark-card[data-bookmark-type="team-stats"] {
  --bookmark-accent: #0F766E;
}

.bookmark-card[data-bookmark-type="match"],
.bookmark-card[data-bookmark-type="game-info"] {
  --bookmark-accent: #B45309;
}

.bookmark-card[data-bookmark-type="coach"] {
  --bookmark-accent: #334155;
}

.bookmark-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-right: 2rem;
  position: relative;
  z-index: 1;
}

.bookmark-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bookmark-accent);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: none;
  flex-shrink: 0;
}

.bookmark-icon i {
  font-size: 0.84rem;
}

.bookmark-remove-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: #FFFFFF;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  z-index: 10;
  opacity: 0.72;
  color: #DC2626;
  box-shadow: none;
}

.bookmark-remove-btn i {
  font-size: 0.78rem;
  line-height: 1;
}

.bookmark-remove-btn::before {
  content: none;
}

.bookmark-card:hover .bookmark-remove-btn,
.bookmark-remove-btn:focus-visible {
  opacity: 1;
  transform: scale(1.03);
}

.bookmark-remove-btn:hover {
  background: rgba(254, 242, 242, 0.95);
  transform: scale(1.1);
  border-color: rgba(239, 68, 68, 0.6);
}

/* When removing - use unbookmark shake from bookmark-bubble.css */
.bookmark-remove-btn.removing {
  animation: unbookmarkShake 0.5s ease;
}

.bookmark-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.42;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
  transition: color 0.2s ease;
  position: relative;
  z-index: 1;
}

.bookmark-title:hover {
  color: var(--bookmark-accent);
}

.bookmark-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #64748B;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  position: relative;
  z-index: 1;
}

.bookmark-date {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-date i {
  color: var(--bookmark-accent);
  font-size: 0.78rem;
}

.bookmark-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(148, 163, 184, 0.35);
  max-width: calc(100% - 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-open-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--bookmark-accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.bookmark-open-link:hover {
  color: #0A1931;
}

.bookmark-open-link i {
  font-size: 0.68rem;
}

@media (max-width: 820px) {
  .bookmarks-grid {
    grid-template-columns: 1fr;
  }

  .bookmark-card {
    min-height: 0;
  }

  .bookmark-meta {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
}

.no-bookmarks {
  text-align: center;
  padding: 4rem 2rem;
  color: #6B7280;
}

.no-bookmarks p {
  margin: 0.5rem 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.no-bookmarks p:first-child {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.no-bookmarks a {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.no-bookmarks a:hover {
  color: #0A1931;
  border-bottom-color: var(--brand-blue);
}

.bookmarks-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0 1rem 1rem;
  color: #4B5563;
  font-size: 0.95rem;
}

.bookmarks-pagination button {
  appearance: none;
  border: 1px solid #D1D5DB;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bookmarks-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bookmarks-pagination button:not(:disabled):hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.error {
  color: #EF4444;
  text-align: center;
  padding: 2rem;
  font-weight: 500;
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Ensure proper layout for games carousel */
.games-carousel {
  width: 100%;
  margin: 0;
}

/* Splits Controls Styling */
.splits-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 8px;
  margin-bottom: 1rem;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.splits-controls select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background-color: white;
  color: var(--text-primary, #111827);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 140px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: all 0.2s ease;
}

.splits-controls select:hover {
  border-color: #9CA3AF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.splits-controls select:focus {
  outline: none;
  border-color: #0A1931;
  box-shadow: 0 0 0 3px rgba(10, 25, 49, 0.1);
}

/* Toggle Switch for Totals/Averages */
.splits-controls .toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.splits-controls .toggle-switch span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #6B7280);
}

.splits-controls .switch {
  position: relative;
  width: 48px;
  height: 24px;
  background: #E5E7EB;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.splits-controls .switch.active {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
}

.splits-controls .switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.splits-controls .switch.active .switch-slider {
  transform: translateX(24px);
}

/* Enhanced Splits Controls */
.splits-controls-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.primary-filters, .secondary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.secondary-filters {
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
}

.filter-dropdown {
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: white;
  font-size: 0.875rem;
  color: #1F2937;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L2 5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.filter-dropdown:hover {
  border-color: #9CA3AF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-dropdown:focus {
  outline: none;
  border-color: #0A1931;
  box-shadow: 0 0 0 3px rgba(10, 25, 49, 0.1);
}

.filter-secondary {
  background-color: #F9FAFB;
}

.toggle-group {
  display: flex;
  margin-left: auto;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:not(:last-child) {
  border-right: 1px solid #E5E7EB;
}

.toggle-btn:hover {
  background: #F9FAFB;
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  color: white;
}

.reset-filters-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reset-filters-btn:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}

/* Concentric Table Styling */
.concentric-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

.concentric-splits-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.concentric-splits-table thead {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
}

.concentric-splits-table th {
  padding: 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6B7280;
  border-bottom: 2px solid #E5E7EB;
}

.concentric-splits-table th.split-label {
  min-width: 120px;
}

.concentric-splits-table tbody tr {
  transition: background 0.2s ease;
}

.concentric-splits-table tbody tr:hover {
  background: #F9FAFB;
}

.concentric-splits-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #1F2937;
  border-bottom: 1px solid #F3F4F6;
}

.concentric-splits-table td.split-label {
  font-weight: 600;
  color: #111827;
}

/* Row Styling */
.split-row.primary {
  background: linear-gradient(to right, rgba(10, 25, 49, 0.03), transparent);
}

.split-row.secondary {
  background: linear-gradient(to right, rgba(19, 42, 77, 0.02), transparent);
}

.split-row.total {
  background: #F8FAFC;
  font-weight: 600;
}

.split-row.win td.split-label {
  color: #059669;
}

.split-row.loss td.split-label {
  color: #DC2626;
}

.split-row.draw td.split-label {
  color: #F59E0B;
}

/* Value Styling */
.concentric-splits-table .positive {
  color: #059669;
  font-weight: 600;
}

.concentric-splits-table .negative {
  color: #DC2626;
  font-weight: 600;
}

/* Summary Cards */
.splits-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.summary-card {
  background: linear-gradient(135deg, #F8FAFC, white);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0A1931;
  margin-bottom: 0.25rem;
}

.summary-detail {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Old Splits Table Styling (for backward compatibility) */
.splits-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.splits-table .table-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #6B7280);
  border-bottom: 2px solid #E5E7EB;
}

.splits-table #splitsTableBody {
  padding: 0;
}

.splits-table .table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.2s ease;
  align-items: center;
  cursor: default;
}

.splits-table .table-row:hover {
  background: #F9FAFB;
}

.splits-table .table-row:last-child {
  border-bottom: none;
}

/* Season leaders section on home page */
.season-leaders-section {
  width: 100%;
  margin-bottom: 2rem;
}

/* AFL LADDER COMPONENT */
.afl-ladder {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 1.5rem; /* Match season leaders padding */
  margin: 0; /* Remove all margins */
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Match other components */
  position: relative;
  overflow: hidden; /* Clip top accent to rounded container */
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  height: fit-content; /* Adjust to content */
}

.afl-ladder::before {
  content: '';
  position: absolute;
  top: -1px; /* Cover 1px border to remove gap */
  left: -1px; /* Extend over left border */
  right: -1px; /* Extend over right border */
  height: 6px; /* Line + cover for borders */
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue), var(--brand-blue));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

.ladder-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #E5E7EB;
}

.ladder-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0A1931;
  margin: 0;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ladder-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: auto;
}

.ladder-table thead th:first-child {
  width: 40%; /* Reduced to give more space to stats */
  min-width: 180px;
}

.ladder-table thead th:not(:first-child) {
  width: 8%;
  min-width: 50px;
}

.ladder-table thead th {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
  color: #374151;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.4rem;
  border-bottom: 2px solid #E5E7EB;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ladder-table thead th:first-child {
  text-align: left;
  border-radius: 8px 0 0 0;
}

.ladder-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.ladder-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #F3F4F6;
}

.ladder-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(10, 25, 49, 0.03), rgba(19, 42, 77, 0.02));
  transform: translateX(2px);
}

.ladder-table tbody tr.finals-line {
  border-bottom: 3px solid var(--brand-blue);
  box-shadow: 0 3px 0 rgba(59, 130, 246, 0.1);
  position: relative;
  z-index: 2;
}

.ladder-table td {
  padding: 0.4rem 0.3rem;
  text-align: center;
  font-weight: 500;
  color: #374151;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left !important;
  padding: 0 !important;
  width: 100%;
}

.team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.team-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-cell .team-name {
  font-weight: 600;
  color: #1F2937;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: 110px;
  transition: color 0.2s ease;
}

.team-name-link {
  text-decoration: none;
  color: inherit;
}

.team-name-link:hover .team-name {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.team-rank {
  background: linear-gradient(135deg, #6B7280, #4B5563);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.team-rank.top-four {
  background: linear-gradient(135deg, #10B981, #059669);
}

.team-rank.top-eight {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue));
}

.ladder-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  font-size: 0.8rem;
}

.stat-value {
  font-weight: 600;
  color: #1F2937;
  font-size: 0.8rem;
}

.stat-value.wins {
  color: #059669;
}

.stat-value.losses {
  color: #DC2626;
}

.stat-value.percentage {
  color: #7C3AED;
  font-weight: 700;
}

.points-cell {
  font-weight: 700;
  color: #0A1931;
  font-size: 0.85rem;
}

.finals-divider {
  position: relative;
  margin: 0;
  padding: 0;
}

.finals-divider::after {
  content: 'Finals';
  position: absolute;
  right: 1rem;
  top: -12px;
  background: var(--brand-blue);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .ladder-table {
    font-size: 0.8rem;
  }
  
  .team-cell {
    gap: 0.5rem;
  }
  
  .team-logo {
    width: 20px;
    height: 20px;
  }
  
  .team-rank {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .afl-ladder {
    padding: 1rem;
    margin: 0 0 0 0; /* Removed top margin to align with stat cards */
    width: 100%;
    margin-right: 0;
  }
  
  .ladder-table {
    font-size: 0.75rem;
  }
  
  .ladder-table thead th,
  .ladder-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .ladder-table thead th:first-child {
    width: 50%;
    min-width: 150px;
  }
  
  .team-cell {
    gap: 0.4rem;
    padding: 0 !important;
  }
  
  .team-cell .team-name {
    min-width: 100px;
    font-size: 0.8rem;
  }
  
  .team-logo {
    width: 18px;
    height: 18px;
  }
  
  .team-rank {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
  
  .ladder-header h3 {
    font-size: 1.25rem;
  }
}

/* Carousel Responsive Design */
@media (max-width: 820px) {
  .games-carousel {
    margin: 0.5rem 0;
  }

  .games-carousel-divider {
    font-size: 0.5rem;
    gap: 0.5rem;
  }

  .games-carousel-round {
    font-size: 0.56rem;
  }
  
  .scorecards-container {
    --carousel-gap: 0.4rem;
    --carousel-tile-min: 120px;
    gap: var(--carousel-gap);
    margin: 0;
    width: 100%;
  }
  
  .carousel-arrow {
    width: 1.26rem;
    height: 1.26rem;
    font-size: 0.88rem;
  }
  
  
  [data-testid="scorecards-container"] [data-testid="score-tile"] {
    min-width: var(--carousel-tile-width, var(--carousel-tile-min));
    flex: 0 0 var(--carousel-tile-width, var(--carousel-tile-min));
    max-width: var(--carousel-tile-width, var(--carousel-tile-min));
    padding: 0.42rem;
  }
  
  .score-logo {
    width: 14px;
    height: 14px;
  }
  
  .score-tile .team-name {
    font-size: 0.65rem;
  }

  .score-tile .team-name-label--full {
    display: none;
  }

  .score-tile .team-name-label--abbr {
    display: inline;
  }
  
  .score-score {
    font-size: 0.7rem;
  }

  .game-status {
    font-size: 0.52rem;
    padding: 0;
  }

  .game-status--date {
    font-size: 0.54rem;
  }

  .game-live-period {
    font-size: 0.5rem;
  }

  .game-round {
    max-width: 52%;
  }

  .game-venue {
    max-width: 40%;
  }

  .game-time {
    font-size: 0.54rem;
  }
}

@media (max-width: 480px) {
  .games-carousel-divider {
    font-size: 0.46rem;
    gap: 0.42rem;
  }

  .games-carousel-round {
    font-size: 0.52rem;
  }

  .scorecards-container {
    --carousel-gap: 0.35rem;
    --carousel-tile-min: 120px;
    gap: var(--carousel-gap);
    margin: 0;
    width: 100%;
  }

  [data-testid="scorecards-container"] [data-testid="score-tile"] {
    min-width: var(--carousel-tile-width, var(--carousel-tile-min));
    flex: 0 0 var(--carousel-tile-width, var(--carousel-tile-min));
    max-width: var(--carousel-tile-width, var(--carousel-tile-min));
    padding: 0.35rem;
  }
  
  .carousel-arrow {
    width: 1.16rem;
    height: 1.16rem;
  }
  
  .prev-arrow::before,
  .next-arrow::before {
    font-size: 0.82rem;
  }

  .game-status {
    font-size: 0.5rem;
    padding: 0;
  }

  .game-status--date {
    font-size: 0.52rem;
  }

  .game-live-period {
    font-size: 0.46rem;
  }

  .game-round {
    max-width: 50%;
  }

  .game-venue {
    max-width: 38%;
  }
}

/* Home Page Responsive Design Updates - Fixed Margins and Sizing */
@media (max-width: 1200px) {
  /* Adjust for medium screens */
  .season-leaders-section {
    width: 95%;
    padding: 1.5rem 20px;
  }
  
  .content-row {
    width: 95%;
    padding: 0 20px;
    grid-template-columns: 380px 1fr; /* Slightly smaller left column */
  }
}

@media (max-width: 768px) {
  /* Content row - stack on tablet */
  .content-row {
    width: 95%;
    grid-template-columns: 1fr; /* Stack vertically */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 0 15px;
  }
  
  /* Season leaders on tablet */
  .season-leaders-section {
    width: 95%;
    padding: 1rem 15px;
    margin-bottom: 1.5rem;
  }
  
  /* Trending blocks on tablet - keep reasonable size */
  .trending-block {
    min-height: 110px;
    padding: 1rem;
  }
  
  .trending-block img {
    width: 70px;
    height: 70px;
  }
  
  .trending-block > div {
    font-size: 0.9rem;
  }
  
  .trending-block strong {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  /* Very small screens */
  .season-leaders-section {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 0;
  }
  
  .content-row {
    width: 100%;
    padding: 0 0.75rem;
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Trending blocks - even smaller */
  .trending-block {
    min-height: 90px;
    padding: 0.5rem;
    gap: 0.75rem;
  }
  
  .trending-block img {
    width: 50px;
    height: 50px;
  }
  
  .trending-block > div {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  /* AFL Ladder - more compact */
  .afl-ladder {
    padding: 0.75rem;
  }
  
  .ladder-header h3 {
    font-size: 1.1rem;
  }
  
  .ladder-table {
    font-size: 0.7rem;
  }
}

/* Ensure proper alignment at all screen sizes */
/* Removed forced expansion to preserve consistent max-width with Season Leaders */
/* AFL Ladder rebuild - 2025-10 */
.afl-ladder .ladder-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.15rem;
}

.afl-ladder .ladder-grid-head,
.afl-ladder .ladder-item {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) repeat(5, minmax(0, 0.52fr)) minmax(0, 0.65fr);
  align-items: center;
  column-gap: 0.55rem;
}

.afl-ladder .ladder-grid-head {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  padding: 0.25rem 0.2rem;
}

.afl-ladder .ladder-head.club {
  justify-self: flex-start;
}

.afl-ladder .ladder-grid-body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.afl-ladder .ladder-item {
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid #E2E8F0;
  position: relative;
}

.afl-ladder .ladder-item:last-of-type {
  border-bottom: none;
}

.afl-ladder .ladder-item:hover {
  background: rgba(148, 163, 184, 0.08);
}

.afl-ladder .ladder-cell.club {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.afl-ladder .team-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.74rem;
  background: #111827;
  color: #fff;
}

.afl-ladder .team-rank.top-four {
  background: #059669;
}

.afl-ladder .team-rank.top-eight {
  background: var(--brand-blue);
}

.afl-ladder .team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.afl-ladder .team-name-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.afl-ladder .team-name {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.afl-ladder .team-name--abbr {
  display: none;
}

.afl-ladder .ladder-cell.stat {
  font-size: 0.76rem;
  color: #1F2937;
  justify-self: center;
}

.afl-ladder .points-cell {
  font-weight: 700;
}

.afl-ladder .ladder-divider {
  height: 3px;
  border-radius: 999px;
  background: var(--brand-blue);
  box-shadow: none;
  margin: 0;
}

.afl-ladder .finals-boundary {
  border-bottom: none;
  margin-bottom: 0;
}

.afl-ladder .finals-boundary + .ladder-divider + .ladder-item {
  margin-top: 0;
}

@media (max-width: 820px) {
  .afl-ladder .ladder-grid-head,
  .afl-ladder .ladder-item {
    grid-template-columns: minmax(0, 2.3fr) repeat(5, minmax(0, 0.6fr)) minmax(0, 0.8fr);
    column-gap: 0.4rem;
  }

  .afl-ladder .ladder-item {
    padding: 0.45rem 0.1rem;
  }

  .afl-ladder .team-name--full {
    display: none;
  }

  .afl-ladder .team-name--abbr {
    display: inline;
  }

  .afl-ladder .team-logo {
    width: 22px;
    height: 22px;
  }

  .afl-ladder .team-name {
    font-size: 0.72rem;
  }
  .afl-ladder .ladder-divider {
    margin: 0;
  }
}

.ladder-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  gap: 0.4rem;
}

@media (max-width: 820px) {
  .ladder-toggle {
    display: inline-flex;
  }

  .afl-ladder .ladder-item.is-extra,
  .afl-ladder .ladder-divider.is-extra {
    display: none;
  }

  .afl-ladder.ladder-expanded .ladder-item.is-extra {
    display: grid;
  }

  .afl-ladder.ladder-expanded .ladder-divider.is-extra {
    display: block;
  }

  .afl-ladder .ladder-item.is-hidden {
    display: none;
  }

  .afl-ladder.ladder-expanded .ladder-item.is-hidden {
    display: grid;
  }

  .season-free-row.is-collapsed {
    display: none;
  }

  .season-free-toggle-input:checked ~ .season-free-grid .season-free-row.is-collapsed {
    display: grid;
  }
}
/* Auth icon fontawesome alignment */
.auth-icon {
  font-size: 0;
}

.auth-icon i {
  font-size: 1rem;
  color: var(--brand-blue);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 20000;
  display: flex;
  justify-content: center;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner__inner {
  max-width: 900px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner__text {
  flex: 1 1 320px;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.5;
}
.cookie-banner__text a {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
}
.cookie-banner__text a:hover,
.cookie-banner__text a:focus {
  text-decoration: underline;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cookie-btn {
  appearance: none;
  border: 2px solid var(--brand-blue);
  background: #ffffff;
  color: var(--brand-blue);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 25, 49, 0.2);
}
.cookie-btn--primary {
  background: var(--brand-blue);
  color: #ffffff;
}
.cookie-btn--primary:hover {
  background: #081226;
}
@media (max-width: 640px) {
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  .cookie-banner__inner {
    padding: 1rem 1.1rem;
  }
}



/* FOOTER */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.75rem 0;
  background-color: var(--brand-blue);
  color: rgba(226, 232, 240, 0.95);
}
.site-footer .footer-inner {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding-x);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.footer-brand-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.footer-version {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.85);
}
.footer-active {
  font-size: 0.86rem;
  color: rgba(226, 232, 240, 0.85);
}
.footer-active strong {
  color: #ffffff;
}
.footer-separator {
  color: rgba(255, 255, 255, 0.45);
}
.footer-contact {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.footer-email-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.footer-email-wrap i {
  font-size: 0.85rem;
  color: rgba(191, 219, 254, 0.95);
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(191, 219, 254, 0.95);
  font-weight: 600;
  text-decoration: none;
}
.footer-contact a:hover,
.footer-contact a:focus {
  text-decoration: underline;
}
.footer-x-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}
.footer-x-link svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}
.footer-x-link:hover,
.footer-x-link:focus {
  text-decoration: none;
  color: #ffffff;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.85);
}
.footer-legal a {
  color: rgba(191, 219, 254, 0.95);
  font-weight: 600;
  text-decoration: none;
}
.footer-legal a:hover,
.footer-legal a:focus {
  text-decoration: underline;
}
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.12);
  color: rgba(248, 250, 252, 0.95);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-disclaimer {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.5;
}
.footer-team-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.footer-team-logos a {
  display: inline-flex;
  flex-shrink: 0;
}
.footer-team-logos .team-logo {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
@media (max-width: 640px) {
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .footer-stats {
    gap: 0.35rem;
  }
  .footer-separator {
    display: none;
  }
  .footer-team-logos {
    justify-content: flex-start;
    gap: 0.5rem;
  }
  .footer-team-logos .team-logo {
    width: 24px;
    height: 24px;
  }
}

/* Team logo borders */
img.team-logo,
img.score-logo,
img.opponent-logo,
img.opponent-logo-small,
img.team-logo-inline,
img.profile-team-logo,
.fs-hero-logo img,
.query-bubble-section .top-team-logo img,
.team-card .team-logo img {
  border: 1px solid var(--ui-border, #E5E7EB);
}
.flat-art-portrait img[src*="/static/images/player_flat_art/"],
img[src*="/static/images/player_flat_art/"] {
  object-fit: contain !important;
  image-rendering: auto;
}

/* Player page mobile/compact fixes (<= 820px) */
#player-profile .tabs-more-indicator {
  display: none;
}

@media (max-width: 820px) {
  #player-profile .player-image-container {
    margin-left: -0.35rem !important;
  }

  #player-profile .quick-stats {
    display: none !important;
  }

  #player-profile .player-info-header {
    text-align: left;
    align-items: flex-start;
  }

  #player-profile .player-title-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #player-profile .player-name {
    font-size: clamp(2.2rem, 7vw, 2.8rem) !important;
    text-align: left;
  }

  #player-profile .player-meta-info {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
  }

  #player-profile .meta-item {
    justify-content: flex-start;
  }

  #player-profile [data-testid="tabs-menu"] {
    position: relative;
  }

  #player-profile .profile-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-right: 2rem;
  }

  #player-profile .profile-nav::-webkit-scrollbar {
    display: none;
  }

  #player-profile .nav-tab {
    flex: 0 0 auto;
  }

  #player-profile .tabs-more-indicator {
    display: block;
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  }

  #player-profile .tabs-more-indicator::after {
    content: '>';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #64748b;
  }

  #player-profile #recentGamesTable th:nth-child(2),
  #player-profile #recentGamesTable td:nth-child(2),
  #player-profile #gameLogTable th:nth-child(2),
  #player-profile #gameLogTable td:nth-child(2) {
    min-width: 60px;
    padding-right: 0.2rem;
  }

  #player-profile #recentGamesTable th:nth-child(3),
  #player-profile #recentGamesTable td:nth-child(3),
  #player-profile #gameLogTable th:nth-child(3),
  #player-profile #gameLogTable td:nth-child(3) {
    min-width: 54px;
    padding-left: 0.2rem;
  }

  #player-profile #statistics .card-header,
  #player-profile #trends .card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  #player-profile #statistics .stats-header-controls {
    position: static !important;
    transform: none !important;
    margin-left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  #player-profile #statistics .stats-header-controls .toggle-group,
  #player-profile #trends .toggle-group {
    align-self: flex-start;
  }

  #player-profile #statistics .toggle-switch,
  #player-profile #trends .toggle-switch {
    width: 30px;
    height: 14px;
    --toggle-knob-size: 12px;
  }

  #player-profile .stat-filter-title {
    font-size: 0.75rem;
  }
}

