/* ========== 基础样式 ========== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

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

:root {
  --blue-primary: #4A90D9;
  --blue-light: #7BB3E0;
  --blue-dark: #2C5F8A;
  --blue-pale: #E8F4FD;
  --blue-glow: #6CB4EE;
  --white: #FFFFFF;
  --text-dark: #1A3A5C;
  --text-light: #F0F6FC;
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
  background-color: #C5DDF2;
  background-image: url('../img/backgrounds/bg-all-pages.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ========== 场景切换 ========== */
.scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.scene.active {
  opacity: 1;
  pointer-events: all;
  z-index: 10;
}

/* ========== 场景切换 ========== */
.night-story {
  position: relative;
  z-index: 5;
  max-width: 700px;
  width: 90%;
  padding: 20px;
  overflow-y: auto;
  max-height: 80vh;
}

.night-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 30px;
  text-shadow:
    0 0 10px rgba(108, 180, 238, 1),
    0 0 25px rgba(108, 180, 238, 0.9),
    0 0 50px rgba(108, 180, 238, 0.6);
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-bubble {
  padding: 15px 20px;
  border-radius: 15px;
  max-width: 80%;
  position: relative;
  animation: bubbleIn 0.5s ease;
}

.chat-bubble.his {
  align-self: flex-start;
  background: rgba(74, 144, 217, 0.3);
  border: 1px solid rgba(108, 180, 238, 0.4);
  border-bottom-left-radius: 5px;
}

.chat-bubble.me {
  align-self: flex-end;
  background: rgba(255, 182, 193, 0.2);
  border: 1px solid rgba(255, 182, 193, 0.4);
  border-bottom-right-radius: 5px;
}

.chat-bubble.highlight-bubble {
  background: rgba(108, 180, 238, 0.4);
  border: 1px solid var(--blue-glow);
  box-shadow: 0 0 15px rgba(108, 180, 238, 0.3);
}

.chat-bubble .name {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 5px;
  display: block;
}

.chat-bubble p {
  margin: 5px 0;
  line-height: 1.5;
}

.chat-bubble .highlight-text {
  color: #fff;
  font-weight: 700;
  text-shadow:
    0 0 8px rgba(108, 180, 238, 1),
    0 0 16px rgba(108, 180, 238, 0.7);
}

.info-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.info-card {
  background: rgba(74, 144, 217, 0.2);
  border: 1px solid rgba(108, 180, 238, 0.3);
  border-radius: 12px;
  padding: 15px 25px;
  text-align: center;
}

.info-item {
  margin: 8px 0;
  font-size: 1.1rem;
}

.info-item .label {
  display: inline-block;
  background: var(--blue-primary);
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  margin-right: 8px;
  font-size: 0.9rem;
}

.info-note {
  font-size: 1rem;
  color: var(--blue-light);
  font-style: italic;
}

/* ========== 晚安对比 ========== */
.wanan-detail {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.wanan-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(108, 180, 238, 0.3);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  max-width: 500px;
}

.wanan-box h3 {
  color: var(--blue-glow);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.wanan-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.wanan-before, .wanan-after {
  padding: 15px 20px;
  border-radius: 12px;
  min-width: 150px;
}

.wanan-before {
  background: rgba(74, 144, 217, 0.2);
  border: 1px solid rgba(108, 180, 238, 0.3);
}

.wanan-after {
  background: rgba(255, 182, 193, 0.2);
  border: 1px solid rgba(255, 182, 193, 0.4);
}

.wanan-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 8px;
}

.wanan-text {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.wanan-desc {
  display: block;
  font-size: 0.8rem;
  opacity: 0.6;
}

.wanan-arrow {
  font-size: 2rem;
  color: var(--blue-glow);
  animation: arrowPulse 1.5s ease-in-out infinite;
}

.wanan-note {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--blue-light);
  font-style: italic;
}

