:root {
  --navy: #0d1c32;
  --navy-soft: #172b49;
  --gold: #cba72f;
  --gold-light: #ffe088;
  --ink: #1b1b1d;
  --muted: #626b78;
  --surface: #ffffff;
  --surface-low: #f5f3f5;
  --line: #d9dde5;
  --green: #16a34a;
  --red: #ba1a1a;
  --blue: #315f92;
  --wine: #811636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fbf9fb;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(217, 221, 229, 0.75);
  box-shadow: 0 4px 20px rgba(10, 25, 47, 0.05);
  left: 0;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 40;
}

.topbar-inner,
.footer-inner,
.dashboard-shell,
.page-hero,
.ranking-table-section,
.ranking-hero,
.prize-hero,
.prize-grid,
.rules-band,
.fixture-groups {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 24px;
}

.brand {
  align-items: center;
  color: var(--navy);
  display: flex;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 26px;
  font-weight: 800;
  gap: 10px;
  text-transform: uppercase;
}

.brand-icon {
  color: var(--gold);
}

.nav-toggle {
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  display: none;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 46px;
}

.nav-toggle .material-symbols-outlined {
  font-size: 26px;
}

.nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 8px;
  justify-content: center;
  min-width: 0;
}

.nav a,
.nav-group > button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 0;
}

.nav-group > button {
  align-items: center;
  display: inline-flex;
  gap: 2px;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

.nav-group > button .material-symbols-outlined {
  font-size: 18px;
}

.nav a.active,
.nav a:hover,
.nav-group > button.active,
.nav-group > button:hover {
  background: transparent;
  border-color: var(--gold);
  color: var(--navy);
}

.nav-group {
  position: relative;
}

.nav-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(10, 25, 47, 0.14);
  display: none;
  left: 50%;
  min-width: 180px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 80;
}

.nav-menu::before {
  content: "";
  height: 10px;
  left: 0;
  position: absolute;
  right: 0;
  top: -10px;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  display: grid;
}

.nav-menu a {
  border-bottom: 0;
  border-radius: 6px;
  display: block;
  padding: 10px 12px;
  white-space: nowrap;
}

.nav-menu a.active,
.nav-menu a:hover {
  background: var(--surface-low);
  color: var(--navy);
}

.user-chip {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 12px;
  font-weight: 800;
}

.avatar {
  align-items: center;
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 999px;
  color: #fff;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.avatar.large {
  font-size: 24px;
  height: 58px;
  width: 58px;
}

.auth-link {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.auth-link.primary {
  background: var(--navy);
  border-radius: 8px;
  color: #fff;
  padding: 10px 14px;
}

.logout-form {
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: auto;
  padding: 0;
}

.link-button:hover {
  background: transparent;
  color: var(--navy);
}

.messages {
  margin: 18px auto 0;
  max-width: 1152px;
  padding: 0 24px;
}

.dashboard-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  padding: 28px 24px 48px;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 24px;
}

.hero-card {
  background: var(--surface);
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(10, 25, 47, 0.12);
  overflow: hidden;
  padding: 24px;
}

.hero-top,
.section-title,
.table-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.live-badge {
  align-items: center;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  padding: 7px 12px;
  text-transform: uppercase;
}

.live-badge i {
  animation: pulse 1.8s infinite;
  background: var(--green);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.featured-match {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr auto 1fr;
  min-height: 220px;
  padding: 18px 0;
}

.team-block {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.team-flag {
  background: var(--surface-low);
  border: 2px solid rgba(13, 28, 50, 0.12);
  border-radius: 10px;
  height: 88px;
  object-fit: cover;
  width: 112px;
}

.team-block h3,
.scoreline,
h1,
h2 {
  font-family: "Barlow Condensed", Inter, sans-serif;
  margin: 0;
  text-transform: uppercase;
}

.team-block h3 {
  color: var(--navy);
  font-size: 28px;
}

.team-event-notes {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 180px;
  text-align: center;
}

.team-event-notes.empty {
  opacity: 0.7;
}

.scoreline {
  align-items: center;
  color: var(--navy);
  display: flex;
  font-size: 58px;
  font-weight: 800;
  gap: 14px;
}

.scoreline.small {
  display: inline-flex;
  font-size: 20px;
  gap: 6px;
  min-width: 62px;
  justify-content: center;
}

.scoreline span {
  color: var(--line);
}

.prediction-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
}

.prediction-panel p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.prediction-actions {
  display: block;
}

button,
.choice-button {
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.button-link {
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
}

.button-link.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--navy);
}

