:root {
  color-scheme: dark;
  --ink: #07040f;
  --blue: #34b9ff;
  --cyan: #7cf8ff;
  --pink: #ff4eb8;
  --violet: #8e5cff;
  --orange: #ff8d35;
  --white: #f9f9ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}

button {
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(var(--cursor-x, 50vw), var(--cursor-y, 50vh), 0) translate(-50%, -50%);
  background: radial-gradient(circle, rgba(61, 190, 255, 0.14), rgba(255, 55, 174, 0.05) 42%, transparent 70%);
  will-change: transform;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  contain: layout paint;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(120deg, rgba(17, 8, 41, 0.74), rgba(3, 8, 24, 0.93)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.025) 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, 0.025) 80px);
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -35%;
  background: conic-gradient(from 135deg at 50% 50%, transparent, rgba(54, 196, 255, 0.09), transparent 22%, rgba(255, 53, 174, 0.11), transparent 50%);
  animation: field-spin 18s linear infinite;
}

.hero::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(3, 2, 10, 0.44) 76%, rgba(3, 2, 10, 0.9));
}

.aurora {
  position: absolute;
  z-index: -2;
  width: 55vw;
  height: 55vw;
  min-width: 600px;
  min-height: 600px;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.34;
  animation: aurora-float 14s ease-in-out infinite alternate;
  will-change: transform;
}

.aurora-one {
  left: -23vw;
  top: -22vw;
  background: var(--blue);
}

.aurora-two {
  right: -24vw;
  bottom: -25vw;
  background: var(--pink);
  animation-delay: -4s;
}

.speed-lines {
  position: absolute;
  z-index: -1;
  inset: -40%;
  opacity: 0.24;
  background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0 2.4deg, rgba(255, 255, 255, 0.13) 2.5deg 2.65deg, transparent 2.75deg 5deg);
  animation: speed-pulse 8s ease-in-out infinite;
  mask-image: radial-gradient(circle, black 0, transparent 70%);
  will-change: transform, opacity;
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 5vw, 76px);
  padding-top: calc(28px + env(safe-area-inset-top));
  letter-spacing: 0.16em;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-weight: 800;
}

.event-tag,
.live-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.event-tag span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  animation: blink 1.4s ease-in-out infinite;
}

.live-tag {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.stage {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(330px, 1.3fr) minmax(180px, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 58px);
  width: min(1320px, 92vw);
  margin: auto;
}

.team {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 230px;
  padding: clamp(24px, 4vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  backdrop-filter: blur(7px);
  transform-style: preserve-3d;
  transition: transform 160ms ease-out, border-color 220ms ease;
}

.team::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.12) 48%, transparent 60%);
  transform: translateX(-120%);
  animation: card-shine 4.8s ease-in-out infinite;
}

.team::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.18;
}

.team-blg {
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(36, 175, 255, 0.22), rgba(142, 92, 255, 0.08));
  box-shadow: inset 0 0 70px rgba(48, 181, 255, 0.08), -15px 20px 60px rgba(28, 157, 255, 0.12);
}

.team-blg::after {
  left: -65px;
  bottom: -55px;
}

.team-hle {
  color: #ffb26b;
  background: linear-gradient(135deg, rgba(255, 101, 32, 0.08), rgba(255, 53, 152, 0.13));
  box-shadow: inset 0 0 70px rgba(255, 112, 47, 0.05);
  opacity: 0.64;
}

.team-hle::after {
  right: -65px;
  top: -55px;
}

.team-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.35em;
}

.team strong {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(4rem, 7vw, 7.4rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-shadow: 0 0 35px currentColor;
  transform: translateZ(32px);
}

.team small {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.score-wrap {
  position: relative;
  text-align: center;
}

.score-wrap.is-revealed {
  animation: score-land 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-wrap::before,
.score-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 68%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(124, 248, 255, 0.75), transparent);
  box-shadow: 0 0 14px var(--cyan);
}

.score-wrap::before {
  top: 25%;
}

.score-wrap::after {
  bottom: 17%;
}

.eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.68);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.score {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(8.5rem, 18vw, 15rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.8;
  gap: 0.06em;
  letter-spacing: 0;
  filter: drop-shadow(0 15px 38px rgba(0, 0, 0, 0.55));
}

.score-number {
  position: relative;
  display: block;
  min-width: 0.55em;
  text-align: center;
  transform: scaleY(1.04);
}

.score-number::before {
  content: attr(data-value);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 12px rgba(255, 255, 255, 0.055);
  filter: blur(1px);
}

.score-win {
  color: var(--white);
  text-shadow: -6px 0 0 rgba(46, 190, 255, 0.82), 6px 0 0 rgba(255, 53, 174, 0.56), 0 0 42px rgba(101, 227, 255, 0.55);
}

.score-loss {
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 4px 0 0 rgba(255, 113, 52, 0.46);
}

.score-colon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.2em;
  margin: 0;
  color: var(--pink);
  font-size: 0.46em;
  line-height: 1;
  text-shadow: 0 0 28px var(--pink);
  transform: translateY(-0.04em);
  animation: colon-pulse 1.6s ease-in-out infinite;
}

