/* 桃色梦境主题 - CSS变量定义 */
:root {
  /* 主色调 - 桃色 (Peach) */
  --peach-primary: #ffc2d4;
  --peach-secondary: #e8a5c4;
  --peach-accent: #ff8fa3;

  /* 中性色 - 温暖背景 (Warm Background) */
  --warm-background: #fff8f9;
  --warm-surface: #ffe8f0;
  --warm-text-secondary: #8b4a6b;
  --warm-text-primary: #4a2838;

  /* 氛围色 - 桃红极光 (Peach Aurora) */
  --aurora-rose: #ffb3ba;
  --aurora-pink: #ff8fa3;
  --aurora-peach: #ffc2d4;

  /* 语义色 */
  --success: #8b4a6b;
  --warning: #e8a5c4;
  --error: #ff8fa3;

  /* 字体 */
  --font-heading: "Lora", serif;
  --font-body: "Noto Sans SC", sans-serif;

  /* 间距 */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-xxxl: 96px;
  --space-xxxxl: 128px;

  /* 其他 */
  --border-radius: 12px;
  --max-width: 1100px;

  /* 辉光效果 */
  --card-glow: 0 0 24px 4px rgba(255, 194, 212, 0.15);
  --button-glow: 0 0 16px 2px rgba(255, 143, 163, 0.25);
}

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

body {
  font-family: var(--font-body);
  background: var(--warm-background);
  color: var(--warm-text-primary);
  line-height: 1.8;
  font-size: 18px;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Hero Section - 桃色梦境 */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* 星空背景 */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      2px 2px at 20% 30%,
      var(--peach-primary),
      transparent
    ),
    radial-gradient(2px 2px at 40% 70%, var(--peach-secondary), transparent),
    radial-gradient(1px 1px at 90% 40%, var(--peach-primary), transparent),
    radial-gradient(1px 1px at 50% 50%, var(--peach-primary), transparent),
    radial-gradient(1px 1px at 80% 10%, var(--peach-secondary), transparent);
  background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px,
    180px 180px;
  background-position: 0 0, 100px 50px, 200px 0, 150px 100px, 50px 150px;
  animation: twinkle 20s linear infinite;
  opacity: 0.4;
  z-index: 1;
}

/* 极光背景 */
.aurora {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      45deg,
      transparent 30%,
      var(--aurora-rose) 50%,
      transparent 70%
    ),
    linear-gradient(
      -45deg,
      transparent 30%,
      var(--aurora-pink) 50%,
      transparent 70%
    );
  background-size: 400px 400px, 600px 600px;
  background-position: 0 0, 0 0;
  animation: aurora-flow 60s ease-in-out infinite;
  opacity: 0.2;
  z-index: 0;
}

.hero-content {
  z-index: 2;
  position: relative;
  max-width: 800px;
  padding: var(--space-lg);
  animation: fadeInUp 1.5s ease-out;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  color: var(--warm-text-primary);
  margin-bottom: var(--space-md);
  text-shadow: 0 0 20px rgba(255, 194, 212, 0.4);
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-align: center;
  animation: glowPulse 2s ease-in-out infinite;
}

.poem-section {
  margin: var(--space-xl) 0;
  text-align: center;
}

.poem-line {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  color: var(--peach-accent);
  margin: var(--space-sm) 0;
  text-shadow: 0 0 8px rgba(255, 143, 163, 0.3);
  animation: fadeInPoem 1.5s ease-out;
}

.poem-line:nth-child(1) {
  animation-delay: 0.2s;
}
.poem-line:nth-child(2) {
  animation-delay: 0.4s;
}
.poem-line:nth-child(3) {
  animation-delay: 0.6s;
}
.poem-line:nth-child(4) {
  animation-delay: 0.8s;
}

.music-control {
  margin: var(--space-lg) 0;
  text-align: center;
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 194, 212, 0.1);
  border: 2px solid var(--peach-primary);
  border-radius: 50px;
  padding: var(--space-sm) var(--space-md);
  color: var(--peach-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(255, 194, 212, 0.2);
  position: relative;
  overflow: hidden;
}