.choice-button {
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.choice-button small {
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.78;
  text-transform: uppercase;
}

.prediction-layout {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 1fr) minmax(118px, 0.7fr) minmax(160px, 1fr);
  width: 100%;
}

.team-pick,
.draw-pick {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.team-pick strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.15;
  min-height: 34px;
}

.draw-pick {
  align-content: center;
  text-align: center;
}

.draw-pick small,
.draw-pick em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.draw-pick em {
  font-size: 11px;
  font-weight: 600;
}

.prediction-outcome {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.prediction-outcome.success {
  background: #e7f7ed;
  color: #146c43;
}

.prediction-outcome.info {
  background: #e9f2ff;
  color: #1e56a0;
}

.prediction-outcome.warning {
  background: #fff1e8;
  color: #b45309;
}

.prediction-outcome.pending {
  background: #f3f4f6;
  color: #5b6472;
}

.score-prediction-inputs {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.score-input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 8px;
  text-align: center;
  width: 56px;
}

.score-input:disabled {
  background: var(--surface);
  opacity: 0.8;
}

button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--navy);
}

button:disabled,
.choice-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.choice-button.active,
button:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #241a00;
}

.choice-button.muted {
  background: #d8dde6;
  border-color: #c0c8d4;
  color: #5c6778;
}

.choice-button.muted small {
  opacity: 0.9;
}

.team-pick:has(.choice-button.active),
.draw-pick:has(.choice-button.active) {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.16);
}

.stats-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.profile-card,
.surface-card,
.fixture-card,
.table-wrap,
.rules-band article {
  background: var(--surface);
  border: 1px solid rgba(217, 221, 229, 0.9);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 25, 47, 0.06);
}

.stat-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  min-height: 150px;
  padding: 22px;
}

.stat-card span {
  color: var(--gold-light);
}

.stat-card small {
  color: rgba(255, 255, 255, 0.68);
  display: block;
  font-weight: 800;
  margin-top: 18px;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 44px;
  margin-top: 4px;
}

.surface-card,
.profile-card {
  padding: 22px;
}

.section-title h2,
.profile-card h2 {
  color: var(--navy);
  font-size: 28px;
}

.section-title a {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.compact-list,
.ranking-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-row,
.ranking-row,
.prize-row {
  align-items: center;
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.mini-flags {
  align-items: center;
  display: flex;
  gap: 8px;
}

.mini-flags img {
  border-radius: 4px;
  height: 28px;
  object-fit: cover;
  width: 38px;
}

.user-form {
  display: grid;
  gap: 10px;
}

.user-form input,
.search-box input {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
}

#user-status {
  color: var(--muted);
  margin: 12px 0 0;
}

.account-summary {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.account-summary strong,
.account-summary small {
  display: block;
}

.account-summary small {
  color: var(--muted);
  margin-top: 4px;
}

.page-hero,
.ranking-hero,
.prize-hero {
  padding: 42px 24px;
}

.page-hero {
  align-items: end;
  display: flex;
  justify-content: space-between;
}

.page-hero.compact {
  padding-bottom: 24px;
}

.page-copy {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 680px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  color: var(--navy);
  font-size: 56px;
  line-height: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message {
  border-radius: 8px;
  margin: 0 auto 16px;
  max-width: 1152px;
  padding: 12px 14px;
}

.message.ok {
  background: #e8f5f1;
  color: #155e52;
}

.message.error {
  background: #fff0ed;
  color: var(--red);
}

.fixture-groups {
  display: grid;
  gap: 24px;
  padding: 0 24px 48px;
}

.fixture-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 18px;
  max-width: 1200px;
  padding: 0 24px;
}

.fixture-filter {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
}

.fixture-filter.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.fixture-date-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto 20px;
  max-width: 1152px;
  padding: 16px;
}

.fixture-date-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.fixture-date-heading h2 {
  color: var(--navy);
  font-size: 24px;
  margin: 2px 0 0;
}

.fixture-date-heading label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  min-width: 180px;
}

