/* ============ 基础与背景 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #fbe8ea;
  background: radial-gradient(120% 120% at 50% 0%, #3a1b2e 0%, #241126 45%, #160a18 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ 飘落花瓣背景 ============ */
#petals {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.falling-petal {
  position: absolute;
  top: -40px;
  border-radius: 150% 0 150% 150%;
  background: linear-gradient(135deg, #ff9eb0, #ff4d6d);
  opacity: 0.3;
  will-change: transform;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes fall {
  0%   { transform: translateY(-6vh) rotate(0deg); }
  100% { transform: translateY(112vh) rotate(360deg); }
}

/* ============ BGM 开关 ============ */
.bgm-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fbe8ea;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.bgm-toggle:active { background: rgba(255, 255, 255, 0.14); }

/* ============ 主内容 ============ */
.container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 48px;
  text-align: center;
}

.title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
  animation: fadeIn 1.4s ease both;
}

/* 标题里的表情单独一层,去掉字间距,保持紧凑 */
.title .title-emoji {
  letter-spacing: 0;
}

.subtitle {
  margin: 0 0 34px;
  font-size: 14px;
  letter-spacing: 2px;
  color: rgba(251, 232, 234, 0.62);
  animation: fadeIn 1.4s 0.2s ease both;
}

.buttons {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
}

.card {
  width: 100%;
  margin-bottom: 18px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #fbe8ea;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 1.2s ease both;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:nth-child(1) { animation-delay: 0.3s; }
.card:nth-child(2) { animation-delay: 0.42s; }
.card:nth-child(3) { animation-delay: 0.54s; }

.card:hover {
  border-color: rgba(255, 92, 119, 0.55);
  box-shadow: 0 6px 26px rgba(255, 92, 119, 0.2);
}
.card:active { transform: scale(0.97); background: rgba(255, 255, 255, 0.11); }

.card-emoji { font-size: 30px; line-height: 1; }
.card-label { font-size: 21px; font-weight: 600; letter-spacing: 2px; }
.card-hint { font-size: 13px; color: rgba(251, 232, 234, 0.6); }

.signature {
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: 1px;
  color: rgba(251, 232, 234, 0.72);
  animation: fadeIn 1.4s 0.8s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ 玫瑰绽放层 ============ */
.rose-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(42, 6, 18, 0.95) 0%, rgba(4, 1, 4, 0.99) 72%);
  animation: fadeIn 0.6s ease both;
}
.rose-overlay.hidden { display: none; }

.rose-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30;
  padding: 10px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.42);
  color: #fbe8ea;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
.rose-close:active { background: rgba(0, 0, 0, 0.6); }

.rose-video {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 60px rgba(255, 92, 119, 0.35);
  background: #000;
  cursor: pointer;
  animation: roseIn 0.6s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}
@keyframes roseIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* 播放完后的重播提示 */
.replay-hint {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 18px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: #fbe8ea;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.replay-hint.show { opacity: 1; }

.rose-caption {
  position: absolute;
  bottom: 8vh;
  width: 100%;
  text-align: center;
  font-size: 16px;
  letter-spacing: 3px;
  color: rgba(251, 232, 234, 0.85);
  animation: fadeIn 1.5s 3.4s ease both;
}

/* ============ 提示气泡 ============ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.72);
  color: #fbe8ea;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 40;
}
#toast.show { opacity: 1; }
