/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  background: linear-gradient(180deg, #fffaf5, #ffe6e6);
  color: #333;
  text-align: center;
  transition: background 1s ease-in-out;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 入场遮罩层 */
#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff5f7, #ffe6e9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
  cursor: pointer;
  transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

#introOverlay::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(#ff6b8b 2px, transparent 2px),
    radial-gradient(#ff9a9e 1px, transparent 1px);
  background-size: 50px 50px, 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: 0.15;
  animation: float 15s linear infinite;
}

#heartClick {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.2em, 4vw, 2.5em);
  color: #ff5f8f;
  background: rgba(255, 255, 255, 0.6);
  padding: 1em 2em;
  border-radius: 50px;
  box-shadow: 0 0 25px rgba(255, 182, 193, 0.6);
  text-shadow: 0 0 10px rgba(255, 120, 160, 0.7);
  backdrop-filter: blur(6px);
  animation: heartbeat 1.5s infinite, glow 3s ease-in-out infinite alternate;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

#heartClick:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(255, 105, 180, 0.7);
}

.click-hint {
  margin-top: 25px;
  color: #ff6b8b;
  font-size: clamp(0.9em, 2vw, 1.2em);
  opacity: 0.8;
  animation: fade 3s infinite alternate;
  z-index: 2;
  position: relative;
}

.floating-heart {
  position: absolute;
  color: #ff6b8b;
  opacity: 0;
  animation: fall linear forwards;
}

#introOverlay.fadeOut {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

/* 头部样式 */
header {
  padding: 40px 10px;
  background: #ffb6c1;
  color: white;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-content {
  position: relative;
  padding: 60px 20px;
}

.main-title {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  animation: fadeIn 1.5s ease;
}

.subtitle {
  font-size: 1.2em;
  opacity: 0.9;
}

/* 在style.css中添加/修改这些样式 */
#birthdayBanner {
  position: relative;
  width: 100%;
  padding: 20px 0;
  font-family: 'Dancing Script', cursive;
  font-size: 2.5em;
  color: white;
  text-align: center;
  background: linear-gradient(90deg, #ff9a9e, #fad0c4, #ffdde1);
  background-size: 200% 100%;
  animation: gradientMove 5s ease infinite;
  box-shadow: 0 4px 20px rgba(255,105,180,0.3);
  margin: 20px 0;
  overflow: hidden;
  z-index: 1;
  display: block; /* 确保横幅可见 */
}

#heartCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block; /* 确保画布可见 */
}

/* 确保横幅的hover效果正常 */
.banner-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer; /* 确保可以点击 */
}

.banner-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255,107,139,0.3);
}


/* 时间线样式 */
#timeline {
  margin: 40px auto;
  max-width: 700px;
}

.timeline-container {
  padding: 60px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.section-heading {
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  color: #ff6b8b;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #ff6b8b;
  border-radius: 3px;
}

.event {
  background: #fff;
  border-radius: 15px;
  margin: 20px 0;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.event-card {
  position: relative;
  padding: 30px;
  margin: 30px 0;
  border-radius: 15px;
  transition: all 0.4s ease;
  border-left: 5px solid #ff9a9e;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(255,107,139,0.15);
}

.event-icon {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 3px 10px rgba(255,107,139,0.3);
}

.event-date {
  font-size: 0.9rem;
  color: #ff6b8b;
  margin-top: 10px;
  font-style: italic;
}

.event-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: #ff6b8b;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-card:hover .event-arrow {
  opacity: 1;
}

.event.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 照片区域 */
#gallery {
  margin: 60px auto;
  max-width: 90%;
  text-align: center;
}

.gallery-section {
  padding: 60px 20px;
  background: #fff5f7;
  margin-top: 30px;
  border-radius: 30px 30px 0 0;
}

.photo-carousel {
  position: relative;
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 300px;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.photo-carousel img {
  width: 30%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.4s ease;
}

.photo-carousel img:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 轮播按钮 */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #ff9a9e;
  color: #ff6b8b;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  padding: 0;
  font-size: 1.2em;
}

.carousel-btn:hover {
  background: #ff6b8b;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(255,105,180,0.5);
}

button:active {
  transform: scale(0.95);
}

/* 音乐控制 */
.music-controls {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  gap: 15px;
  z-index: 100;
}

.music-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  border: none;
  color: white;
  font-size: 1em;
  padding: 5px 10px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(255,105,180,0.3);
  transition: all 0.3s ease;
}

.music-controls button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(255,105,180,0.5);
  background: linear-gradient(135deg, #fad0c4, #ff9a9e);
}

/* 灯箱 */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px #fff;
}

.close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.lightbox-nav {
  margin-top: 20px;
}

.lightbox-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid white;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.lightbox-btn:hover {
  background: white;
  color: #ff6b8b;
}

/* 页脚 */
footer {
  padding: 40px 20px;
  background: #ff6b8b;
  color: white;
  margin-top: 50px;
}

.footer-note {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 10px;
  font-family: 'Dancing Script', cursive;
}

/* 页面过渡 */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* 动画 */
@keyframes float {
  0% { background-position: 0 0, 10px 10px; }
  100% { background-position: 50px 50px, 60px 60px; }
}

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

@keyframes glow {
  0% { text-shadow: 0 0 10px #ff9a9e, 0 0 20px #fad0c4; }
  100% { text-shadow: 0 0 25px #ff5f8f, 0 0 45px #ffb6c1; }
}

@keyframes fade {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

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

@keyframes slideLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}

.moving {
  animation: slideLeft 5s linear infinite;
}