:root {
  --bg: #09111d;
  --panel: #101a28;
  --panel-2: #121d2d;
  --line: rgba(183, 197, 219, 0.11);
  --line-strong: rgba(183, 197, 219, 0.19);
  --text: #f2f5fa;
  --muted: #8ea0b8;
  --accent: #28d08e;
  --accent-soft: rgba(40, 208, 142, 0.14);
  --orange: #ff9f36;
  --white-soft: rgba(255, 255, 255, 0.78);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 20px 48px rgba(2, 8, 20, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(40, 208, 142, 0.08), transparent 26%),
    linear-gradient(180deg, #070f18 0%, #09111d 100%);
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI", sans-serif;
  font-size: 14px;
}

body.is-loading,
body.is-transitioning {
  overflow: hidden;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px;
}

.page-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 159, 54, 0.08), transparent 32%),
    rgba(7, 14, 23, 0.94);
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
  z-index: 9999;
}

body.is-ready .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  display: block;
  width: 124px;
  height: 124px;
  object-fit: contain;
  animation: loader-spin 1.15s linear infinite;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.42));
}

@keyframes loader-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.site-header,
.hero-panel,
.sidebar-panel,
.panel,
.league-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 26, 40, 0.98), rgba(12, 20, 31, 0.98));
  box-shadow: var(--shadow);
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
}

.brand,
.header-tools,
.top-nav,
.foot-row,
.panel-head,
.league-head,
.match-row,
.live-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  gap: 10px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 44px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 0.98rem;
  line-height: 1;
}

.brand-copy small,
.panel-kicker,
.panel-meta,
.league-meta,
.match-time,
.sidebar-title,
.foot-row span,
.country-summary span,
.top-nav-item {
  color: var(--muted);
}

.top-nav {
  justify-content: center;
  flex-wrap: wrap;
}

.top-nav-item,
.ghost-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 8px 13px;
  cursor: pointer;
}

.top-nav-item.is-active {
  border-color: rgba(40, 208, 142, 0.25);
  background: var(--accent-soft);
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.status-pill.is-live {
  border-color: rgba(40, 208, 142, 0.28);
  background: var(--accent-soft);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
}

.status-pill.is-live .status-dot {
  background: var(--accent);
}

.hero-panel {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-lg);
}

.hero-stage {
  position: relative;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  background: #0e1726;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 280ms ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 13, 22, 0.16), rgba(8, 13, 22, 0.38));
}

.hero-nav {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hero-thumb {
  position: relative;
  width: 70px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0e1726;
  cursor: pointer;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-thumb.is-active {
  border-color: rgba(255, 159, 54, 0.7);
}

.hero-thumb.is-active img {
  opacity: 1;
}

.layout-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.sidebar-panel,
.panel {
  border-radius: var(--radius-lg);
}

.sidebar-panel {
  padding: 14px;
  align-self: start;
}

.sidebar-block + .sidebar-block {
  margin-top: 16px;
}

.sidebar-title {
  margin-bottom: 10px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-links {
  display: grid;
  gap: 6px;
}

.sidebar-link {
  display: block;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--white-soft);
}

.sidebar-link:hover,
.sidebar-link.is-active {
  border-color: var(--line-strong);
  color: #fff;
}

.sidebar-links.compact {
  gap: 5px;
}

.country-stack {
  display: grid;
  gap: 8px;
}

.country-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.country-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.country-summary::-webkit-details-marker {
  display: none;
}

.country-summary strong {
  font-size: 0.84rem;
}

.country-arrow {
  color: var(--orange);
  font-size: 0.75rem;
  transition: transform 180ms ease;
}

.country-group[open] .country-arrow {
  transform: rotate(90deg);
}

.country-links {
  display: grid;
  gap: 1px;
  padding: 0 10px 10px;
}

.country-links a {
  padding: 5px 0;
  color: var(--white-soft);
  font-size: 0.8rem;
}

.sidebar-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.foot-row {
  justify-content: space-between;
  padding: 4px 0;
}

.foot-row strong {
  font-size: 0.8rem;
  text-align: right;
}

.content-stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.league-stack,
.live-stack {
  display: grid;
  gap: 12px;
}

.league-card {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.league-head {
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.league-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.league-meta {
  font-size: 0.78rem;
}

.league-body {
  display: grid;
}

.table-head,
.match-row,
.live-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 64px 64px 64px;
  align-items: center;
  column-gap: 10px;
}

.table-head {
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.match-row,
.live-row {
  min-height: 25px;
  padding: 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.match-row:last-child,
.live-row:last-child {
  border-bottom: 0;
}

.match-time,
.live-minute {
  font-size: 0.78rem;
}

.match-fixture,
.live-fixture {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 0.84rem;
}

.live-fixture strong {
  color: #fff;
}

.odd-cell {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  font-size: 0.79rem;
}

.odd-cell span {
  color: var(--white-soft);
  font-size: 0.68rem;
}

.odd-cell strong {
  color: var(--orange);
  font-weight: 700;
}

.live-minute {
  color: var(--accent);
  font-weight: 700;
}

.live-row .odd-cell strong {
  color: #fff;
}

.live-row .odd-cell.is-hot strong {
  color: var(--orange);
}

@media (max-width: 1080px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    height: 38px;
  }

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

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-head,
  .match-row,
  .live-row {
    grid-template-columns: 48px minmax(0, 1fr) 56px 56px 56px;
    column-gap: 8px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 12px;
  }

  .loader-mark {
    width: 96px;
    height: 96px;
  }

  .hero-stage {
    height: 220px;
  }

  .table-head,
  .match-row,
  .live-row {
    font-size: 12px;
  }
}
