/* ============================================================
   components.css —— 可复用组件样式（按钮、播放器、输入框等）
   ============================================================ */

/* ---------- 轮播控制按钮 ---------- */
.carousel-btn {
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.4);
}
.carousel-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 110, 199, 0.6);
}

/* ---------- 许愿按钮 ---------- */
.wish-btn {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 1.5rem;
  padding: 16px 48px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 50%, var(--gold) 100%);
  background-size: 200% 200%;
  color: white;
  cursor: pointer;
  letter-spacing: 4px;
  box-shadow: 0 8px 30px rgba(255, 110, 199, 0.5);
  animation: gradient-shift 3s ease infinite;
  transition: transform 0.3s;
}
.wish-btn:hover { transform: translateY(-3px) scale(1.05); }
.wish-btn:active { transform: translateY(0) scale(0.98); }

/* ---------- 音乐播放器（固定右上角） ---------- */
.music-player {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.music-btn {
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.music-btn:hover { transform: scale(1.1); }
.music-label {
  font-size: 0.85rem;
  color: var(--purple-deep);
  letter-spacing: 1px;
  font-weight: 600;
}
.music-wave {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
}
.wave-bar {
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}
.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }
.wave-bar:nth-child(5) { animation-delay: 0.3s; }

/* ---------- 弹幕输入区 ---------- */
.danmaku-input-group {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.danmaku-input {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border: 2px solid var(--glass-border);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.danmaku-input::placeholder { color: var(--text-soft); }
.danmaku-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 15px rgba(255, 110, 199, 0.4);
}
.send-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 110, 199, 0.5);
}
.danmaku-tip {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ---------- 蜡烛火焰 ---------- */
.candle-flame {
  display: inline-block;
  animation: flicker 0.3s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px #ff9500);
}

/* ---------- 火焰熄灭后的烟雾 ---------- */
.smoke {
  position: absolute;
  font-size: 2rem;
  opacity: 0;
  animation: smoke-rise 2s ease-out forwards;
  pointer-events: none;
}

/* ---------- 蛋糕 / 素龙装饰（SVG + 真实抠图PNG） ---------- */
.hero-cake svg, .cake-stage svg,
.hero-cake img, .cake-stage img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-cake { width: 180px; }
.cake-stage { width: 200px; position: relative; }

/* 首屏蛋糕图片（竖图919x1476） */
.cake-img {
  filter: drop-shadow(0 8px 20px rgba(255, 107, 165, 0.4));
  transition: transform 0.3s ease;
}
.hero-cake:hover .cake-img {
  transform: scale(1.05);
}

/* 互动区蛋糕图片 */
.cake-stage-img {
  filter: drop-shadow(0 6px 16px rgba(201, 163, 232, 0.5));
}

/* 火焰SVG叠加层（定位在蛋糕蜡烛上方） */
.flame-overlay {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 45%;
  height: auto;
  pointer-events: none;
}

/* SVG 火焰闪烁动画 */
.flame-anim {
  animation: flame-flicker 0.4s ease-in-out infinite alternate;
  transform-origin: center bottom;
}
@keyframes flame-flicker {
  from { transform: scaleY(1) scaleX(1); opacity: 1; }
  to   { transform: scaleY(1.2) scaleX(0.9); opacity: 0.85; }
}

/* 浮动素龙装饰 */
.sulong-deco {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
  animation: float-deco 6s ease-in-out infinite;
}
/* 素龙真实图片 */
.sulong-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}
/* 镜像翻转（第4只素龙用） */
.sulong-flip {
  transform: scaleX(-1);
}
.sulong-deco-1 { width: 130px; top: 10%; left: 2%; animation-delay: 0s; }
.sulong-deco-2 { width: 110px; top: 42%; left: 3%; animation-delay: 1.5s; }
.sulong-deco-3 { width: 120px; bottom: 6%; right: 3%; animation-delay: 3s; }
.sulong-deco-4 { width: 100px; top: 36%; right: 2%; animation-delay: 2s; }
@keyframes float-deco {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-15px) rotate(2deg); }
}

