* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #fdf2f8 0%, #f5d0fe 48%, #c4b5fd 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
  overflow-x: hidden;
}

.hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hearts::before,
.hearts::after {
  content: "♡";
  position: absolute;
  color: rgba(219, 39, 119, 0.16);
  animation: float-heart 8s ease-in-out infinite;
}

.hearts::before { top: 10%; left: 7%; font-size: 64px; }
.hearts::after { bottom: 12%; right: 9%; font-size: 96px; animation-delay: -4s; }

@keyframes float-heart {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 420px;
}

.title {
  font-size: 28px;
  color: #a21caf;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.85);
  letter-spacing: 2px;
}

.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
}

#wheel {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(190, 24, 93, 0.35));
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 30px solid #db2777;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.spin-btn {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, #f472b6, #db2777 60%, #be185d);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.45), inset 0 -4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.spin-btn:active { transform: scale(0.96); }

.spin-btn:disabled {
  filter: grayscale(0.5) brightness(0.92);
  cursor: not-allowed;
}

.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(88, 28, 135, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.dialog-mask[hidden] { display: none; }

.dialog-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(88, 28, 135, 0.4);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #fdf2f8;
  color: #a21caf;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}

.dialog-title {
  color: #be185d;
  font-size: 20px;
  margin-bottom: 14px;
}

.dialog-text {
  color: #581c87;
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-line;
  background: #fdf2f8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}

.dialog-confirm {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 23px;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
}
