/* ========================================
   表白页面样式 - 浪漫感动风格
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: #5a3e3e;
}

#app {
  width: 100%;
  min-height: 100vh;
}

/* ========================================
   加载屏幕
   ======================================== */
.loading-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.heart-beat {
  width: 80px;
  height: 80px;
  background: #ff6b6b;
  animation: heartbeat 1.2s infinite;
  border-radius: 50%;
  margin-bottom: 20px;
}

.heart-beat::before,
.heart-beat::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: #ff6b6b;
  border-radius: 50%;
}

.heart-beat::before {
  left: -40px;
}

.heart-beat::after {
  top: -40px;
}

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

.loading-text {
  font-size: 1.2rem;
  color: #ff6b6b;
  animation: fadeInOut 2s infinite;
}

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

/* ========================================
   主容器
   ======================================== */
.confession-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255, 107, 107, 0.3);
  margin-top: 40px;
  margin-bottom: 40px;
}

/* ========================================
   漂浮爱心背景
   ======================================== */
.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.heart {
  position: absolute;
  font-size: 20px;
  color: #ff6b6b;
  opacity: 0.6;
  animation: floatUp 15s infinite linear;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ========================================
   音乐控制
   ======================================== */
.music-control {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.music-control:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.music-icon {
  font-size: 1.5rem;
  animation: none;
}

.music-icon.playing {
  animation: musicBeat 1s infinite;
}

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

.music-text {
  font-size: 0.9rem;
  color: #5a3e3e;
}

/* ========================================
   内容包装器
   ======================================== */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* ========================================
   头部区域
   ======================================== */
.confession-header {
  text-align: center;
  padding: 40px 20px;
  border-bottom: 2px dashed #ffb6c1;
  margin-bottom: 40px;
}

.title {
  font-size: 2.5rem;
  color: #ff6b6b;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(255, 107, 107, 0.3);
  animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 2px 2px 4px rgba(255, 107, 107, 0.3); }
  to { text-shadow: 2px 2px 20px rgba(255, 107, 107, 0.6); }
}

.subtitle {
  font-size: 1.2rem;
  color: #888;
  font-style: italic;
  margin-bottom: 20px;
}

.date {
  font-size: 0.9rem;
  color: #aaa;
}

/* ========================================
   章节标题
   ======================================== */
.section-title {
  font-size: 1.8rem;
  color: #ff6b6b;
  text-align: center;
  margin: 40px 0 30px;
  position: relative;
}

.section-title::before,
.section-title::after {
  content: '💕';
  margin: 0 15px;
}

/* ========================================
   照片墙
   ======================================== */
.photo-gallery {
  padding: 20px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.photo-item {
  background: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.photo-item:hover {
  transform: translateY(-5px) rotate(2deg);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-caption {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* ========================================
   情书内容
   ======================================== */
.love-letter {
  padding: 20px 40px;
  background: linear-gradient(to bottom, #fff5f5, #fff);
  border-radius: 15px;
  margin: 20px;
  box-shadow: inset 0 0 20px rgba(255, 107, 107, 0.1);
}

.letter-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #5a3e3e;
  text-indent: 2em;
}

.letter-content p {
  margin-bottom: 20px;
}

/* ========================================
   时间轴
   ======================================== */
.timeline {
  padding: 20px;
}

.timeline-items {
  position: relative;
  padding-left: 30px;
}

.timeline-items::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #ff6b6b, #ffb6c1);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 20px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.timeline-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.timeline-text {
  font-size: 1rem;
  color: #5a3e3e;
  line-height: 1.6;
}

/* ========================================
   底部签名
   ======================================== */
.confession-footer {
  text-align: center;
  padding: 60px 20px 40px;
  border-top: 2px dashed #ffb6c1;
  margin-top: 40px;
}

.signature {
  margin-bottom: 30px;
}

.signature p {
  margin: 10px 0;
}

.signature-name {
  font-size: 1.5rem;
  color: #ff6b6b;
  font-weight: bold;
  font-style: italic;
}

.signature-date {
  font-size: 0.9rem;
  color: #aaa;
}

.heart-animation {
  margin-top: 20px;
}

.big-heart {
  font-size: 4rem;
  display: inline-block;
  animation: heartbeat 1.5s infinite;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: #ff6b6b;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .confession-container {
    margin: 10px;
    margin-top: 60px;
  }

  .title {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .love-letter {
    padding: 20px;
  }

  .letter-content {
    font-size: 1rem;
  }

  .music-control {
    top: 10px;
    right: 10px;
    padding: 8px 15px;
  }

  .music-text {
    display: none;
  }
}

/* ========================================
   打印样式
   ======================================== */
@media print {
  .music-control,
  .floating-hearts {
    display: none;
  }

  .confession-container {
    box-shadow: none;
    margin: 0;
  }
}
