:root {
  color-scheme: dark;
  --bg: #0c0908;
  --panel: #16131a;
  --panel-strong: #1c1717;
  --gold: #e5a33d;
  --gold-light: #f5c86b;
  --cream: #f5efe6;
  --muted: rgba(245, 239, 230, 0.6);
  --line: rgba(229, 163, 61, 0.28);
  --red: #e46a54;
  --danger: #ff8c78;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #160b0a;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 18%, rgba(33, 156, 201, 0.08), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(158, 39, 147, 0.1), transparent 27rem),
    linear-gradient(180deg, #170c0b 0%, #0d0b0c 60%, #090809 100%);
  color: var(--cream);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: -10px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 6, 8, 0.38), rgba(8, 6, 8, 0.78)),
    url("/assets/hero-arena-mobile.webp") center 18% / cover no-repeat;
  content: "";
  opacity: 0.42;
}

body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(245, 200, 107, 0.06) 50%, transparent 50.2%),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(245, 200, 107, 0.025) 80px);
  content: "";
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.site-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 860px);
  margin: 0 auto;
  overflow: hidden;
  background: rgba(11, 10, 12, 0.78);
  border-inline: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.hero {
  position: relative;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.06) 0%, rgba(12, 9, 8, 0.38) 56%, #0c0908 100%),
    url("/assets/hero-arena-mobile.webp") center 34% / cover no-repeat;
  background-color: #32120d;
}

.hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 38%, transparent 62%, rgba(0, 0, 0, 0.24)),
    radial-gradient(circle at 50% 38%, transparent 0, rgba(6, 6, 8, 0.04) 42%, rgba(6, 6, 8, 0.48) 100%);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 7% 42%, rgba(30, 192, 255, 0.2), transparent 26%),
    radial-gradient(circle at 91% 20%, rgba(205, 49, 228, 0.2), transparent 28%),
    linear-gradient(115deg, transparent 0 38%, rgba(245, 200, 107, 0.045) 50%, transparent 62%);
  content: "";
  mix-blend-mode: screen;
}

.hero-shade {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(12, 9, 8, 0.62) 66%, var(--bg));
}

.hero-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(24px, env(safe-area-inset-top)) 22px 0;
}

.event-tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid rgba(245, 200, 107, 0.42);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(229, 163, 61, 0.2), rgba(245, 200, 107, 0.08));
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}