.music-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 194, 212, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.music-btn:hover {
  background: rgba(255, 194, 212, 0.2);
  border-color: var(--peach-secondary);
  color: var(--peach-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 194, 212, 0.3);
}

.music-btn:hover::before {
  left: 100%;
}

.music-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 15px rgba(255, 194, 212, 0.2);
}

.music-icon {
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.music-text {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.music-btn.playing .play-icon {
  display: none;
}

.music-btn.playing .pause-icon {
  display: block;
}

.music-btn:not(.playing) .pause-icon {
  display: none;
}

.music-btn:not(.playing) .play-icon {
  display: block;
}

/* 自动播放提示样式 */
.autoplay-overlay {
  text-align: center;
  color: var(--warm-text-primary);
}

.autoplay-content {
  background: var(--warm-surface);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  border: 2px solid var(--peach-primary);
  box-shadow: var(--card-glow);
  max-width: 400px;
  margin: 0 auto;
  animation: gentleFloat 3s ease-in-out infinite;
}

.music-note-large {
  font-size: 60px;
  color: var(--peach-primary);
  margin-bottom: var(--space-md);
  animation: breathe 2s ease-in-out infinite;
}

.autoplay-content p {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: var(--space-md);
  color: var(--warm-text-primary);
}

.autoplay-pulse {
  width: 20px;
  height: 20px;
  background: var(--peach-primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* 主内容区域 */
.main-content {
  padding: var(--space-xxxxl) 0;
  position: relative;
}

/* 信件部分 */
.letter-section {
  margin-bottom: var(--space-xxxxl);
}

.poem-main {
  margin-bottom: var(--space-xxxxl);
}

.poem-card {
  background: var(--warm-surface);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  border: 1px solid rgba(255, 194, 212, 0.2);
  box-shadow: var(--card-glow);
  position: relative;
  overflow: hidden;
}

.poem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--peach-primary),
    transparent
  );
  opacity: 0.5;
}

.poem-card h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--peach-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.poem-content {
  font-size: 20px;
  line-height: 1.8;
  color: var(--warm-text-primary);
  text-align: center;
}

.poem-content p {
  margin: var(--space-sm) 0;
  font-weight: 300;
}

.poem-content .highlight {
  color: var(--peach-accent);
  font-weight: 500;
}

.poem-content .final-poem {
  font-size: 24px;
  font-weight: 600;
  color: var(--peach-primary);
  margin-top: var(--space-lg);
  text-shadow: 0 0 10px rgba(255, 194, 212, 0.4);
}

.letter-card {
  background: var(--night-surface);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  border: 1px solid rgba(255, 215, 138, 0.1);
  box-shadow: var(--card-glow);
  position: relative;
  overflow: hidden;
}

.letter-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--memory-gold),
    transparent
  );
  opacity: 0.5;
}

.letter-card h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--memory-gold);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.letter-text {
  font-size: 20px;
  line-height: 1.8;
  color: var(--night-text-primary);
  text-align: justify;
  margin-bottom: var(--space-lg);
}

.signature {
  text-align: right;
  font-style: italic;
  color: var(--peach-secondary);
  font-size: 18px;
  margin-top: var(--space-lg);
}

/* 时间线部分 */
.timeline-section {
  margin-bottom: var(--space-xxxxl);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  text-align: center;
  color: var(--memory-gold);
  margin-bottom: var(--space-xl);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--memory-gold),
    var(--memory-gold-dark)
  );
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--memory-gold);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xxxl);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.2s;
}
.timeline-item:nth-child(2) {
  animation-delay: 0.4s;
}
.timeline-item:nth-child(3) {
  animation-delay: 0.6s;
}
.timeline-item:nth-child(4) {
  animation-delay: 0.8s;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 12px;
  height: 12px;
  background: var(--memory-gold);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px var(--memory-gold);
  z-index: 2;
}

.timeline-content {
  background: var(--night-surface);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin: 0 var(--space-xl);
  border: 1px solid rgba(255, 215, 138, 0.2);
  box-shadow: 0 0 20px rgba(255, 215, 138, 0.1);
  position: relative;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  right: -10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-left-color: var(--night-surface);
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--memory-gold);
  margin-bottom: var(--space-sm);
}