@keyframes bubbleIn {
  0% { opacity: 0; transform: scale(0.8) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* ========== 第二天 & 第三天 ========== */
.day-section {
  margin-bottom: 40px;
}

.day-label {
  text-align: center;
  font-size: 1.4rem;
  color: var(--blue-glow);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(108, 180, 238, 0.3);
}

.detail-card {
  background: rgba(74, 144, 217, 0.15);
  border: 1px solid rgba(108, 180, 238, 0.2);
  border-radius: 12px;
  padding: 15px 20px;
  margin: 10px 0;
}

.detail-text {
  line-height: 1.6;
  margin: 5px 0;
}

.nickname-card {
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.2), rgba(255, 105, 180, 0.15));
  border: 1px solid rgba(255, 182, 193, 0.3);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  margin: 15px 0;
}

.nickname-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.nickname-text {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.highlight-name {
  color: #FFB6C1;
  font-weight: bold;
  font-size: 1.3rem;
}

.nickname-desc {
  font-size: 0.9rem;
  opacity: 0.7;
}

.bubble-note {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 5px;
  display: block;
}

.photo-exchange {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.photo-card {
  flex: 1;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}

.photo-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.photo-desc {
  margin-bottom: 8px;
}

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

.blue-text {
  color: var(--blue-glow);
  font-weight: bold;
}

.pink-text {
  color: #FFB6C1;
  font-weight: bold;
}

.anxiety-card {
  border-color: rgba(255, 182, 193, 0.3);
}

.life-card {
  background: rgba(74, 144, 217, 0.1);
}

.life-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.life-item {
  text-align: center;
}

.life-label {
  display: inline-block;
  background: var(--blue-primary);
  color: white;
  padding: 2px 12px;
  border-radius: 10px;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.life-arrow {
  font-size: 1.5rem;
  color: var(--blue-glow);
}

.family-card {
  background: linear-gradient(135deg, rgba(108, 180, 238, 0.2), rgba(74, 144, 217, 0.15));
  border: 1px solid rgba(108, 180, 238, 0.3);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  margin: 15px 0;
}

.family-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.family-text {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.family-desc {
  font-size: 0.9rem;
  opacity: 0.7;
}

.huozai-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.15), rgba(255, 69, 0, 0.1));
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 15px;
  padding: 15px 20px;
  margin: 15px 0;
}

.huozai-icon {
  font-size: 2.5rem;
}

.huozai-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #FFA500;
}

.huozai-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

.turning-point {
  background: linear-gradient(135deg, rgba(108, 180, 238, 0.25), rgba(255, 182, 193, 0.2));
  border: 2px solid rgba(108, 180, 238, 0.5);
  border-radius: 20px;
  padding: 25px;
  margin: 20px 0;
  position: relative;
}

.turning-label {
  text-align: center;
  font-size: 1.2rem;
  color: var(--blue-glow);
  font-weight: bold;
  margin-bottom: 20px;
}

