:root {
  --ink: #05050f;
  --gold: #ffd76a;
  --violet: #7c5cff;
  --cyan: #38e8ff;
  --pink: #ff5cae;
  --white: #f7f7ff;
  --muted: rgba(230, 232, 255, 0.55);
  --line: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

body {
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---------------------------------------------------------------- 背景 */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -20%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(56, 232, 255, 0.10), transparent 55%),
    var(--ink);
}

.aurora {
  position: absolute;
  width: 68vmax;
  height: 68vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.a1 {
  left: -22vmax;
  top: -26vmax;
  background: radial-gradient(circle at 30% 30%, rgba(124, 92, 255, 0.85), transparent 62%);
  animation: drift1 18s ease-in-out infinite alternate;
}

.a2 {
  right: -24vmax;
  top: -18vmax;
  background: radial-gradient(circle at 60% 40%, rgba(255, 92, 174, 0.55), transparent 62%);
  animation: drift2 22s ease-in-out infinite alternate;
}

.a3 {
  left: 18vmax;
  bottom: -40vmax;
  background: radial-gradient(circle at 50% 50%, rgba(56, 232, 255, 0.45), transparent 62%);
  animation: drift3 26s ease-in-out infinite alternate;
}

@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(14vmax, 8vmax, 0) scale(1.25); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-12vmax, 10vmax, 0) scale(0.9); }
}
@keyframes drift3 {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to { transform: translate3d(10vmax, -12vmax, 0) scale(1.2); }
}

.grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  opacity: 0.45;
  transform: perspective(600px) rotateX(52deg) translateY(12%) scale(1.6);
  transform-origin: center 70%;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 35%, rgba(0, 0, 0, 0.62) 100%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}

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

/* ---------------------------------------------------------------- 布局 */
.stage {
  position: relative;
  z-index: 2;
  height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding:
    calc(20px + env(safe-area-inset-top))
    clamp(18px, 5vw, 56px)
    calc(18px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.live { display: inline-flex; align-items: center; gap: 8px; }

.live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48ff9b;
  box-shadow: 0 0 12px #48ff9b;
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------------- 主视觉 */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(14px, 2.4vh, 26px);
  transform:
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 30px rgba(124, 92, 255, 0.18) inset;
}

.title {
  position: relative;
  margin: 0;
  font-size: clamp(3.3rem, 16.5vw, 12rem);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0.015em;
  white-space: nowrap;
  color: transparent;
  background-image: linear-gradient(
    100deg,
    #ffffff 0%,
    var(--gold) 18%,
    var(--pink) 38%,
    var(--violet) 58%,
    var(--cyan) 78%,
    #ffffff 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 9s linear infinite;
  filter:
    drop-shadow(0 0 22px rgba(124, 92, 255, 0.45))
    drop-shadow(0 0 60px rgba(255, 92, 174, 0.22));
  transform: translateZ(40px);
}

.title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  background: inherit;
  background-size: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(26px);
  opacity: 0.55;
}

.title.pop {
  animation: shimmer 9s linear infinite, pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 280% 50%; }
}

@keyframes pop {
  0% { transform: translateZ(40px) scale(1); }
  38% { transform: translateZ(40px) scale(1.06); }
  100% { transform: translateZ(40px) scale(1); }
}

.subtitle {
  margin: 0;
  font-size: clamp(12px, 1.6vw, 16px);
  letter-spacing: 0.42em;
  color: rgba(235, 236, 255, 0.6);
  transform: translateZ(20px);
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateZ(30px);
}

.cta {
  position: relative;
  appearance: none;
  border: none;
  padding: 1px;
  border-radius: 999px;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--gold),
    var(--pink),
    var(--violet),
    var(--cyan),
    var(--gold)
  );
  cursor: pointer;
  outline: none;
  animation: spin 6s linear infinite;
  box-shadow: 0 18px 50px -18px rgba(124, 92, 255, 0.85);
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin {
  to { --angle: 360deg; }
}

.cta span {
  display: block;
  padding: 15px 44px;
  border-radius: 999px;
  background: rgba(8, 8, 22, 0.86);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cta:hover span { background: rgba(18, 18, 40, 0.9); }
.cta:active span { transform: scale(0.97); }

.hint {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(230, 232, 255, 0.36);
}

/* ---------------------------------------------------------------- 底部 */
.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(230, 232, 255, 0.4);
}

.counter { display: flex; align-items: baseline; gap: 8px; }

.counter b {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.tags { display: flex; gap: 8px; }

.tags span {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------------- 闪光 */
.flash {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--fx, 50%) var(--fy, 50%),
    rgba(255, 255, 255, 0.55),
    rgba(124, 92, 255, 0.16) 28%,
    transparent 62%
  );
}

.flash.on { animation: flash 0.55s ease-out; }

@keyframes flash {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* ---------------------------------------------------------------- 手机 */
@media (max-width: 640px) {
  .title {
    font-size: clamp(2.4rem, 15vw, 5rem);
    letter-spacing: -0.01em;
  }
  .subtitle { letter-spacing: 0.3em; }
  .badge { font-size: 9px; padding: 7px 13px; }
  .topbar { font-size: 9px; letter-spacing: 0.2em; }
  .tags { display: none; }
  .footer { justify-content: center; }
  .hint { font-size: 9px; }
  .grid { opacity: 0.3; }
}

@media (max-height: 560px) {
  .title { font-size: clamp(2.4rem, 12vw, 4.5rem); }
  .badge { display: none; }
  .hero { gap: 10px; }
}

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