:root {
  --bg: #081724;
  --card: rgba(8, 20, 34, 0.8);
  --ink: #f3fbff;
  --muted: #b8d9e7;
  --accent-1: #ff6a3d;
  --accent-2: #ffd166;
  --accent-3: #00d4b4;
  --border: rgba(255, 255, 255, 0.16);
  --good: #3ddc97;
  --draw: #f2c14e;
  --bad: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1300px 700px at 10% -20%, rgba(255, 106, 61, 0.4), transparent 70%),
    radial-gradient(1100px 700px at 90% -20%, rgba(0, 212, 180, 0.35), transparent 70%),
    linear-gradient(170deg, #061420 10%, #0e2030 55%, #102b3a 100%);
}

.app {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem;
  background:
    linear-gradient(132deg, rgba(255, 106, 61, 0.86), rgba(255, 209, 102, 0.8) 38%, rgba(0, 212, 180, 0.82) 78%),
    url("https://images.unsplash.com/photo-1577223625816-7546f13df25d?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: saturate(1.1);
  background: linear-gradient(to top, rgba(4, 11, 20, 0.2), rgba(4, 11, 20, 0.45));
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin-top: 0.3rem;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.95;
}

.subhead {
  margin: 0.85rem 0 0;
  max-width: 760px;
  color: #f8feff;
  font-weight: 600;
}

.card {
  margin-top: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.meta h2 {
  font-size: 1.05rem;
}

.meta p {
  margin: 0;
  color: var(--muted);
  flex: 1 1 420px;
}

.meta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-weight: 800;
  color: #071823;
  background: linear-gradient(100deg, var(--accent-2), #fff18c);
  cursor: pointer;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.stage__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.stage__header p {
  margin: 0;
  color: var(--muted);
}

.groups-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.8rem;
}

.group-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(6, 15, 28, 0.7);
}

.group-card h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.match {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
}

.match:last-child {
  margin-bottom: 0;
}

.match__title {
  font-size: 0.9rem;
  font-weight: 700;
}

.match__sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.scoreline {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.33rem;
  align-items: end;
}

.scoreline__side {
  display: grid;
  gap: 0.22rem;
}

.scoreline__team {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.scoreline__dash {
  align-self: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
  padding-bottom: 0.15rem;
}

.scoreline__input,
.winner {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-radius: 8px;
  font-size: 0.9rem;
  padding: 0.42rem 0.5rem;
  font-weight: 700;
}

.scoreline__input {
  width: 100%;
  text-align: center;
  cursor: text;
  appearance: textfield;
}

.scoreline__input::-webkit-outer-spin-button,
.scoreline__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.winner.is-selected[data-side="home"] {
  background: color-mix(in srgb, var(--good) 30%, transparent);
  border-color: var(--good);
}

.winner.is-selected[data-side="away"] {
  background: color-mix(in srgb, var(--bad) 25%, transparent);
  border-color: var(--bad);
}

.table {
  margin-top: 0.4rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.table th,
.table td {
  padding: 0.18rem 0.2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: right;
}

.table th:first-child,
.table td:first-child,
.table th:nth-child(2),
.table td:nth-child(2) {
  text-align: left;
}

.knockout-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.round {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(6, 15, 28, 0.7);
  padding: 0.65rem;
}

.round h3 {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.kmatch {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.45rem;
  margin-bottom: 0.4rem;
}

.kmatch:last-child {
  margin-bottom: 0;
}

.kmatch__meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.kmatch__teams {
  display: grid;
  gap: 0.35rem;
}

.champion {
  text-align: center;
}

#champion-name {
  margin: 0.45rem 0 0;
  font-size: clamp(1.2rem, 5vw, 2rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
  color: var(--accent-2);
}

@media (max-width: 720px) {
  .hero {
    padding: 1.35rem;
  }

  .card {
    padding: 0.8rem;
  }
}