.turning-chat {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.turning-time {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
}

.love-note {
  border-color: rgba(255, 182, 193, 0.4);
  background: rgba(255, 182, 193, 0.1);
}

.love-note .detail-text {
  font-size: 1.05rem;
}

/* ========== 大耳狗 ========== */
.pochacco-container {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.pochacco-img {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 25px rgba(108, 180, 238, 0.6));
  animation: float 3s ease-in-out infinite;
}

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

/* ========== 开场文字 ========== */
.opening-text {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 600px;
  padding: 20px;
}

.opening-text .line {
  margin: 15px 0;
  font-size: 1.3rem;
  font-weight: 500;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
  text-shadow:
    0 0 10px rgba(108, 180, 238, 0.8),
    0 0 20px rgba(108, 180, 238, 0.5),
    0 0 40px rgba(108, 180, 238, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.5);
}

.opening-text .line.visible {
  opacity: 1;
  transform: translateY(0);
}

.opening-text .highlight {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow:
    0 0 10px rgba(108, 180, 238, 1),
    0 0 20px rgba(108, 180, 238, 0.9),
    0 0 40px rgba(108, 180, 238, 0.7),
    0 0 80px rgba(108, 180, 238, 0.4);
}

.opening-text .chat-his {
  color: var(--blue-light);
}

.opening-text .chat-me {
  color: #FFB6C1;
}

.opening-text .blue-text {
  color: var(--blue-glow);
}

/* ========== GO按钮 ========== */
.go-btn-bottom {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 45px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #3A7BD5, #6CB4EE);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow:
    0 0 20px rgba(108, 180, 238, 0.7),
    0 0 40px rgba(108, 180, 238, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  z-index: 100;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.go-btn-bottom:hover {
  transform: translateX(-50%) scale(1.08);
  box-shadow:
    0 0 30px rgba(108, 180, 238, 1),
    0 0 60px rgba(108, 180, 238, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.25);
}

.go-btn-bottom.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ========== 便签墙 ========== */
.section-title {
  font-size: 2rem;
  color: var(--blue-glow);
  text-shadow: 0 0 15px rgba(108, 180, 238, 0.5);
  margin-bottom: 30px;
  position: relative;
  z-index: 5;
}

.sticker-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
  position: relative;
  z-index: 5;
}

.sticker {
  width: 220px;
  min-height: 150px;
  padding: 20px;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sticker:hover {
  transform: translateY(-10px) rotate(-2deg);
  box-shadow: 0 8px 25px rgba(108, 180, 238, 0.4);
}

.sticker:nth-child(odd) {
  background: linear-gradient(135deg, #7BB3E0, #4A90D9);
  transform: rotate(-3deg);
}

.sticker:nth-child(even) {
  background: linear-gradient(135deg, #E8F4FD, #B8D4E8);
  color: var(--text-dark);
  transform: rotate(2deg);
}

.sticker:nth-child(3n) {
  background: linear-gradient(135deg, #FFB6C1, #FF69B4);
  color: var(--text-dark);
}

.sticker .quote {
  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;
  text-shadow:
    0 0 8px rgba(108, 180, 238, 0.6),
    1px 1px 3px rgba(0, 0, 0, 0.5);
}

.sticker .date {
  font-size: 0.8rem;
  margin-top: 10px;
  opacity: 0.7;
  text-align: right;
}

/* ========== 时间轴 ========== */
.timeline-container {
  max-width: 800px;
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
  position: relative;
  z-index: 5;
}

.timeline-item {
  display: flex;
  margin-bottom: 40px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -40px;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-glow), transparent);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-content {
  width: 45%;
  padding: 20px;
  background: rgba(74, 144, 217, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(108, 180, 238, 0.3);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
}

.timeline-date {
  color: var(--blue-glow);
  font-weight: bold;
  margin-bottom: 10px;
}

.timeline-text {
  line-height: 1.6;
  text-shadow:
    0 0 8px rgba(108, 180, 238, 0.5),
    1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ========== 告白信 ========== */
.letter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 5;
}

.letter {
  max-width: 600px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  color: var(--text-dark);
  box-shadow: 0 0 40px rgba(108, 180, 238, 0.3);
  position: relative;
  overflow-y: auto;
  max-height: 80vh;
}

.letter h2 {
  text-align: center;
  color: var(--blue-primary);
  margin-bottom: 30px;
  font-size: 1.8rem;
}

.letter-body p {
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 1.15rem;
  text-shadow:
    0 0 8px rgba(108, 180, 238, 0.5),
    1px 1px 3px rgba(0, 0, 0, 0.4);
}

.letter-body .signature {
  text-align: right;
  margin-top: 40px;
  font-style: italic;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
  text-shadow:
    0 0 10px rgba(108, 180, 238, 0.9),
    0 0 25px rgba(108, 180, 238, 0.6);
}

/* ========== 音乐按钮 ========== */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A90D9, #6CB4EE);
  border: 3px solid #FFFFFF;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(108, 180, 238, 0.6), 0 4px 15px rgba(0,0,0,0.3);
  color: white;
  font-size: 24px;
  pointer-events: auto !important;
  font-family: Arial, sans-serif;
}

.music-btn:hover {
  background: linear-gradient(135deg, #6CB4EE, #4A90D9);
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(108, 180, 238, 0.9), 0 4px 20px rgba(0,0,0,0.4);
}

.music-btn.playing {
  animation: musicPulse 0.6s ease-in-out infinite;
}

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

/* ========== 导航点 ========== */
.nav-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: var(--blue-glow);
  box-shadow: 0 0 10px var(--blue-glow);
  transform: scale(1.3);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .opening-text .line {
    font-size: 1rem;
  }

  .sticker {
    width: 160px;
    min-height: 120px;
    padding: 15px;
  }

  .timeline-item::before {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
  }

  .letter {
    margin: 20px;
    padding: 25px;
  }
}
