/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  overflow: hidden;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  min-height: 100vh;
}

/* 页面切换 */
.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
  z-index: 1;
}

.page.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

#mainPage {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* 动态背景 */
.dynamic-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.dynamic-background::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: block;
  width: 150%;
  height: 140%;
  background: radial-gradient(
    ellipse at 50% 55%,
    transparent 10%,
    rgba(102, 126, 234, 0.1) 50%
  );
  transform: translate3d(-50%, -50%, 0);
  content: "";
}

.dynamic-background::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 75%, #ff6b6b 20%, transparent 75%);
  mix-blend-mode: overlay;
  transform: translate3d(-50%, -50%, 0);
  content: "";
}

@keyframes aura-glow {
  0% {
    background-position: 0 100%;
  }
  100% {
    background-position: 0 300%;
  }
}

.background-aura {
  position: absolute;
  top: -71.5%;
  left: 50%;
  z-index: 3;
  width: 30%;
  height: 140%;
  background: linear-gradient(
      20deg,
      #ff6b6b,
      #ee5a2420 16.5%,
      #ff6b9d 33%,
      #ff6b9d20 49.5%,
      #667eea 66%,
      #667eea60 85.5%,
      #764ba2 100%
    )
    0 100% / 100% 200%;
  border-radius: 0 0 100% 100%;
  filter: blur(50px);
  mix-blend-mode: plus-lighter;
  opacity: 0.3;
  transform: translate3d(-50%, 0, 0);
  animation: aura-glow 8s infinite linear;
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    transparent,
    transparent 1px,
    rgba(255, 255, 255, 0.02) 1px,
    rgba(255, 255, 255, 0.02) 2px
  );
  mix-blend-mode: overlay;
  opacity: 0.3;
}

.background-canvas {
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 主页面样式 */
.birthday-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: transparent; /* 改为透明，显示动态背景 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20; /* 确保在动态背景之上 */
  overflow: hidden;
}

/* 背景动画元素 */
.hearts-bg,
.stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hearts-bg::before {
  content: "💕";
  position: absolute;
  font-size: 20px;
  animation: float 6s ease-in-out infinite;
  top: 10%;
  left: 10%;
}

.hearts-bg::after {
  content: "💖";
  position: absolute;
  font-size: 25px;
  animation: float 8s ease-in-out infinite reverse;
  top: 20%;
  right: 15%;
}

.stars-bg::before {
  content: "✨";
  position: absolute;
  font-size: 18px;
  animation: twinkle 4s ease-in-out infinite;
  bottom: 20%;
  left: 20%;
}

.stars-bg::after {
  content: "⭐";
  position: absolute;
  font-size: 22px;
  animation: twinkle 5s ease-in-out infinite reverse;
  bottom: 30%;
  right: 25%;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 生日内容 */
.birthday-content {
  position: relative;
  z-index: 5;
  max-width: 600px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: slideInUp 1s ease-out;
}

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

.birthday-title {
  font-size: 2.5rem;
  color: #e91e63;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.birthday-date {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

/* 蛋糕样式 */
.cake-section {
  position: relative;
  display: inline-block;
}

.birthday-cake {
  width: 200px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.cake-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.3) 0%,
    transparent 70%
  );
  border-radius: 25px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* 祝福文字 */
.blessing-title {
  font-size: 2rem;
  color: #e91e63;
  margin-bottom: 15px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.blessing-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
}

/* 音乐启动覆盖层 */
.music-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.music-start-content {
  text-align: center;
  color: white;
}

.music-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: musicPulse 2s infinite;
}

@keyframes musicPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.music-start-content p {
  font-size: 18px;
  margin: 0;
}

/* 音乐控制按钮 */
.music-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.btn-music {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
  transition: all 0.3s ease;
}

.btn-music:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.btn-music.muted {
  background: linear-gradient(45deg, #666, #999);
}

/* 音乐播放提示 */
.music-prompt {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 按钮样式 */
.btn-romantic {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
}

.btn-romantic:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
  color: white;
}

/* 相册页面 */
.photo-container {
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  padding: 20px 20px 120px 20px; /* 底部留出120px空间 */
}

.photo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.photo-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 80%;
  max-height: calc(100vh - 220px); /* 减去头部和底部控制器的高度 */
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.photo-card img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 15px;
  object-fit: cover;
  transition: all 0.8s ease-in-out;
}

/* 转场遮罩层 */
.transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* 雾化效果 */
.fog-transition {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 0%,
    transparent 70%
  );
  animation: fogEffect 1.5s ease-in-out;
}

