:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-soft: rgba(13, 17, 24, 0.78);
  --panel: rgba(14, 18, 27, 0.68);
  --panel-strong: rgba(16, 22, 34, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7f7f2;
  --muted: #aeb3bf;
  --gold: #f3c057;
  --amber: #ff8f3d;
  --red: #ef3b45;
  --cyan: #6de4ff;
  --green: #9cef8c;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(239, 59, 69, 0.22), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(109, 228, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, #06070a 0%, #0b0f16 54%, #08090d 100%);
}

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 18px;
  left: 50%;
  display: flex;
  width: min(1160px, calc(100% - 32px));
  transform: translateX(-50%);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 10, 15, 0.58);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.top-nav {
  gap: 4px;
}

.top-nav a {
  padding: 9px 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.top-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: end;
  gap: 34px;
  overflow: hidden;
  padding: 130px max(24px, calc((100vw - 1160px) / 2)) 58px;
}

.wallpaper-carousel,
.wallpaper-slide,
.hero-overlay,
.hero-noise {
  position: absolute;
  inset: 0;
}

.wallpaper-slide {
  opacity: 0;
  transform: scale(1.03);
  background-image: var(--image);
  background-position: center;
  background-size: cover;
  transition:
    opacity 900ms ease,
    transform 5500ms ease;
}

.wallpaper-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.wallpaper-generated {
  background:
    linear-gradient(95deg, rgba(7, 9, 15, 0.1), rgba(7, 9, 15, 0.72)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 14px),
    radial-gradient(circle at 28% 28%, rgba(243, 192, 87, 0.52), transparent 18rem),
    radial-gradient(circle at 74% 42%, rgba(239, 59, 69, 0.36), transparent 20rem),
    linear-gradient(135deg, #16120d, #070b10 62%, #13090a);
}

.wallpaper-generated::before {
  content: "SHANGHAI MAJOR MVP";
  position: absolute;
  left: 8vw;
  bottom: 18vh;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.16);
  font-size: clamp(58px, 12vw, 168px);
  font-weight: 900;
  line-height: 0.9;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 6, 10, 0.94) 0%, rgba(5, 6, 10, 0.68) 40%, rgba(5, 6, 10, 0.24) 100%),
    linear-gradient(0deg, #08090d 0%, rgba(8, 9, 13, 0.2) 28%, rgba(8, 9, 13, 0.62) 100%);
}

.hero-noise {
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}

.hero-content,
.hero-card {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 20px;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: block;
}

.hero-copy {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.primary-action,
.secondary-action,
.audio-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-action {
  color: #12100a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.audio-action {
  color: #fff;
  border: 1px solid rgba(109, 228, 255, 0.34);
  background: rgba(109, 228, 255, 0.12);
  cursor: pointer;
}

.audio-action.is-playing {
  color: #111;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.hero-stats {
  display: grid;
  max-width: 740px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-stats article,
.summary-strip article,
.analysis-card,
.filter-panel,
.table-shell,
.hero-card,
.champion-card,
.source-grid a {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-stats article {
  min-height: 116px;
  padding: 16px;
  border-radius: 8px;
}

.hero-stats span,
.summary-strip span,
.filter-panel span,
.card-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats strong {
  display: block;
  color: #fff;
  font-size: clamp(21px, 3vw, 32px);
  line-height: 1.05;
}

.hero-stats small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.62);
}

.hero-card {
  align-self: end;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(9, 12, 18, 0.66);
}

.hero-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 28%;
}

.hero-card > div:not(.carousel-controls):not(.dots) {
  padding: 18px 18px 0;
}

