:root {
  color-scheme: dark;
  --bg: #090b21;
  --bg-deep: #050614;
  --panel: rgba(13, 18, 43, 0.86);
  --panel-strong: rgba(18, 25, 57, 0.96);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f8fbff;
  --muted: #aeb8c9;
  --blue: #35c7f4;
  --orange: #ffb247;
  --red: #ff4054;
  --green: #65d889;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 10%, rgba(53, 199, 244, 0.23), transparent 28rem),
    radial-gradient(circle at 86% 20%, rgba(255, 178, 71, 0.22), transparent 26rem),
    linear-gradient(180deg, #090b21 0%, #111834 48%, #070913 100%);
  color: var(--text);
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

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

.site-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(6, 8, 26, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.icon-action:hover,
.icon-action:focus-visible {
  background: rgba(53, 199, 244, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  min-width: 52px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: clamp(24px, 5vw, 72px);
  min-height: calc(100svh - 76px);
  padding: clamp(40px, 8vw, 104px) clamp(18px, 5vw, 72px) 44px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 8, 26, 0.94) 0%, rgba(6, 8, 26, 0.63) 56%, rgba(6, 8, 26, 0.94) 100%),
    image-set(url("./assets/REAL-white-bottom.png") 1x);
  background-position: center, right 12% center;
  background-size: cover, min(72vw, 880px) auto;
  background-repeat: no-repeat;
}

.hero-bg::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  content: "";
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-copy {
  max-width: 780px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d6deec;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: #091027;
  background: linear-gradient(135deg, var(--blue), var(--orange) 56%, var(--red));
}

.ghost-action {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric {
  min-height: 120px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.metric.accent {
  background: linear-gradient(135deg, rgba(255, 178, 71, 0.24), rgba(255, 64, 84, 0.18));
}

.metric-value {
  display: block;
  color: var(--text);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 950;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section {
  padding: 64px clamp(18px, 5vw, 72px);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.format-item,
.team-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
}

.format-item {
  min-height: 210px;
  padding: 22px;
}

.format-index {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.format-item p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.schedule-section,
.teams-section {
  background: rgba(255, 255, 255, 0.035);
  border-block: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-list {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab {
  width: 48px;
  height: 40px;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.tab.is-active {
  color: #071022;
  background: var(--orange);
}

.round-stage {
  position: relative;
  min-height: 360px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(53, 199, 244, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(255, 64, 84, 0.12), transparent 30%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.round-panel {
  display: none;
}

.round-panel.is-active {
  display: block;
}

.round-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
}

.round-meta strong {
  color: var(--text);
  font-size: 24px;
}

.match-list {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.match-card span {
  min-width: 0;
  font-weight: 900;
}

.match-card span:last-child {
  text-align: right;
}

.match-card strong {
  color: var(--orange);
  text-align: center;
}

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

.placeholder-grid span {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 16px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.board-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--orange);
  background: rgba(255, 178, 71, 0.12);
  border: 1px solid rgba(255, 178, 71, 0.32);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.standings-table {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: 72px minmax(160px, 1fr) 92px 86px 110px;
  align-items: center;
  min-height: 50px;
  padding: 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #dce5f5;
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.team-card {
  min-height: 252px;
  padding: 18px;
}

.team-card h3 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.team-card ol {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: #d7dfed;
  font-size: 14px;
  line-height: 1.35;
}

.team-card li::marker {
  color: var(--blue);
  font-weight: 900;
}

.team-card .pending {
  color: var(--orange);
}

.event-section {
  padding-bottom: 88px;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.event-strip div {
  min-height: 126px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(53, 199, 244, 0.14), rgba(255, 178, 71, 0.12));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-strip strong,
.event-strip span {
  display: block;
}

.event-strip strong {
  font-size: 24px;
}

.event-strip span {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(560px, 100vw);
  height: 100dvh;
  padding: 22px;
  overflow: auto;
  color: var(--text);
  background: rgba(7, 10, 27, 0.98);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.editor-panel.is-open {
  transform: translateX(0);
}

.editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.editor-form {
  display: grid;
  gap: 16px;
}

.editor-form label {
  display: grid;
  gap: 8px;
}

.editor-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.editor-form input,
.editor-form textarea {
  width: 100%;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.editor-form input {
  min-height: 42px;
  padding: 9px 12px;
}

.editor-form textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.editor-form input:focus,
.editor-form textarea:focus {
  border-color: rgba(53, 199, 244, 0.72);
  box-shadow: 0 0 0 3px rgba(53, 199, 244, 0.12);
}

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

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-actions .primary-action,
.editor-actions .ghost-action {
  border: 0;
  cursor: pointer;
}

.editor-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #071022;
  font-weight: 900;
  background: var(--orange);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-panel,
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .placeholder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar,
  .section-heading.split,
  .round-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .icon-action {
    flex: 1;
  }

  .brand {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-bg {
    background-position: center, center top;
    background-size: cover, 150vw auto;
  }

  .hero-panel,
  .format-grid,
  .team-grid,
  .event-strip {
    grid-template-columns: 1fr;
  }

  .tab-list {
    overflow-x: auto;
  }

  .round-stage {
    padding: 16px;
  }

  .match-card {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: left;
  }

  .match-card strong {
    text-align: left;
  }

  .match-card span:last-child {
    text-align: left;
  }

  .standings-table {
    overflow-x: auto;
  }

  .table-row {
    width: 680px;
  }

  .editor-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .brand span {
    font-size: 14px;
  }

  .hero-actions a {
    width: 100%;
  }

  .section {
    padding-inline: 14px;
  }
}