@keyframes fogEffect {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* 星光效果 */
.starlight-transition {
  background: radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(2px 2px at 40% 70%, #fff, transparent),
    radial-gradient(1px 1px at 90% 40%, #fff, transparent),
    radial-gradient(1px 1px at 50% 50%, #fff, transparent);
  animation: starlight 2s ease-in-out;
}

@keyframes starlight {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* 风车效果 */
.windmill-transition {
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 182, 193, 0.6),
    transparent,
    rgba(255, 182, 193, 0.6),
    transparent
  );
  animation: windmill 2s ease-in-out;
}

@keyframes windmill {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0);
  }
  50% {
    opacity: 0.8;
    transform: rotate(180deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(360deg) scale(1.2);
  }
}

/* 爱心遮罩效果 */
.heart-transition {
  background: radial-gradient(
    circle,
    rgba(255, 105, 180, 0.7) 0%,
    transparent 70%
  );
  animation: heartMask 1.8s ease-in-out;
}

.heart-transition::before {
  content: "💕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  animation: heartPulse 1.8s ease-in-out;
}

@keyframes heartMask {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  30% {
    opacity: 0.9;
    transform: scale(1.1);
  }
  70% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes heartPulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  30% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  70% {
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
  }
}

/* 相片淡入淡出效果 */
.photo-fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.photo-fade-in {
  opacity: 1;
  transform: scale(1);
}

.photo-info {
  margin-top: 15px;
}

.photo-info p {
  margin: 5px 0;
  color: #666;
}

/* 故事集标题覆盖层 */
.story-title-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.5s ease-in;
}

.story-title-content {
  text-align: center;
  color: white;
  padding: 40px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 107, 0.9),
    rgba(238, 90, 36, 0.9)
  );
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.story-title-content h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.story-title-content p {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Swiper轮播样式 */
.photo-swiper {
  width: 100%;
  height: 60vh;
  margin: 20px 0;
}

.photo-swiper .swiper-wrapper {
  display: flex;
  align-items: center;
}

.photo-swiper .swiper-slide {
  text-align: center;
  font-size: 18px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.photo-swiper .swiper-slide-active {
  transform: scale(1);
  opacity: 1;
  z-index: 10;
}

.photo-swiper .swiper-slide-prev,
.photo-swiper .swiper-slide-next {
  transform: scale(0.9);
  opacity: 0.8;
  z-index: 5;
}

.photo-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  user-select: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .photo-swiper {
    height: 50vh;
  }

  .photo-swiper .swiper-slide {
    transform: scale(1); /* 手机端不缩放 */
  }

  .photo-swiper .swiper-slide-active {
    transform: scale(1);
  }

  .photo-swiper .swiper-slide img {
    max-height: 45vh;
  }

}

/* 照片信息面板 */
.photo-info-panel {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.photo-date {
  color: #ff6b6b;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.photo-description {
  color: white;
  font-size: 1rem;
  margin: 0;
  opacity: 0.9;
}

/* 文字波浪动画 */
.photo-info-content .char {
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.photo-info-content .char span {
  display: inline-block;
  will-change: transform; /* 启用硬件加速 */
  transform: translateZ(0); /* 强制GPU加速 */
  backface-visibility: hidden; /* 防止闪烁 */
  transition: none; /* 移除CSS过渡，避免冲突 */
}

/* 照片信息面板优化 */
.photo-info-panel {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  transform: translateZ(0); /* 创建新的层叠上下文 */
}

/* 底部控制器 */
.photo-controls-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.3)
  );
  padding: 15px 20px 25px 20px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* 照片墙页面样式 */
#photoWallPage {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.photo-wall-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.photo-wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.photo-wall-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
}

/* 3D球体照片墙样式 */
:root {
    --radius: max(800px, 60vw);
    --circ: calc(var(--radius) * 3.14);
    --segments-x: 20;
    --segments-y: 20;
    --sphere-rotation-y: 0;
    --sphere-rotation-x: 0;
    --offset-x: 0;
    --offset-y: 0;
    --rot-y: calc((360deg / var(--segments-x)) / 2);
    --rot-x: calc((360deg / var(--segments-y)) / 2);
    --rot-y-delta: 0deg;
    --item-width: calc((var(--circ) / var(--segments-x)));
    --item-height: calc((var(--circ) / var(--segments-y)));
    --item-size-x: 1;
    --item-size-y: 1;
    --gradient: radial-gradient(rgba(255, 154, 158, 0) 65%, rgba(255, 154, 158, 0.5) 100%);
    --gradient-blur: radial-gradient(rgba(255, 154, 158, 0) 70%, rgba(255, 154, 158, 0.5) 90%);
    --bg-scrim: rgba(255, 107, 107, 0.4);
    --item-bg: rgba(255, 255, 255, 0.9);
}

.stage {
    perspective: calc(var(--radius) * 2);
}

.sphere {
    transform: translateZ(calc(var(--radius) * -1)) rotateY(var(--sphere-rotation-y)) rotateX(var(--sphere-rotation-x));
    transform-style: preserve-3d;
}

.overlay {
    background-image: var(--gradient);
    position: fixed;
    inset: 0;
    margin: auto;
    z-index: 3;
    content: "";
    pointer-events: none;
    opacity: 1;
}

.overlay--blur {
    mask-image: var(--gradient-blur);
    backdrop-filter: blur(3px);
    position: fixed;
    inset: 0;
    margin: auto;
    z-index: 3;
    opacity: 1;
    content: "";
    pointer-events: none;
}

