:root {
  color-scheme: light;
  --bg: #f2f5f1;
  --panel: #ffffff;
  --panel-soft: #edf5ef;
  --text: #14201b;
  --muted: #65756e;
  --line: #d5e0d9;
  --pitch: #0c6b4e;
  --pitch-deep: #07392f;
  --gold: #c99a2e;
  --accent: #0f8b6f;
  --accent-strong: #096a55;
  --danger: #ba3b32;
  --warning: #9b6208;
  --blue: #275d9f;
  --shadow: 0 14px 32px rgba(20, 32, 27, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0, rgba(255, 229, 160, 0.22), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(7, 57, 47, 0.98) 0, rgba(12, 107, 78, 0.94) 310px, var(--bg) 310px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  background: var(--accent-strong);
}

button.secondary {
  background: white;
  border-color: var(--line);
  color: var(--text);
}

button.secondary:hover {
  background: var(--panel-soft);
}

button.danger {
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 8px 10px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

a {
  color: var(--blue);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0 18px;
  color: white;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 229, 160, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 33%, transparent 34%),
    conic-gradient(from 18deg, #111 0 10%, #fff 10% 22%, #111 22% 34%, #fff 34% 48%, #111 48% 60%, #fff 60% 73%, #111 73% 84%, #fff 84% 100%);
  color: #0b3f32;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
}

.topbar .subtle,
.topbar a {
  color: rgba(255, 255, 255, 0.78);
}

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

.worldcup-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.5fr) minmax(270px, 0.62fr);
  gap: 18px;
  min-height: 230px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 20px;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 229, 160, 0.2), transparent 24%),
    linear-gradient(90deg, rgba(7, 57, 47, 0.98), rgba(16, 83, 73, 0.8)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 64px),
    url("./assets/stadium-hero.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  box-shadow: var(--shadow);
}

.worldcup-hero::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -76px;
  width: 230px;
  height: 230px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.worldcup-hero::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: translateY(34px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  color: #ffe5a0;
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h2 {
  margin: 12px 0 8px;
  max-width: 680px;
  font-size: 31px;
  line-height: 1.12;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 186px;
  align-self: stretch;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 112%, rgba(255, 255, 255, 0.18), transparent 44%);
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.hero-visual::before {
  bottom: 20px;
  height: 60px;
}

.hero-visual::after {
  bottom: 48px;
  height: 116px;
  opacity: 0.35;
}

.hero-trophy {
  position: absolute;
  left: 50%;
  top: 18px;
  width: min(132px, 58%);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28));
}

.hero-ball {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 16px 16px rgba(0, 0, 0, 0.28));
}

.pitch-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
}

.pitch-line-a {
  left: 16px;
  right: 16px;
  bottom: 48px;
  height: 1px;
}

.pitch-line-b {
  left: 50%;
  bottom: 26px;
  width: 1px;
  height: 132px;
}

.hero-scoreboard {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: grid;
  gap: 10px;
  align-content: center;
}

.score-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(255, 229, 160, 0.13), rgba(255, 255, 255, 0.09));
  backdrop-filter: blur(4px);
}

.score-tile svg {
  width: 18px;
  height: 18px;
  color: #ffe5a0;
}

.score-tile span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.score-tile strong {
  display: block;
  margin-top: 2px;
}

.status {
  min-height: 24px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.panel,
.match {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.match {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 4px solid var(--pitch);
}

.match-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.match-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.match-description {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: #0e4d3f;
  background: #dff4ed;
}

.badge.waiting {
  color: #714303;
  background: #ffe8bd;
}

.badge.settled {
  color: #273b62;
  background: #dce8ff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.metric.gold {
  border-color: rgba(201, 154, 46, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 232, 165, 0.72), rgba(255, 248, 229, 0.96));
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.options {
  display: grid;
  gap: 8px;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(12, 107, 78, 0.04), transparent);
}

.option-name {
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.stake-note {
  border-left: 3px solid var(--gold);
  padding: 8px 10px;
  color: var(--warning);
  background: #fff7df;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
}

.wide {
  grid-column: 1 / -1;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0, rgba(201, 154, 46, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.72);
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 12px;
  }

  .topbar,
  .worldcup-hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 170px;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid,
  .form-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    font-size: 25px;
  }
}