.fixture-date-heading input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 42px;
  padding: 0 10px;
}

.fixture-date-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.fixture-date-button {
  align-items: start;
  background: var(--surface-low);
  border: 1px solid var(--line);
  color: var(--navy);
  display: grid;
  flex: 0 0 138px;
  gap: 4px;
  justify-items: start;
  min-height: 68px;
  padding: 10px 12px;
  text-align: left;
}

.fixture-date-button strong {
  font-size: 14px;
  text-transform: capitalize;
}

.fixture-date-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fixture-date-button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.fixture-date-button.active span {
  color: rgba(255, 255, 255, 0.78);
}

.fixture-group h2 {
  color: var(--navy);
  font-size: 32px;
  margin-bottom: 12px;
}

.fixture-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.1fr);
  margin-bottom: 12px;
  padding: 18px;
}

.fixture-card .mini-flags {
  gap: 8px;
}

.fixture-card .mini-flags strong {
  color: var(--navy);
  font-size: inherit;
  line-height: 1.15;
}

.fixture-card .mini-flags img {
  height: 28px;
  width: 38px;
}

.fixture-card .scoreline.small {
  font-size: 20px;
  min-width: 62px;
}

.fixture-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

.goal-events-shell {
  margin-top: 12px;
}

.goal-events-button {
  font-size: 12px;
  min-height: 36px;
  padding: 0 12px;
}

.goal-events-button .material-symbols-outlined {
  font-size: 18px;
}

.goal-events-panel {
  margin-top: 10px;
}

.goal-events-list {
  display: grid;
  gap: 8px;
}

.goal-event-row {
  align-items: center;
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  display: grid;
  gap: 4px 10px;
  grid-template-columns: 42px 1fr;
  padding: 9px 10px;
}

.goal-event-row strong {
  color: var(--wine);
  grid-row: span 2;
}

.goal-event-row span {
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.goal-event-row small {
  color: var(--muted);
  font-size: 10px;
}

.empty-panel.compact {
  margin: 0;
  padding: 7px;
}

.countdown-pill {
  background: rgba(203, 167, 47, 0.14);
  border: 1px solid rgba(203, 167, 47, 0.34);
  border-radius: 999px;
  color: #6f5410;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
  padding: 5px 9px;
}

.test-pill {
  background: rgba(49, 95, 146, 0.12);
  border: 1px solid rgba(49, 95, 146, 0.28);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
  padding: 5px 9px;
}

.ranking-hero {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  text-align: center;
}

.ranking-hero h1,
.ranking-hero p {
  color: #fff;
}

.ranking-hero p {
  color: rgba(255, 255, 255, 0.72);
  margin: 8px auto 0;
  max-width: 640px;
}

.podium {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px auto 0;
  max-width: 820px;
}

.podium-card {
  border-radius: 12px 12px 0 0;
  color: var(--navy);
  min-height: 120px;
  padding: 22px;
}

.podium-card.first {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  min-height: 190px;
}

.podium-card.second {
  background: linear-gradient(135deg, #f2f0f2, #c6c6c7);
  min-height: 150px;
}

.podium-card.third {
  background: linear-gradient(135deg, #d6e3ff, #8fa9d1);
}

.podium-card small {
  display: block;
  font-weight: 900;
  text-transform: uppercase;
}

.podium-card strong {
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 32px;
  margin-top: 10px;
}

.ranking-table-section {
  padding: 24px;
}

.table-toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(10, 25, 47, 0.08);
  margin-bottom: 18px;
  padding: 14px;
}

.search-box {
  align-items: center;
  display: flex;
  gap: 8px;
  width: min(420px, 100%);
}

.search-box input {
  flex: 1;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
}

th {
  background: var(--surface-low);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.prize-hero {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(3, 15, 43, 0.86), rgba(3, 15, 43, 0.42) 44%, rgba(3, 15, 43, 0.06)),
    url("../img/worldcup-prize-banner.d42360ff3dc6.png");
  background-position: center;
  background-size: cover;
  color: #fff;
  display: flex;
  min-height: 360px;
  margin-top: 0;
  overflow: hidden;
  position: relative;
}

.prize-hero > div {
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.prize-hero h1 {
  color: #fff;
}

.prize-hero p {
  color: rgba(255, 255, 255, 0.72);
}


.prize-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 1fr 1fr;
  padding: 28px 24px;
}

.prize-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-left: 7px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 25, 47, 0.08);
  padding: 24px;
}