/* ---------- 响应式（组件相关） ---------- */
@media (max-width: 768px) {
  .music-label { display: none; }
  .hero-cake { width: 140px; }
  .cake-stage { width: 150px; }
  .sulong-deco-1 { width: 70px !important; top: 8% !important; }
  .sulong-deco-2 { width: 60px !important; top: 40% !important; }
  .sulong-deco-3 { width: 65px !important; bottom: 4% !important; }
  .sulong-deco-4 { width: 55px !important; top: 34% !important; }
}

/* 生日倒计时已移至入口闸门，生日页内隐藏该section */
section#countdown { display: none !important; }

/* ---------- 暖心祝福弹窗 ---------- */
.blessings-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.blessings-modal.modal-show {
  display: flex;
}
.blessings-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 11, 46, 0.6);
  backdrop-filter: blur(8px);
  animation: modal-fade-in 0.4s ease;
}
.blessings-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,240,246,0.95));
  border-radius: 24px;
  padding: 40px 32px 32px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.3), 0 0 0 1px rgba(255,255,255,0.5) inset;
  animation: modal-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.blessings-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 107, 165, 0.15);
  color: var(--purple-deep);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blessings-close:hover {
  background: rgba(255, 107, 165, 0.3);
  transform: rotate(90deg);
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 768px) {
  .blessings-modal-content {
    padding: 32px 20px 24px;
    border-radius: 20px;
  }
}

/* ---------- 网页功能未来建议（填写入口） ---------- */
#future {
  padding: 60px 20px 80px;
  background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.04) 50%, transparent);
}
.future-input-card {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.08);
}
.future-input-hint {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 1.1rem;
  color: var(--purple-deep);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.future-textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px 20px;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  font-size: 1rem;
  font-family: 'Noto Serif SC', serif;
  color: var(--purple-deep);
  background: rgba(255, 255, 255, 0.9);
  resize: vertical;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.future-textarea:focus {
  outline: none;
  border-color: var(--dream-purple, #a855f7);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}
.future-textarea::placeholder {
  color: #b0a0c0;
}
.future-submit-btn {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 1.05rem;
  letter-spacing: 3px;
  padding: 12px 36px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #a855f7, #f0abfc);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}
.future-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}
.future-submit-btn:active {
  transform: translateY(0);
}
.future-thanks {
  margin-top: 16px;
  font-size: 0.95rem;
  color: #a855f7;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.future-thanks.show {
  opacity: 1;
}

/* 建议记录列表 */
.future-records {
  max-width: 600px;
  margin: 32px auto 0;
}
.future-records-title {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 1.1rem;
  color: var(--purple-deep);
  margin-bottom: 16px;
  letter-spacing: 2px;
  text-align: center;
}
.future-records-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.future-record-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(168, 85, 247, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.3s ease;
}
.future-record-item:hover {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.08);
}
.future-record-content {
  flex: 1;
  font-size: 0.95rem;
  color: #4a3a5a;
  line-height: 1.6;
  word-break: break-word;
}
.future-record-time {
  font-size: 0.78rem;
  color: #a090b0;
  white-space: nowrap;
  flex-shrink: 0;
}
.future-record-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 107, 165, 0.1);
  color: #ff6ec7;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.future-record-delete:hover {
  background: rgba(255, 107, 165, 0.25);
  transform: rotate(90deg);
}
/* 滚动条美化 */
.future-records-list::-webkit-scrollbar {
  width: 6px;
}
.future-records-list::-webkit-scrollbar-track {
  background: rgba(168, 85, 247, 0.05);
  border-radius: 3px;
}
.future-records-list::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 3px;
}
.future-records-list::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

@media (max-width: 768px) {
  #future { padding: 40px 16px 60px; }
  .future-input-card { padding: 28px 20px; }
  .future-input-hint { font-size: 1rem; }
  .future-record-item { flex-wrap: wrap; }
  .future-record-time { width: 100%; margin-top: 4px; }
}