.hero-card h2 {
  margin-bottom: 8px;
  font-size: 26px;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.carousel-controls {
  display: flex;
  gap: 10px;
  padding: 10px 18px 8px;
}

.carousel-controls button {
  width: 42px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.carousel-controls button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dots {
  display: flex;
  gap: 7px;
  padding: 0 18px 18px;
}

.dots button {
  width: 24px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.dots button.is-active {
  background: var(--gold);
}

.summary-strip {
  display: grid;
  width: min(1160px, calc(100% - 32px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: -28px auto 0;
  position: relative;
  z-index: 4;
}

.summary-strip article {
  min-height: 150px;
  border-radius: 8px;
  padding: 22px;
}

.summary-strip strong {
  display: block;
  margin-bottom: 10px;
  font-size: 26px;
}

.summary-strip p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head.compact {
  max-width: 880px;
}

.section-head h2 {
  margin-bottom: 12px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.section-head p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.75;
}

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

.champion-card {
  min-height: 340px;
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--panel);
}

.champion-card .year {
  color: var(--gold);
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.champion-card .count {
  display: inline-flex;
  margin: 14px 0 22px;
  border-radius: 99px;
  padding: 7px 10px;
  color: #130f08;
  background: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.champion-card ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.champion-card li {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.champion-card li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.champion-card strong {
  display: block;
  margin-bottom: 5px;
}

.champion-card small {
  color: var(--muted);
  line-height: 1.55;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 18px;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 16px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 800;
}

.segmented button.is-active {
  color: #110f09;
  border-color: transparent;
  background: var(--gold);
}

.table-shell {
  overflow: auto;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.58;
}

td strong {
  color: #fff;
}

.result-badge,
.honor-badge {
  display: inline-flex;
  margin: 0 6px 6px 0;
  border-radius: 99px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.result-badge.win {
  color: #101008;
  background: var(--green);
}

.result-badge.final {
  color: #1c1306;
  background: #f7a948;
}

.result-badge.playoff {
  color: #09141a;
  background: var(--cyan);
}

.honor-badge {
  color: #140c08;
  background: var(--gold);
}

.analysis-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
}

.analysis-card {
  min-height: 240px;
  border-radius: 8px;
  padding: 24px;
}

.analysis-card.large {
  grid-row: span 2;
}

.analysis-card.accent {
  border-color: rgba(243, 192, 87, 0.38);
  background:
    linear-gradient(135deg, rgba(243, 192, 87, 0.18), transparent),
    var(--panel);
}

.analysis-card h3 {
  margin-bottom: 14px;
  font-size: 28px;
}

.analysis-card p,
.analysis-card li {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.78;
}

.analysis-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.source-grid a {
  min-height: 82px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.source-grid a:hover {
  border-color: rgba(243, 192, 87, 0.56);
  color: #fff;
}

.license-note {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.72;
}

.site-footer {
  display: flex;
  width: min(1160px, calc(100% - 32px));
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 58px 0 28px;
  color: rgba(255, 255, 255, 0.55);
}

.audio-dock {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: min(430px, calc(100vw - 32px));
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 10, 15, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.audio-dock button {
  display: inline-flex;
  min-width: 158px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  font-weight: 800;
}

.audio-dock button.is-playing {
  color: #111;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
}

.audio-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(243, 192, 87, 0.48);
}

.is-playing .audio-icon {
  animation: audioPulse 1.2s ease-out infinite;
}

.audio-dock > input {
  flex: 1 1 96px;
  width: 100%;
  accent-color: var(--gold);
}

.audio-import {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.audio-import input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

@keyframes audioPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 192, 87, 0.5);
  }
  80% {
    box-shadow: 0 0 0 10px rgba(243, 192, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(243, 192, 87, 0);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-nav a {
    white-space: nowrap;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 150px;
  }

  .hero-card {
    max-width: 540px;
  }

  .summary-strip,
  .champion-grid,
  .source-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel,
  .analysis-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .hero {
    min-height: auto;
    padding: 150px 16px 44px;
  }

  .hero-stats,
  .summary-strip,
  .champion-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .section {
    width: calc(100% - 28px);
    padding-top: 72px;
  }

  .summary-strip {
    width: calc(100% - 28px);
  }

  .hero-copy {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(34px, 12.5vw, 46px);
  }

  .site-footer {
    width: calc(100% - 28px);
    flex-direction: column;
  }

  .audio-dock {
    left: 14px;
    right: 14px;
    bottom: 12px;
    width: auto;
  }
}