.prize-card strong {
  color: var(--gold);
  display: block;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 44px;
}

.rules-band {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 24px 48px;
}

.rules-band article {
  padding: 22px;
}

.rules-band span {
  color: var(--gold);
}

.rules-band p {
  color: var(--muted);
}

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 32px 24px;
}

.footer strong {
  color: #fff;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 24px;
  text-transform: uppercase;
}

.analysis-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: 340px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 24px 48px;
}

.analysis-detail {
  display: grid;
  gap: 24px;
}

.analysis-match-list,
.player-card-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.analysis-match-button {
  align-items: flex-start;
  background: var(--surface-low);
  border: 1px solid var(--line);
  color: var(--navy);
  display: grid;
  gap: 4px;
  justify-content: stretch;
  min-height: auto;
  padding: 12px;
  text-align: left;
}

.analysis-match-button.active,
.analysis-match-button:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.analysis-match-button small {
  color: inherit;
  opacity: 0.75;
}

.empty-panel {
  background: var(--surface-low);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 16px;
}

.api-panel,
.lineups-grid {
  margin-top: 16px;
}

.prediction-api-card {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
}

.prediction-api-card h3 {
  color: var(--navy);
  margin: 0 0 10px;
}

.percent-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.percent-grid span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.percent-grid strong {
  color: var(--gold);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 28px;
}

.lineups-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineup-card {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.lineup-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.lineup-head img {
  height: 54px;
  object-fit: contain;
  width: 54px;
}

.lineup-head h3,
.lineup-card h4 {
  color: var(--navy);
  margin: 0;
}

.lineup-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.player-chip-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 16px;
}

.player-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  grid-template-columns: 30px 1fr;
  padding: 8px;
}