.timeline-content p {
  color: var(--night-text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.timeline-content img {
  width: 100%;
  max-width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 记忆画廊 */
.memory-gallery {
  margin-bottom: var(--space-xxxxl);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.memory-card {
  background: var(--night-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 215, 138, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  cursor: pointer;
}

.memory-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-glow);
}

.memory-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.memory-card:hover img {
  transform: scale(1.05);
}

.memory-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 12, 20, 0.9));
  color: var(--night-text-primary);
  padding: var(--space-lg);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.memory-card:hover .memory-overlay {
  transform: translateY(0);
}

.memory-overlay h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--memory-gold);
  margin-bottom: var(--space-sm);
}

.memory-overlay p {
  font-style: italic;
  color: var(--night-text-secondary);
  font-size: 16px;
}

/* 爱的告白 */
.love-declaration {
  margin-bottom: var(--space-xxxxl);
  text-align: center;
}

.declaration-content {
  background: var(--warm-surface);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  border: 2px solid var(--peach-primary);
  box-shadow: var(--card-glow);
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.declaration-content h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--peach-primary);
  margin-bottom: var(--space-lg);
}

.declaration-text p {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: var(--space-md);
  color: var(--warm-text-primary);
}

.highlight {
  color: var(--peach-accent) !important;
  font-weight: 600;
  text-shadow: 0 0 10px var(--peach-accent);
}

.final-line {
  font-family: var(--font-heading);
  font-size: 24px;
  font-style: italic;
  color: var(--memory-gold) !important;
  margin-top: var(--space-lg);
  text-shadow: 0 0 15px var(--memory-gold);
}

.love-symbol {
  font-size: 60px;
  color: var(--memory-gold);
  margin-top: var(--space-lg);
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--memory-gold));
}

/* 留言板 */
/* 页脚 */
.footer {
  background: var(--warm-surface);
  border-top: 1px solid var(--peach-secondary);
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
}

.footer p {
  color: var(--warm-text-secondary);
  margin-bottom: var(--space-sm);
  font-size: 16px;
}

.footer-symbol {
  font-size: 40px;
  color: var(--peach-primary);
  margin: var(--space-md) 0;
  animation: breathe 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--peach-primary));
}

.footer-note {
  font-style: italic;
  color: var(--peach-accent) !important;
  font-size: 18px !important;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(255, 215, 138, 0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 215, 138, 0.6);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes aurora-flow {
  0%,
  100% {
    background-position: 0% 0%, 0% 0%;
    transform: rotate(0deg);
  }
  25% {
    background-position: 100% 0%, 100% 0%;
    transform: rotate(1deg);
  }
  50% {
    background-position: 100% 100%, 100% 100%;
    transform: rotate(0deg);
  }
  75% {
    background-position: 0% 100%, 0% 100%;
    transform: rotate(-1deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .timeline::before {
    left: 30px;
  }

  .timeline-marker {
    left: 30px;
  }

  .timeline-content {
    margin: 0 0 0 var(--space-xl);
  }

  .timeline-content::before {
    left: -10px;
    right: auto;
    border-left-color: transparent;
    border-right-color: var(--night-surface);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .poem-line {
    font-size: 18px;
  }

  .poem-content {
    font-size: 19px;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .main-content {
    padding: var(--space-xl) 0;
  }

  .letter-card,
  .declaration-content,
  .poem-card {
    padding: var(--space-lg);
  }

  .letter-text {
    font-size: 18px;
  }

  .declaration-text p {
    font-size: 18px;
  }

  .final-line {
    font-size: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .section-title {
    font-size: 28px;
  }

  .timeline-content {
    margin: 0 var(--space-sm) 0 var(--space-xl);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .poem-line {
    font-size: 16px;
  }

  .poem-content {
    font-size: 18px;
  }

  .poem-content .final-poem {
    font-size: 20px;
  }

  .letter-card h2,
  .section-title,
  .declaration-content h2,
  .poem-card h2 {
    font-size: 24px;
  }

  .memory-card img {
    height: 200px;
  }

  .timeline-content {
    padding: var(--space-md);
  }
}