.victory-word {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 12px;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, var(--cyan), #fff 48%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: victory-breathe 2.2s ease-in-out infinite;
}

.victory-word::before,
.victory-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
}

.victory-word::before {
  transform: translateX(-3px);
  filter: hue-rotate(60deg);
  animation: glitch 4s infinite;
}

.victory-word::after {
  transform: translateX(3px);
  filter: hue-rotate(-80deg);
  animation: glitch 4s 80ms infinite reverse;
}

.final-line {
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.35);
}

.action-row {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding-bottom: 18px;
}

.action-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.cheer-button {
  position: relative;
  min-width: 198px;
  padding: 14px 54px 14px 26px;
  overflow: hidden;
  border: 1px solid rgba(125, 241, 255, 0.6);
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(36, 170, 255, 0.2), rgba(255, 47, 166, 0.2));
  color: white;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(53, 187, 255, 0.16), inset 0 0 18px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cheer-button:hover {
  transform: translateY(-3px) scale(1.025);
  border-color: white;
  box-shadow: 0 0 38px rgba(66, 205, 255, 0.32), 0 0 70px rgba(255, 54, 178, 0.14);
}

.cheer-button:active {
  transform: scale(0.96);
}

.button-light {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.32) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: button-sweep 3s ease-in-out infinite;
}

.button-text {
  position: relative;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cheer-count {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-weight: 800;
  transform: translateY(-50%);
}

.ticker {
  position: relative;
  z-index: 5;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.22);
  transform: rotate(-1deg) scale(1.02);
  backdrop-filter: blur(4px);
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 36px;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.74);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  animation: ticker 16s linear infinite;
}

.ticker-track b {
  color: var(--pink);
}

.intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: #05030c;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro.is-done {
  opacity: 0;
  visibility: hidden;
}

.intro::before,
.intro::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #07040f;
  transition: transform 0.72s cubic-bezier(0.76, 0, 0.24, 1);
}

.intro::before {
  left: 0;
}

.intro::after {
  right: 0;
}

.intro.is-opening::before {
  transform: translateX(-100%);
}

.intro.is-opening::after {
  transform: translateX(100%);
}

.intro-line {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), white, var(--pink));
  box-shadow: 0 0 28px white;
  transform: translate(-50%, -50%);
  animation: intro-line 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.intro-score,
.round-flow,
.intro p {
  position: relative;
  z-index: 3;
}

.intro-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.07em;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(9rem, 25vw, 19rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.7;
  opacity: 0;
  transform: scale(1.7);
  animation: intro-score 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.intro-score.is-bumping {
  opacity: 1;
  transform: scale(1);
  animation: intro-bump 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-score span:first-child {
  text-shadow: -7px 0 var(--cyan), 7px 0 var(--pink), 0 0 45px rgba(117, 232, 255, 0.7);
}

.intro-score span:last-child {
  color: rgba(255, 255, 255, 0.68);
}

.intro-score i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.2em;
  margin: 0;
  color: var(--pink);
  font-size: 0.48em;
  line-height: 1;
}

.round-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 104px));
  justify-content: center;
  gap: 10px;
  margin-top: 42px;
}