.music-toggle {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(229, 163, 61, 0.38);
  border-radius: 50%;
  background: rgba(11, 10, 14, 0.65);
  color: rgba(245, 239, 230, 0.56);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.music-toggle:hover {
  border-color: rgba(245, 200, 107, 0.76);
  color: var(--gold-light);
}

.music-toggle.is-playing {
  border-color: rgba(245, 200, 107, 0.9);
  color: var(--gold-light);
  box-shadow: 0 0 0 0 rgba(245, 200, 107, 0.25);
  animation: breathe 2.8s ease-in-out infinite;
}

.music-toggle .icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.music-toggle .icon path:first-child {
  fill: currentColor;
  stroke: none;
}

.music-toggle .icon-muted {
  display: block;
}

.music-toggle .icon-speaker {
  display: none;
}

.music-toggle.is-playing .icon-muted {
  display: none;
}

.music-toggle.is-playing .icon-speaker {
  display: block;
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 6px rgba(245, 200, 107, 0);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 24px 96px;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 16px;
  color: rgba(245, 239, 230, 0.78);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.hero h1 {
  margin: 0;
  background: linear-gradient(180deg, #ffe3a2 0%, #f5c86b 42%, #c78628 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(58px, 11vw, 88px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 0.96;
  filter: drop-shadow(0 6px 20px rgba(229, 163, 61, 0.22));
}

.hero-rule {
  width: 108px;
  height: 1px;
  margin: 24px 0 18px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.hero-subtitle {
  margin: 0;
  color: rgba(245, 239, 230, 0.7);
  font-size: 15px;
  letter-spacing: 0.34em;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 25px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  color: rgba(245, 239, 230, 0.52);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateX(-50%);
}

.scroll-cue svg {
  width: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  50% {
    transform: translateY(5px);
  }
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 24px 18px 16px;
}

.info-strip div {
  min-height: 83px;
  padding: 16px;
  border: 1px solid rgba(229, 163, 61, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(31, 24, 21, 0.92), rgba(20, 16, 18, 0.88));
}

.info-strip span,
.card-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.info-strip strong {
  color: var(--gold-light);
  font-size: 14px;
  line-height: 1.5;
}

.content-section {
  padding: 54px 18px 20px;
}

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

.section-heading > span {
  color: rgba(229, 163, 61, 0.5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.32em;
}

.section-heading h2 {
  margin: 5px 0 0;
  color: var(--gold-light);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 30px;
  letter-spacing: 0.05em;
}

.section-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-heading.compact {
  margin-bottom: 26px;
}

.feature-grid {
  display: grid;
  gap: 12px;
}

.feature-card {
  padding: 22px;
  border: 1px solid rgba(229, 163, 61, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(27, 22, 22, 0.96), rgba(19, 16, 20, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 79.5h80M79.5 0v80' stroke='%23e5a33d' stroke-opacity='.04'/%3E%3C/svg%3E");
}

.feature-card h3 {
  margin: 0 0 8px;
  color: var(--cream);
  font-size: 17px;
}

.feature-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.date-chips span {
  padding: 5px 9px;
  border: 1px solid rgba(229, 163, 61, 0.27);
  border-radius: 6px;
  background: rgba(229, 163, 61, 0.08);
  color: var(--gold-light);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.prize-section {
  padding-top: 60px;
}

.prize-list {
  display: grid;
  gap: 10px;
}

.prize-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 16px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(105deg, rgba(26, 22, 22, 0.98), rgba(18, 15, 17, 0.94));
}

.prize-card::after {
  position: absolute;
  top: -35px;
  right: -15px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(229, 163, 61, 0.045);
  content: "";
}

.prize-card span {
  color: var(--muted);
  font-size: 13px;
}

.prize-card strong {
  grid-row: span 2;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 27px;
}

.prize-card small {
  color: rgba(245, 239, 230, 0.48);
  font-size: 11px;
}

.prize-card.champion {
  border-color: rgba(245, 200, 107, 0.5);
  background: linear-gradient(105deg, rgba(70, 45, 18, 0.7), rgba(23, 18, 19, 0.96));
}

.prize-card.champion strong {
  font-size: 32px;
}

.prize-note {
  margin: 14px 0 0;
  color: rgba(245, 239, 230, 0.42);
  font-size: 11px;
  text-align: center;
}

.notice-list {
  display: grid;
  gap: 8px;
}

.notice-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
  background: rgba(24, 20, 22, 0.72);
}

.notice-list b {
  color: rgba(229, 163, 61, 0.62);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.notice-list h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.notice-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.notice-list .warning {
  border-color: rgba(228, 106, 84, 0.28);
  background: rgba(63, 28, 24, 0.3);
}

.notice-list .warning b {
  color: var(--red);
}

.registration-section {
  margin-top: 46px;
  padding: 48px 14px 64px;
  border-top: 1px solid rgba(229, 163, 61, 0.12);
  background:
    radial-gradient(circle at 50% 0, rgba(153, 53, 21, 0.14), transparent 24rem),
    linear-gradient(180deg, rgba(17, 13, 13, 0.86), rgba(11, 9, 10, 0.96));
}

.registration-form {
  display: grid;
  gap: 14px;
  max-width: 650px;
  margin: 0 auto;
}

.form-block {
  display: grid;
  gap: 15px;
  min-width: 0;
  margin: 0;
  padding: 21px 17px;
  border: 1px solid rgba(229, 163, 61, 0.2);
  border-radius: 18px;
  background: var(--panel);
}

.form-block legend {
  padding: 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
}

.field em {
  color: var(--danger);
  font-style: normal;
}

.field input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid rgba(229, 163, 61, 0.3);
  border-radius: 11px;
  outline: none;
  background: #0f0d10;
  color: var(--cream);
  caret-color: var(--gold);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input::placeholder {
  color: rgba(245, 239, 230, 0.3);
}

.field input:focus {
  border-color: rgba(245, 200, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(229, 163, 61, 0.1);
}

.field input[aria-invalid="true"] {
  border-color: rgba(255, 140, 120, 0.75);
}

.field small,
.check-row small {
  min-height: 0;
  color: var(--danger);
  font-size: 11px;
}

.field small:empty,
.check-row small:empty {
  display: none;
}

.members-container {
  display: grid;
  gap: 9px;
}

.member-card {
  overflow: hidden;
  border: 1px solid rgba(229, 163, 61, 0.29);
  border-radius: 14px;
  background: var(--panel);
}

.member-toggle {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 17px;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  text-align: left;
}

.member-toggle strong {
  font-size: 14px;
  font-weight: 600;
}

.member-toggle span {
  color: var(--muted);
  font-size: 12px;
}

.member-toggle span::after {
  display: inline-block;
  margin-left: 8px;
  color: var(--gold);
  content: "⌄";
  transform: translateY(-2px);
  transition: transform 180ms ease;
}

.member-card.expanded .member-toggle span::after {
  transform: rotate(180deg) translateY(2px);
}

.member-fields {
  display: none;
  gap: 13px;
  padding: 4px 17px 18px;
  border-top: 1px solid rgba(229, 163, 61, 0.15);
}

.member-card.expanded .member-fields {
  display: grid;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 2px 0;
  color: var(--cream);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--gold);
}

.check-row small {
  grid-column: 2;
}

.form-alert {
  padding: 12px 14px;
  border: 1px solid rgba(255, 140, 120, 0.4);
  border-radius: 10px;
  background: rgba(92, 34, 26, 0.34);
  color: #ffc0b4;
  font-size: 12px;
  line-height: 1.6;
}

.submit-button,
.primary-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #f4cc7b;
  border-radius: 12px;
  background: linear-gradient(115deg, #e5a33d 0%, #ffd47c 50%, #c9852c 100%);
  box-shadow: 0 12px 32px rgba(197, 123, 40, 0.2);
  color: #251608;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, filter 160ms ease;
}

.submit-button:hover,
.primary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: wait;
  filter: grayscale(0.35) brightness(0.75);
  transform: none;
}

.submit-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.site-footer {
  padding: 44px 22px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #090809;
  color: rgba(245, 239, 230, 0.35);
  font-size: 11px;
  text-align: center;
}

.site-footer p {
  margin: 5px 0;
}

.footer-title {
  color: var(--gold);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  text-align: left;
}

.footer-bottom a {
  color: rgba(245, 200, 107, 0.58);
  text-decoration: none;
}

.success-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(5, 5, 7, 0.82);
  backdrop-filter: blur(8px);
}

.success-dialog[hidden],
.toast[hidden] {
  display: none;
}

.success-panel {
  width: min(100%, 410px);
  padding: 32px 24px 24px;
  border: 1px solid rgba(245, 200, 107, 0.44);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(196, 119, 33, 0.18), transparent 14rem),
    #151216;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid rgba(245, 200, 107, 0.55);
  border-radius: 50%;
  background: rgba(229, 163, 61, 0.1);
  color: var(--gold-light);
  font-size: 27px;
}

.dialog-kicker {
  margin: 0;
  color: rgba(229, 163, 61, 0.55);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.success-panel h2 {
  margin: 8px 0;
  color: var(--gold-light);
  font-size: 24px;
}

.success-panel > p:not(.dialog-kicker) {
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.number-box {
  margin: 23px 0;
  padding: 15px;
  border: 1px solid rgba(229, 163, 61, 0.24);
  border-radius: 12px;
  background: #0f0d10;
}

.number-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.number-box strong {
  color: var(--gold-light);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 21px;
  letter-spacing: 0.06em;
}

.primary-button {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: auto;
  padding: 11px 16px;
  border: 1px solid rgba(229, 163, 61, 0.4);
  border-radius: 999px;
  background: rgba(28, 22, 19, 0.96);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font-size: 12px;
}

@media (min-width: 700px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(8, 6, 8, 0.36), rgba(8, 6, 8, 0.78)),
      url("/assets/hero-arena-wide.webp") center 18% / cover no-repeat;
  }

  .hero {
    min-height: 720px;
    background:
      linear-gradient(180deg, rgba(8, 8, 10, 0.05) 0%, rgba(12, 9, 8, 0.36) 56%, #0c0908 100%),
      url("/assets/hero-arena-wide.webp") center 32% / cover no-repeat;
  }

  .hero-top {
    padding-inline: 28px;
  }

  .info-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 28px;
  }

  .content-section {
    padding-inline: 34px;
  }

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

  .feature-card:first-child {
    grid-column: 1 / -1;
  }

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

  .prize-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .prize-card strong {
    grid-row: auto;
    margin: 12px 0 8px;
  }

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

  .registration-section {
    padding-inline: 34px;
  }

  .form-block {
    padding: 24px;
  }
}

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