*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;
  font-family: "Alibaba PuHuiTi", "Inter", "PingFang SC", "Hiragino Sans GB", Helvetica, Arial, sans-serif;
  background-color: #3a0a08;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 237, 188, 0.18), transparent 50%),
    radial-gradient(circle at 80% 0%, rgba(255, 110, 64, 0.25), transparent 45%),
    radial-gradient(circle at 50% 70%, rgba(255, 186, 73, 0.18), transparent 60%),
    linear-gradient(135deg, #5a0a0a 0%, #8a0f0f 40%, #6a0a0a 100%);
  color: #fff7ed;
  overflow: hidden;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(255,255,255,0.05)' fill-rule='evenodd'%3E%3Cpath d='M10 10h4v4h-4zM70 70h4v4h-4zM30 90h4v4h-4zM90 150h4v4h-4zM130 40h4v4h-4z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  filter: blur(1px);
  z-index: 0;
  pointer-events: none;
}

.app-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 60%);
  z-index: 0;
}

.panel {
  position: relative;
  width: clamp(320px, 30vw, 420px);
  border-radius: 28px;
  padding: 48px 36px;
  text-align: center;
  backdrop-filter: blur(24px);
  background: rgba(180, 25, 20, 0.85);
  box-shadow: 0 25px 80px rgba(180, 25, 20, 0.55), inset 0 0 70px rgba(255, 213, 128, 0.08);
  border: 1px solid rgba(255, 213, 128, 0.35);
  transition: opacity 400ms ease, transform 400ms ease;
  z-index: 1;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 214, 143, 0.35);
  pointer-events: none;
}

.panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
  display: none;
}

.start-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffe4c7;
  text-shadow: 0 0 18px rgba(255, 215, 143, 0.35);
}

.start-desc {
  font-size: 16px;
  color: rgba(255, 238, 215, 0.86);
  margin-bottom: 32px;
  line-height: 1.5;
}

.primary-btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 18px 48px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a0b04;
  background: linear-gradient(120deg, #fff6b7 0%, #fbb034 35%, #ff512f 70%, #dd2476 100%);
  box-shadow: 0 20px 35px rgba(255, 136, 0, 0.45);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.primary-btn:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 12px 25px rgba(255, 136, 0, 0.35);
}

.experience-copy {
  margin-top: 24px;
  font-size: 18px;
  color: rgba(248, 250, 252, 0.85);
}

.hint {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 234, 204, 0.75);
  letter-spacing: 0.08em;
}

.fireworks-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.firework {
  position: absolute;
  display: inline-flex;
  width: var(--size, 64px);
  height: var(--size, 64px);
  align-items: center;
  justify-content: center;
  font-size: var(--font, 42px);
  animation: firework-burst var(--duration, 2200ms) ease-out forwards;
  filter: drop-shadow(0 0 12px rgba(255, 215, 91, 0.8));
}

.firework-ring {
  border: 3px solid var(--ring-color, currentColor);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 65%);
  animation: firework-ring var(--duration, 2200ms) ease-out forwards;
}

.firework-cluster {
  width: 16px;
  height: 16px;
  animation: none;
}

.firework-cluster span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
  animation: cluster-pop 1100ms ease-out forwards;
  animation-delay: var(--delay, 0s);
}

.firework-petal {
  width: 20px;
  height: 20px;
  animation: none;
}

.firework-petal span {
  position: absolute;
  width: 16px;
  height: 42px;
  border-radius: 50% 50% 15% 15%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent);
  background-color: var(--petal-color, currentColor);
  opacity: 0.95;
  transform-origin: center 80%;
  transform: rotate(var(--rotate, 0)) scale(0);
  animation: petal-flare var(--duration, 1800ms) ease-out forwards;
}

.burst-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: burst-particle 1500ms ease-out forwards;
}

.trail {
  position: absolute;
  width: 3px;
  height: 140px;
  background: linear-gradient(180deg, rgba(255, 250, 215, 0.95), rgba(255, 250, 215, 0));
  opacity: 0.4;
  transform-origin: top;
  animation: trail-rise 900ms ease-out forwards;
}

@keyframes trail-rise {
  0% {
    opacity: 0;
    transform: scaleY(0.2) translateY(40px);
  }
  40% {
    opacity: 0.7;
    transform: scaleY(0.9) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: scaleY(1.1) translateY(-40px);
  }
}

@keyframes firework-burst {
  0% {
    opacity: 0;
    transform: scale(0.2) translate(-50%, -50%);
  }
  20% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: scale(0.4) translate(-50%, -90%);
  }
}

@keyframes firework-ring {
  0% {
    opacity: 0;
    transform: scale(0.2) translate(-50%, -50%);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.6) translate(-50%, -50%);
  }
}

.music-pill {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 214, 143, 0.4);
  font-size: 14px;
  color: rgba(255, 239, 214, 0.85);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  letter-spacing: 0.05em;
}

.music-pill.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  transition: opacity 200ms ease;
}

.music-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fcd34d;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(0.7);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.confetti-piece {
  position: absolute;
  width: var(--width, 10px);
  height: var(--height, 30px);
  background: var(--color, #fff);
  border-radius: 4px;
  opacity: 0.9;
  animation: confetti-fall var(--duration, 4s) linear forwards;
}

.confetti-piece[data-twist="true"] {
  animation: confetti-fall var(--duration, 4s) linear forwards, confetti-spin 800ms ease-in-out infinite;
}

.blessing-text {
  position: fixed;
  z-index: 2;
  font-family: "STSong", "Songti SC", "Long Cang", "Ma Shan Zheng", "KaiTi", serif;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: #fff0c9;
  text-shadow: 0 0 12px rgba(255, 214, 143, 0.65), 0 0 32px rgba(255, 108, 67, 0.55);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(0.6);
  animation: blessing-float var(--duration, 6s) ease-out forwards;
}

@keyframes burst-particle {
  0% {
    opacity: 1;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.6);
  }
  90% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.2);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10%) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) rotate(var(--rotate, 160deg));
    opacity: 0;
  }
}

@keyframes confetti-spin {
  0% {
    transform: rotateX(0deg);
  }
  100% {
    transform: rotateX(360deg);
  }
}

.wealth-symbol {
  position: fixed;
  z-index: 2;
  font-size: var(--size, 48px);
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
  animation: wealth-rise var(--duration, 5s) ease-out forwards;
}

@keyframes wealth-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 20%) scale(0.6);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%) scale(1.2);
  }
}

@keyframes blessing-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes cluster-pop {
  0% {
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.2);
  }
}

@keyframes petal-flare {
  0% {
    opacity: 0;
    transform: rotate(var(--rotate, 0)) scale(0.2);
  }
  40% {
    opacity: 1;
    transform: rotate(var(--rotate, 0)) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--rotate, 0)) scale(0.4);
  }
}

@media (max-width: 640px) {
  .panel {
    width: 90vw;
    padding: 36px 20px;
  }

  .primary-btn {
    width: 100%;
  }
}