.item {
    width: calc(var(--item-width) * var(--item-size-x));
    height: calc(var(--item-height) * var(--item-size-y));
    position: absolute;
    transform-origin: 50% 50%;
    top: -999px;
    bottom: -999px;
    left: -999px;
    right: -999px;
    margin: auto;
    backface-visibility: hidden;
    color: transparent;
    transform-style: preserve-3d;
    transition: transform 300ms;
    transform: rotateY(calc(var(--rot-y) * (var(--offset-x) + ((var(--item-size-x) - 1) / 2)) + var(--rot-y-delta, 0deg))) rotateX(calc(calc(var(--rot-x) * (var(--offset-y) - ((var(--item-size-y) - 1) / 2))) + var(--rot-x-delta, 0deg))) translateZ(var(--radius));
}

.item__image {
    position: absolute;
    display: block;
    inset: 10px;
    border-radius: 12px;
    background-color: var(--item-bg);
    overflow: hidden;
    backface-visibility: hidden;
    transition: transform 300ms;
}

.item__image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    pointer-events: none;
    backface-visibility: hidden;
}

.viewer {
    position: absolute;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px;
}

.viewer .frame {
    height: 100%;
    aspect-ratio: 1;
    border-radius: 32px;
    display: flex;
}

.viewer .enlarge {
    position: absolute;
    z-index: 1;
    border-radius: 32px;
    overflow: hidden;
    transition: opacity 300ms;
}

.viewer .enlarge img {
    width: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.viewer .scrim {
    position: absolute;
    inset: 0;
    background-color: var(--bg-scrim);
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms;
    backdrop-filter: blur(3px);
}

[data-enlarging="true"] .scrim {
    opacity: 1;
    pointer-events: all;
}

@media (max-aspect-ratio: 1/1) {
    .viewer .frame {
        height: auto;
        width: 100%;
    }
}

/* 移动端底部控制器优化 */
@media (max-width: 768px) {
  .photo-controls-bottom {
    padding: 10px 15px 20px 15px;
  }

  .control-buttons {
    gap: 15px;
  }

  .control-btn {
    width: 40px;
    height: 40px;
  }

  .progress-info {
    font-size: 0.9rem;
  }

  .photo-info-panel {
    margin: 10px 0;
    padding: 15px;
  }

  .photo-date {
    font-size: 1rem;
  }

  .photo-description {
    font-size: 0.9rem;
  }
}

.controls-container {
  max-width: 600px;
  margin: 0 auto;
}

.progress-section {
  margin-bottom: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff6b6b);
  border-radius: 6px;
  z-index: -1;
  animation: progressGlow 2s ease-in-out infinite alternate;
}

@keyframes progressGlow {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.progress {
  height: 100%;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.progress-info {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.control-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.control-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.control-btn:hover::before {
  transform: translateX(100%);
}

.control-btn:hover {
  transform: scale(1.1);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.2)
  );
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.play-pause-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.play-pause-btn:hover {
  background: linear-gradient(135deg, #ee5a24, #ff6b6b);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

.heart-btn:hover {
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

.music-btn:hover {
  background: linear-gradient(135deg, #4834d4, #686de0);
  box-shadow: 0 8px 25px rgba(72, 52, 212, 0.4);
}

.btn-icon {
  width: 24px;
  height: 24px;
  fill: white;
  transition: all 0.3s ease;
}

.play-pause-btn .btn-icon {
  width: 28px;
  height: 28px;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: visible;
  position: relative;
  cursor: pointer;
}

.progress {
  height: 100%;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
}

.progress::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.progress-bar:hover .progress::after {
  opacity: 1;
}

.progress.dragging::after {
  opacity: 1;
  cursor: grabbing;
}

/* 留言板页面 */
.message-container {
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.message-input-area {
  background: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-gift {
  background: linear-gradient(45deg, #f093fb, #f5576c);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
}

.btn-emoji {
  background: linear-gradient(45deg, #ffecd2, #fcb69f);
  border: none;
  color: #333;
  padding: 10px 20px;
  border-radius: 20px;
}

.messages-list {
  flex: 1;
  background: white;
  border-radius: 15px;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.message-item {
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 15px;
  color: white;
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 特效样式 */
.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: firework 1s ease-out forwards;
}

@keyframes firework {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(20);
  }
}

.meteor {
  position: absolute;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, white, transparent);
  animation: meteor 2s linear forwards;
}

@keyframes meteor {
  0% {
    opacity: 1;
    transform: translateX(-100px) translateY(-100px);
  }
  100% {
    opacity: 0;
    transform: translateX(100px) translateY(100px);
  }
}

.danmaku {
  position: absolute;
  color: #ff6b6b;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: danmaku 3s linear forwards;
  pointer-events: none;
}

@keyframes danmaku {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .birthday-content {
    margin: 20px;
    padding: 30px 20px;
  }

  .birthday-title {
    font-size: 2rem;
  }

  .birthday-cake {
    width: 150px;
  }

  .photo-card {
    max-width: 95%;
    padding: 15px;
  }

  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

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