.round-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.28);
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  transform: translateY(10px) scale(0.96);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.round-result b {
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.round-result.is-active,
.round-result.is-settled {
  transform: translateY(0) scale(1);
}

.round-result[data-winner='blg'].is-active {
  border-color: var(--cyan);
  background: rgba(52, 185, 255, 0.18);
  color: white;
  box-shadow: 0 0 22px rgba(52, 185, 255, 0.3);
}

.round-result[data-winner='hle'].is-active {
  border-color: var(--orange);
  background: rgba(255, 141, 53, 0.16);
  color: white;
  box-shadow: 0 0 22px rgba(255, 141, 53, 0.25);
}

.round-result.is-settled {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

.intro p {
  margin: 26px 0 0;
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-weight: 900;
  letter-spacing: 0.7em;
  text-indent: 0.7em;
  opacity: 0;
  animation: fade-up 0.5s ease 0.25s forwards;
}

.screen-flash {
  animation: screen-flash 380ms ease-out;
}

@keyframes field-spin {
  to { transform: rotate(360deg); }
}

@keyframes aurora-float {
  to { transform: translate(12vw, 8vw) scale(1.18); }
}

@keyframes speed-pulse {
  0%, 100% { transform: scale(0.88) rotate(0); opacity: 0.13; }
  50% { transform: scale(1.08) rotate(2deg); opacity: 0.3; }
}

@keyframes blink {
  50% { opacity: 0.28; transform: scale(0.72); }
}

@keyframes card-shine {
  0%, 58% { transform: translateX(-130%); }
  82%, 100% { transform: translateX(140%); }
}

@keyframes colon-pulse {
  0%, 100% { transform: translateY(-0.04em) scale(1); }
  50% { transform: translateY(-0.04em) scale(0.78); opacity: 0.62; }
}

@keyframes victory-breathe {
  50% { opacity: 0.88; transform: scale(1.018); }
}

@keyframes glitch {
  0%, 88%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
  89% { opacity: 0.7; clip-path: inset(20% 0 48% 0); }
  91% { clip-path: inset(66% 0 9% 0); }
  93% { opacity: 0; }
}

@keyframes button-sweep {
  0%, 50% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(130%); }
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@keyframes intro-line {
  50% { width: 72vw; }
  100% { width: 0; opacity: 0; }
}

@keyframes intro-score {
  to { opacity: 1; transform: scale(1); }
}

@keyframes intro-bump {
  50% { transform: scale(1.055); filter: brightness(1.3); }
}

@keyframes score-land {
  from { opacity: 0; transform: scale(1.22); filter: blur(10px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes fade-up {
  from { transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes screen-flash {
  0% { filter: brightness(1); }
  25% { filter: brightness(1.8); }
  100% { filter: brightness(1); }
}

@media (max-width: 900px) {
  .aurora {
    filter: blur(54px);
    animation: none;
  }

  .speed-lines {
    animation: none;
    opacity: 0.16;
  }

  .team,
  .live-tag,
  .cheer-button,
  .ticker {
    backdrop-filter: none;
  }

  .cursor-glow {
    display: none;
  }

  .stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    width: min(94vw, 720px);
    gap: 10px;
  }

  .score-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .team {
    grid-row: 2;
    min-height: 110px;
    padding: 18px 28px;
  }

  .team strong {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .team small {
    display: none;
  }

  .score {
    font-size: clamp(9rem, 36vw, 13rem);
  }

  .victory-word {
    margin-top: 6px;
  }

  .final-line {
    margin-top: 12px;
  }

  .round-flow {
    grid-template-columns: repeat(4, minmax(60px, 82px));
    gap: 6px;
    margin-top: 34px;
  }

  .round-result {
    min-height: 36px;
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
  }

  .live-tag {
    font-size: 0.7rem;
  }

  .stage {
    align-content: center;
  }

  .team {
    min-height: 92px;
    padding: 13px 22px;
  }

  .team-kicker {
    font-size: 0.62rem;
  }

  .score-wrap::before {
    top: 20%;
  }

  .score-wrap::after {
    bottom: 15%;
  }

  .score {
    font-size: clamp(8rem, 42vw, 11rem);
  }

  .victory-word {
    font-size: 2rem;
  }

  .final-line {
    font-size: 0.9rem;
  }

  .action-row {
    padding-bottom: 8px;
  }

  .ticker-track {
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  }

  .intro-score {
    font-size: clamp(8rem, 42vw, 11rem);
  }

  .round-flow {
    grid-template-columns: repeat(4, minmax(55px, 72px));
    gap: 5px;
    margin-top: 30px;
  }

  .round-result {
    min-height: 34px;
    gap: 4px;
    font-size: 0.67rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .intro {
    display: none;
  }
}
