:root {
  --bg: #08110d;
  --bg-2: #0f172a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f9fafb;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;

  --green: #16a34a;
  --green-2: #22c55e;
  --blue: #1d4ed8;
  --gold: #facc15;

  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.38);

  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;

  --max-width: 1600px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 18%),
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 20%),
    radial-gradient(circle at 50% 120%, rgba(96, 165, 250, 0.05), transparent 30%),
    linear-gradient(180deg, #08110d 0%, #111827 48%, #0f172a 100%);
}

img {
  max-width: 100%;
  display: block;
}

a,
button {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 20px;
  background: rgba(8, 12, 10, 0.64);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.back-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.back-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.page-wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 18px 36px;
}

/* HERO */
.hero-shell {
  margin-top: 8px;
  text-align: center;
}

.hero-competition {
  margin: 0 0 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.match-header-card {
  position: relative;
  overflow: hidden;
  padding: 22px 28px 20px;
  border-radius: 30px;
  background:
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
    url("images/image-stadium-match-page-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.match-header-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 28%),
    radial-gradient(circle at left, rgba(34, 197, 94, 0.08), transparent 25%);
  pointer-events: none;
}

#zone-match-status,
#zone-match-title,
#zone-match-time {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge.live {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.badge.today {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.badge.upcoming {
  color: #bfdbfe;
  background: linear-gradient(135deg, rgba(29,78,216,0.28), rgba(96,165,250,0.08));
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.badge.passed {
  color: var(--text-soft);
  background: rgba(148,163,184,0.12);
}

#zone-match-title {
  display: grid;
  grid-template-columns: minmax(0,1fr) 120px minmax(0,1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 14px 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 1000;
  letter-spacing: -0.05em;
  text-align: center;
}

.match-team-inline {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.match-team-inline:first-child {
  justify-content: flex-end;
  text-align: right;
  padding-right: 8px;
}

.match-team-inline:last-child {
  justify-content: flex-start;
  text-align: left;
  padding-left: 8px;
}

.match-vs-inline {
  width: 120px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 1000;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flag-img {
  width: 130px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

#zone-match-time {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* COUNTRY */
.country-section {
  margin-top: 28px;
}

.country-section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* TOOLBAR */
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.filter-chip:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(22,163,74,0.24), rgba(34,197,94,0.12));
  border-color: rgba(34,197,94,0.26);
  color: #dcfce7;
}

/* CONTENT */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.zones-column {
  min-width: 0;
}

/* ZONES LIST */
#zones-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zone-list-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(8, 12, 10, 0.84);
  box-shadow: var(--shadow-sm);
}

.zone-list-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(34,197,94,0.18);
}

.zone-list-image {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(29,78,216,0.12), rgba(34,197,94,0.12)),
    #111827;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.zone-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zone-list-content {
  padding: 20px 22px;
}

.zone-list-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.zone-list-top h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.zone-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.18);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.zone-list-content p {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.zone-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.zone-details p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.zone-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.24);
}

.btn.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
}

/* MAP */
.map-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(8, 12, 10, 0.84);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.map-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.map-head span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.map-box {
  height: 620px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(29,78,216,0.12), rgba(34,197,94,0.12)),
    #111827;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.map-placeholder {
  width: 88%;
  height: 88%;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* EMPTY */
.preview-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(8, 12, 10, 0.84);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.preview-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.preview-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

@media (min-width: 1100px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .map-card {
    position: sticky;
    top: 92px;
  }
}

@media (max-width: 980px) {
  #zone-match-title {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .match-team-inline:first-child,
  .match-team-inline:last-child {
    justify-content: center;
    text-align: center;
    padding: 0;
  }

  .match-vs-inline {
    margin: 0 auto;
    width: 90px;
    height: 90px;
    font-size: 2rem;
  }

  .flag-img {
    width: 78px;
    height: 56px;
  }

  .zone-list-card {
    grid-template-columns: 1fr;
  }

  .zone-list-image {
    min-height: 200px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .map-box {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .page-wrap {
    padding: 14px 12px 28px;
  }

  .country-section {
    margin-top: 22px;
  }

  .toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left {
    width: 100%;
  }

  .zone-list-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .zone-list-top h3 {
    font-size: 1.4rem;
  }

  .zone-details {
    grid-template-columns: 1fr;
  }

  .zone-actions {
    flex-direction: column;
  }

  .btn,
  .btn.secondary {
    width: 100%;
  }
}