.player-chip span {
  align-items: center;
  background: var(--navy);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.player-chip small {
  color: var(--muted);
  grid-column: 2;
}

.cards-rankings {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 24px 48px;
}

.card-dot {
  border-radius: 4px;
  display: inline-block;
  height: 28px;
  width: 20px;
}

.card-dot.yellow,
.card-count.yellow {
  background: #facc15;
  color: #241a00;
}

.card-dot.red,
.card-count.red {
  background: #dc2626;
  color: #fff;
}

.player-card {
  align-items: center;
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 46px 1fr 42px;
  padding: 10px;
}

.player-card img {
  background: #fff;
  border-radius: 999px;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.player-card strong,
.player-card small {
  display: block;
}

.player-card small {
  color: var(--muted);
  margin-top: 4px;
}

.card-count {
  align-items: center;
  border-radius: 6px;
  display: flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
}

.dashboard-shell.single {
  grid-template-columns: 1fr;
}

.history-stats,
.organizer-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-row,
.distribution-row {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.notification-row.warning {
  border-left-color: var(--gold);
}

.notification-row.success {
  border-left-color: var(--green);
}

.notification-row span,
.distribution-row small {
  color: var(--muted);
}

.distribution-row {
  grid-template-columns: minmax(240px, 1fr) repeat(4, auto);
  align-items: center;
}

#organizer-distribution {
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
}

.groups-board {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 24px 48px;
}

.group-table h2 {
  color: var(--navy);
  font-size: 28px;
  margin-bottom: 12px;
}

.knockout-picks {
  margin: 0 auto 56px;
  max-width: 900px;
}

.knockout-match-picks {
  margin: 0 auto 24px;
  max-width: 900px;
}

.section-title-with-help {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.help-chip {
  align-items: center;
  background: rgba(49, 95, 146, 0.08);
  border: 1px solid rgba(49, 95, 146, 0.2);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
}

.help-chip:hover {
  background: rgba(49, 95, 146, 0.14);
}

.help-chip .material-symbols-outlined {
  font-size: 18px;
}

.compact-copy {
  margin-bottom: 18px;
  max-width: 760px;
}

.knockout-match-picks-list {
  display: grid;
  gap: 16px;
}

.knockout-match-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.knockout-stage-pill {
  background: rgba(129, 22, 54, 0.08);
  border: 1px solid rgba(129, 22, 54, 0.2);
  border-radius: 999px;
  color: var(--wine);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
}

.knockout-match-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: -4px 0 0;
}

.knockout-inline-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knockout-inline-grid label {
  color: var(--navy);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.knockout-inline-grid input,
.knockout-inline-grid select {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  min-height: 44px;
  padding: 0 12px;
}

.knockout-result-buttons {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knockout-draw-options {
  display: grid;
  gap: 14px;
}

.knockout-card-footer {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.knockout-card-footer small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knockout-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin-top: 18px;
}

.knockout-form label {
  color: var(--navy);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.knockout-form input {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
}

.bracket-scroll {
  margin: 0 auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 24px 56px;
  width: 100%;
}

.bracket-board {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(129, 22, 54, 0.08), transparent 22%, transparent 78%, rgba(129, 22, 54, 0.08)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 22px 54px rgba(10, 25, 47, 0.1);
  display: grid;
  gap: 16px;
  grid-template-columns: 230px 210px 190px 260px 190px 210px 230px;
  min-height: 680px;
  min-width: 1664px;
  margin: 0 auto;
  padding: 24px;
  width: 1664px;
}

.bracket-column {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto 1fr;
}

.bracket-column h2 {
  color: var(--wine);
  font-size: 13px;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
  text-align: center;
}

.bracket-slots {
  display: grid;
}

.round-16 .bracket-slots {
  grid-template-rows: repeat(4, 1fr);
}

.quarters .bracket-slots {
  grid-template-rows: repeat(2, 1fr);
  padding: 74px 0;
}

.semis .bracket-slots {
  grid-template-rows: 1fr;
  padding: 205px 0;
}

.bracket-match {
  align-self: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-left: 5px solid var(--wine);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 25, 47, 0.06);
  min-height: 116px;
  padding: 10px;
  position: relative;
}

.bracket-column.left .bracket-match::after,
.bracket-column.right .bracket-match::before {
  background: var(--wine);
  content: "";
  height: 2px;
  position: absolute;
  top: 50%;
  width: 18px;
}

.bracket-column.left .bracket-match::after {
  right: -19px;
}

.bracket-column.right .bracket-match::before {
  left: -19px;
}

.bracket-match.empty {
  border-color: rgba(129, 22, 54, 0.18);
  border-left-color: rgba(129, 22, 54, 0.45);
  box-shadow: none;
}

.bracket-match small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.bracket-team {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 30px 1fr auto;
  min-height: 28px;
}

.bracket-team + .bracket-team {
  margin-top: 6px;
}

.bracket-match img {
  border-radius: 4px;
  height: 24px;
  object-fit: cover;
  width: 30px;
}

.flag-placeholder {
  background: linear-gradient(135deg, rgba(129, 22, 54, 0.18), rgba(15, 118, 110, 0.16));
  border-radius: 4px;
  display: block;
  height: 24px;
  width: 30px;
}

.bracket-date {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 8px;
}

.bracket-center {
  align-items: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.bracket-trophy {
  text-align: center;
}

.bracket-trophy span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.bracket-trophy strong {
  color: var(--wine);
  display: block;
  font-size: 36px;
  line-height: 1;
  margin-top: 6px;
  text-transform: uppercase;
}

.bracket-center .bracket-match {
  border-left-color: var(--gold);
  width: 100%;
}

.bracket-third-place {
  width: 100%;
}

.bracket-third-place h2 {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .bracket-scroll {
    padding: 0 12px 42px;
  }

  .bracket-board {
    min-width: 1482px;
    padding: 18px;
    grid-template-columns: 205px 185px 170px 230px 170px 185px 205px;
    width: 1482px;
  }
}

.auth-shell {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 168px);
  padding: 42px 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(10, 25, 47, 0.12);
  margin: 0 auto;
  max-width: 480px;
  padding: 28px;
  width: 100%;
}

.auth-card.wide {
  max-width: 760px;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.auth-form.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

.field-wrap {
  display: grid;
  gap: 8px;
}

.full {
  grid-column: 1 / -1;
}

.form-error {
  background: #fff0ed;
  border: 1px solid #ffd0c7;
  border-radius: 8px;
  color: var(--red);
  font-size: 13px;
  padding: 9px 10px;
}

.auth-alt {
  margin-bottom: 0;
}

.auth-alt a {
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 860px) {
  .topbar-inner {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 12px 16px;
  }

  .page-hero,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(10, 25, 47, 0.1);
    display: none;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    justify-content: stretch;
    padding: 10px;
    width: 100%;
  }

  body.nav-open .nav {
    display: grid;
  }

  .nav > a,
  .nav-group > button {
    background: var(--surface-low);
    border: 1px solid var(--line);
    border-radius: 8px;
    justify-content: center;
    padding: 10px 12px;
    width: 100%;
  }

  .nav-group > button {
    justify-content: space-between;
  }

  .nav-menu {
    left: 0;
    min-width: 100%;
    position: static;
    transform: none;
  }

  .nav-group:hover .nav-menu,
  .nav-group:focus-within .nav-menu {
    margin-top: 6px;
  }

  .user-chip {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .dashboard-shell,
  .featured-match,
  .fixture-card,
  .prediction-layout,
  .analysis-shell,
  .lineups-grid,
  .cards-rankings,
  .groups-board,
  .history-stats,
  .organizer-stats,
  .knockout-form,
  .percent-grid,
  .podium,
  .prize-grid,
  .rules-band,
  .auth-form.two-cols {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .knockout-inline-grid,
  .knockout-result-buttons {
    grid-template-columns: 1fr;
  }

  .knockout-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .knockout-card-footer button {
    width: 100%;
  }

  h1 {
    font-size: 42px;
  }

  .fixture-groups,
  .auth-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .fixture-filter-bar,
  .fixture-date-panel {
    margin-left: 16px;
    margin-right: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  .fixture-date-panel {
    padding: 14px;
  }

  .fixture-date-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .fixture-date-heading label {
    min-width: 0;
  }

  .fixture-date-button {
    flex-basis: 126px;
  }

  .page-hero,
  .ranking-hero,
  .prize-hero {
    padding: 28px 16px;
  }

  .prize-hero {
    background:
      linear-gradient(90deg, rgba(3, 15, 43, 0.92), rgba(3, 15, 43, 0.56)),
      url("../img/worldcup-prize-banner.d42360ff3dc6.png");
    background-position: 62% center;
    background-size: cover;
    min-height: 300px;
  }

  .fixture-card,
  .surface-card {
    padding: 14px;
  }

  .prediction-layout {
    gap: 10px;
  }

  .team-pick strong {
    min-height: auto;
  }

  .score-prediction-inputs {
    flex-wrap: wrap;
  }

  .score-input {
    width: 64px;
  }

  .distribution-row {
    grid-template-columns: 1fr 1fr;
  }

  .distribution-row strong,
  .distribution-row small {
    grid-column: 1 / -1;
  }

  .table-wrap {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .topbar-inner {
    gap: 10px;
    grid-template-columns: 1fr auto;
    padding: 12px;
  }

  .brand {
    font-size: 22px;
  }

  .user-chip {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 36px;
  }

  .fixture-card {
    gap: 14px;
  }

  .mini-flags {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stats-grid,
  .history-stats,
  .organizer-stats {
    grid-template-columns: 1fr;
  }

  .stat-card strong {
    font-size: 36px;
  }
}
