/* ═══════════════════════════════════════════════════════════
   表白版 Romance CSS
   配色：甜玫瑰红 × 奶油白 × 蜜桃金 × 紫棕
   动效：心跳脉冲 · 光斑呼吸 · 粒子飘落 · 拍立得相框
   ═══════════════════════════════════════════════════════════ */

/* ─── 基础配色覆盖 ─── */
:root {
  --ink: #3d2435;
  --paper: #fef9f6;
  --warm: #ffe8f0;
  --red: #d65a82;
  --soft: #9a7a8a;
  --line: rgba(61, 36, 53, .14);
  --gold: #e8a070;
  --rose-deep: #a84060;
  --rose-light: #fff0f5;
}

/* ─── 全局背景氛围 ─── */
body {
  background: var(--paper);
  color: var(--ink);
  /* 微妙的径向渐变背景 */
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(255, 232, 240, .7) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(255, 230, 220, .5) 0%, transparent 55%);
}

/* ─── 背景光斑装饰 ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(214, 90, 130, .08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(232, 160, 112, .06) 0%, transparent 35%),
    radial-gradient(circle at 60% 80%, rgba(214, 90, 130, .07) 0%, transparent 45%);
  animation: ambientGlow 12s ease-in-out infinite alternate;
}

@keyframes ambientGlow {
  0%   { opacity: .6; }
  50%  { opacity: 1; }
  100% { opacity: .7; }
}

/* ─── 爱心粒子层 ─── */
.hearts-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.heart-particle {
  position: absolute;
  color: rgba(214, 90, 130, .25);
  font-size: 14px;
  animation: heartFloat linear infinite;
}

.heart-particle:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: 0s;   font-size: 12px; }
.heart-particle:nth-child(2)  { left: 15%; animation-duration: 15s; animation-delay: 2s;   font-size: 18px; }
.heart-particle:nth-child(3)  { left: 25%; animation-duration: 10s; animation-delay: 4s;   font-size: 10px; }
.heart-particle:nth-child(4)  { left: 35%; animation-duration: 14s; animation-delay: 1s;   font-size: 16px; }
.heart-particle:nth-child(5)  { left: 45%; animation-duration: 11s; animation-delay: 3s;   font-size: 13px; }
.heart-particle:nth-child(6)  { left: 55%; animation-duration: 16s; animation-delay: 0s;   font-size: 20px; }
.heart-particle:nth-child(7)  { left: 65%; animation-duration: 13s; animation-delay: 5s;   font-size: 11px; }
.heart-particle:nth-child(8)  { left: 75%; animation-duration: 17s; animation-delay: 2s;   font-size: 15px; }
.heart-particle:nth-child(9)  { left: 85%; animation-duration: 9s;  animation-delay: 6s;   font-size: 14px; }
.heart-particle:nth-child(10) { left: 95%; animation-duration: 12s; animation-delay: 1s;   font-size: 17px; }
.heart-particle:nth-child(11) { left: 8%;  animation-duration: 18s; animation-delay: 7s;   font-size: 10px; }
.heart-particle:nth-child(12) { left: 92%; animation-duration: 14s; animation-delay: 4s;   font-size: 19px; }

@keyframes heartFloat {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  10%  { opacity: .4; }
  50%  { opacity: .3; }
  90%  { opacity: .2; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ─── 加载页 ─── */
.loading-screen {
  background: linear-gradient(160deg, #4a2a3d 0%, #3d2435 40%, #5a3045 100%);
  position: relative;
  overflow: hidden;
}

.loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(214, 90, 130, .2) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(232, 160, 112, .15) 0%, transparent 45%);
  animation: loadingPulse 4s ease-in-out infinite;
}

.heart-draw{inset:0;pointer-events:none;position:fixed;z-index:8}.heart-draw svg{height:100%;width:100%}.laser-path{fill:none;filter:url(#laserGlow);stroke:#ff8252;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.18}.laser-top{stroke-dasharray:1;stroke-dashoffset:1}.laser-bottom{stroke-dasharray:1;stroke-dashoffset:1}.heart-draw.drawing .laser-top{animation:laserTrace 2s cubic-bezier(.28,.06,.3,1) forwards}.heart-draw.drawing .laser-bottom{animation:laserTrace 2.25s cubic-bezier(.28,.06,.3,1) 2.25s forwards}@keyframes laserTrace{0%{stroke-dashoffset:1;opacity:.15}8%{opacity:1}100%{stroke-dashoffset:0;opacity:1}}

@keyframes loadingPulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.03); }
}

.loading-screen .eyebrow {
  color: rgba(255, 232, 240, .6);
  font-size: 12px;
  letter-spacing: .2em;
}

.hero{isolation:isolate;overflow:hidden;position:relative}.hero>:not(.hero-memory-layer){position:relative;z-index:1}.hero-memory-layer{inset:0;overflow:hidden;pointer-events:none;position:absolute;z-index:0}.hero-memory{border:3px solid rgba(255,255,255,.72);box-shadow:0 10px 28px rgba(77,36,54,.13);height:auto;left:var(--left);max-height:38svh;object-fit:contain;opacity:0;position:absolute;top:var(--top);transform:rotate(var(--rotate)) scale(.9);width:var(--width);will-change:opacity,transform;animation:heroMemoryFloat var(--duration) ease-in-out forwards}@keyframes heroMemoryFloat{0%{opacity:0;transform:translate(0,8px) rotate(var(--rotate)) scale(.9)}18%{opacity:.15}68%{opacity:.15;transform:translate(var(--drift-x),var(--drift-y)) rotate(var(--rotate)) scale(1)}100%{opacity:0;transform:translate(var(--drift-x),var(--drift-y)) rotate(var(--rotate)) scale(1.04)}}

.loading-screen h1 {
  text-shadow: 0 0 60px rgba(214, 90, 130, .3);
  position: relative;
  z-index: 1;
}

.cursor {
  color: #ff8fab;
  animation: blink 1s step-end infinite;
}

.start-button {
  border-color: rgba(255, 247, 247, .5);
  border-radius: 50px;
  padding: 16px 32px;
  font-size: 14px;
  letter-spacing: .08em;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
  transition: all .4s cubic-bezier(.23, 1, .32, 1);
}

.start-button::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(214, 90, 130, .4), rgba(232, 160, 112, .3));
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
}

.start-button:hover {
  background: rgba(255, 247, 247, .95);
  color: #3d2435;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(214, 90, 130, .25);
}

.start-button:hover::before {
  opacity: 1;
}

/* ─── 导航栏 ─── */
.site-header {
  mix-blend-mode: difference;
  color: #fff;
}

.save-mark {
  filter: drop-shadow(0 0 6px rgba(214, 90, 130, .4));
  transition: transform .3s;
}

.save-mark:hover {
  transform: rotate(15deg) scale(1.2);
}

/* ─── Hero 区域 ─── */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 232, 240, .6) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 230, 220, .5) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(214, 90, 130, .04) 0%, transparent 60%);
}

.hero .eyebrow {
  color: var(--soft);
  font-size: 11px;
  letter-spacing: .18em;
  margin-bottom: 16px;
}

.hero h1 {
  text-shadow: 0 2px 40px rgba(61, 36, 53, .06);
  background: linear-gradient(135deg, var(--ink) 0%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero em {
  color: var(--red);
  -webkit-text-fill-color: var(--red);
}

.intro {
  color: #7a5a6a;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 2;
  max-width: 560px;
}

.scroll-hint {
  color: var(--soft);
  opacity: .7;
  animation: bounceHint 2s ease-in-out infinite;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ─── 章节 ─── */
.chapter {
  border-top: 1px solid var(--line);
  position: relative;
}

.chapter-meta {
  color: var(--soft);
  font-size: 10px;
  letter-spacing: .15em;
  margin-bottom: 50px;
  text-transform: uppercase;
}

.chapter-number {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red);
  margin: 0 0 10px;
  letter-spacing: .05em;
}

.chapter h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--ink) 60%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chapter-copy {
  color: #6a5060;
  font-size: clamp(16px, 1.9vw, 21px);
  line-height: 1.9;
}

/* ─── 消息卡片 ─── */
.message-card {
  background: rgba(255, 255, 255, .55) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(214, 90, 130, .12);
  border-radius: 20px;
  box-shadow:
    0 4px 24px rgba(61, 36, 53, .06),
    0 1px 3px rgba(61, 36, 53, .04);
  transform: rotate(-1.5deg);
  transition: transform .5s cubic-bezier(.23, 1, .32, 1), box-shadow .5s;
}

.message-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 12px 40px rgba(61, 36, 53, .1),
    0 4px 12px rgba(214, 90, 130, .08);
}

.message-card p {
  font-size: clamp(22px, 3.5vw, 38px);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.message-card span {
  color: var(--soft);
  font-size: 11px;
  letter-spacing: .08em;
}

/* ─── 游戏面板 ─── */
.game-panel {
  background: linear-gradient(145deg, #5a3045, #7a4060) !important;
  border-radius: 24px;
  box-shadow:
    0 20px 60px rgba(90, 48, 69, .25),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}

.game-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .06) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(214, 90, 130, .1) 0%, transparent 50%);
}

.game-content {
  gap: 18px;
}

.game-content p,
.game-content small {
  color: rgba(255, 232, 240, .7);
  font-size: 10px;
  letter-spacing: .15em;
}

.game-content strong {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 500;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

.status-dot {
  background: #7ee787;
  box-shadow: 0 0 12px rgba(126, 231, 135, .5);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(126, 231, 135, .4); }
  50%      { box-shadow: 0 0 20px rgba(126, 231, 135, .7); }
}

.game-orbit {
  border-color: rgba(255, 232, 240, .15) !important;
}

/* ─── 暖色章节背景 ─── */
.warm {
  background: linear-gradient(135deg, #fff0f5, #ffe8f0) !important;
  position: relative;
}

.warm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(232, 160, 112, .08) 0%, transparent 40%);
  pointer-events: none;
}

/* ─── 照片区域 ─── 拍立得风格 ─── */
.photo-grid {
  gap: 20px;
}

.photo-slot {
  background: #fff !important;
  border-radius: 12px;
  box-shadow:
    0 4px 16px rgba(61, 36, 53, .08),
    0 1px 4px rgba(61, 36, 53, .04);
  padding: 12px 12px 50px 12px;
  transition: transform .5s cubic-bezier(.23, 1, .32, 1), box-shadow .5s;
  overflow: hidden;
}

.photo-slot::before {
  border: none !important;
  background: linear-gradient(145deg, #f5e0e8, #f0d5e0);
  border-radius: 6px;
  inset: 12px 12px 50px 12px !important;
}

.photo-slot span {
  color: var(--soft);
  font-size: 11px;
  letter-spacing: .05em;
  z-index: 1;
}

.photo-slot figcaption {
  bottom: 14px;
  left: 16px;
  font-size: 12px;
  color: #7a5a6a;
  max-width: 200px;
  line-height: 1.5;
  font-style: italic;
}

.photo-slot:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow:
    0 16px 40px rgba(61, 36, 53, .12),
    0 4px 12px rgba(214, 90, 130, .1);
}

.photo-large {
  background: #fff !important;
}

.photo-large::before {
  background: linear-gradient(160deg, #e8c0d0, #f5ddd0) !important;
}

.tilted {
  transform: rotate(2deg);
}

/* ─── 成就列表 ─── */
.achievement-list article {
  border-top-color: var(--line);
  padding: 28px 0;
  transition: background .3s, transform .3s;
  border-radius: 0 12px 12px 0;
}

.achievement-list article:hover {
  background: rgba(255, 232, 240, .4);
  transform: translateX(4px);
}

.achievement-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.achievement-list span {
  color: var(--red);
  font-size: 12px;
}

.achievement-list h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.achievement-list p {
  color: #7a5a6a;
  font-size: 15px;
  line-height: 1.7;
}

.achievement-list i {
  color: var(--red);
  font-size: 16px;
}

.achievement-list .locked i {
  color: var(--soft);
}

/* ─── 情书区域 ─── */
.letter {
  background: linear-gradient(160deg, #4a2a3d 0%, #3d2435 50%, #4d2d40 100%) !important;
  position: relative;
  overflow: hidden;
}

.letter::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(214, 90, 130, .12) 0%, transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(232, 160, 112, .1) 0%, transparent 40%);
  pointer-events: none;
}

.letter .eyebrow {
  color: rgba(255, 232, 240, .5);
  letter-spacing: .2em;
}

.letter-copy {
  font-size: clamp(22px, 3.8vw, 48px);
  line-height: 1.65;
  color: rgba(255, 247, 247, .92);
  font-weight: 400;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}

.signature {
  color: rgba(255, 247, 247, .85);
  margin-top: 60px;
  font-size: 18px;
  position: relative;
  z-index: 1;
}

.signature span {
  color: rgba(255, 232, 240, .5);
  font-size: 13px;
}

/* ─── 表白区域 ─── */
.proposal {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 232, 240, .5) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(232, 160, 112, .08) 0%, transparent 40%);
  position: relative;
  min-height: 100svh;
}

.proposal .eyebrow {
  color: var(--soft);
  letter-spacing: .2em;
  font-size: 11px;
  margin-bottom: 20px;
}

.proposal h2 {
  background: linear-gradient(135deg, var(--ink) 30%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.proposal h2::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  border-radius: 2px;
}

.proposal em {
  -webkit-text-fill-color: var(--red);
}

.proposal-note {
  color: #8a6a7a;
  font-size: 15px;
  margin-top: 40px;
}

/* ─── 按钮 ─── */
.choices {
  gap: 16px;
  margin-top: 60px;
}

.choice {
  border-radius: 16px;
  border: 1.5px solid var(--line);
  padding: 20px 28px;
  font-size: 16px;
  transition: all .4s cubic-bezier(.23, 1, .32, 1);
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
}

.choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(61, 36, 53, .1);
}

.choice.yes {
  background: linear-gradient(135deg, var(--rose-deep), var(--red)) !important;
  border: none;
  color: #fff;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.choice.yes::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), transparent);
  opacity: 0;
  transition: opacity .4s;
}

.choice.yes:hover::before {
  opacity: 1;
}

.choice.yes:hover {
  box-shadow:
    0 12px 40px rgba(214, 90, 130, .35),
    0 0 60px rgba(214, 90, 130, .15);
  transform: translateY(-4px) scale(1.02);
}

/* 心跳动画 — 只在表白按钮上 */
.choice.yes {
  animation: heartbeat 3s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%      { transform: scale(1.02); }
  20%      { transform: scale(1); }
  30%      { transform: scale(1.02); }
  40%      { transform: scale(1); }
}

.choice.yes:hover {
  animation: none;
}

.choice.later:hover {
  background: #fff0f5;
  border-color: rgba(214, 90, 130, .25);
}

.answer-response {
  font-size: 20px;
  color: var(--ink);
  line-height: 1.8;
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 232, 240, .5);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  animation: fadeInUp .6s ease-out;
}

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

/* ─── 页脚 ─── */
footer {
  background: linear-gradient(160deg, #4a2a3d, #3d2435) !important;
  color: rgba(255, 232, 240, .6) !important;
  font-size: 10px;
  letter-spacing: .12em;
  padding: 28px max(24px, 8vw);
}

/* ─── 管理后台 ─── */
.admin-modal {
  background: rgba(61, 36, 53, .7) !important;
  backdrop-filter: blur(12px);
}

.admin-panel {
  background: rgba(254, 249, 246, .97) !important;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(61, 36, 53, .2);
  backdrop-filter: blur(20px);
}

.admin-panel h2 {
  color: var(--ink);
}

.admin-description {
  color: #7a5a6a;
}

.admin-panel input {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .3s, box-shadow .3s;
}

.admin-panel input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214, 90, 130, .1);
}

.admin-primary {
  background: linear-gradient(135deg, var(--rose-deep), var(--red)) !important;
  border-radius: 12px;
  font-weight: 500;
  transition: transform .2s, box-shadow .2s;
}

.admin-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214, 90, 130, .3);
}

.answer-record {
  background: rgba(255, 232, 240, .6) !important;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.live-visitors{background:rgba(255,255,255,.54);border:1px solid rgba(214,90,130,.15);display:grid;gap:12px;margin:20px 0;padding:16px}.live-visitors>div:first-child{align-items:baseline;display:flex;justify-content:space-between}.live-visitors small{color:#765365;font-family:var(--mono);font-size:10px}.live-visitors strong{color:#a43f64;font-size:20px}.live-visitor-list{display:flex;flex-wrap:wrap;gap:7px}.live-visitor{background:#fff;border-radius:999px;color:#5b3547;font-family:var(--mono);font-size:10px;padding:7px 9px}

.admin-danger {
  background: linear-gradient(135deg, #b04060, #d65a82) !important;
  border-radius: 12px;
  transition: transform .2s;
}

.admin-danger:hover {
  transform: translateY(-2px);
}

.admin-secondary {
  border-radius: 12px;
  border: 1.5px solid var(--line) !important;
  transition: all .2s;
}

.admin-secondary:hover {
  background: rgba(255, 232, 240, .5);
}

/* ─── Reveal 动画优化 ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(.98);
  transition: opacity 1s cubic-bezier(.23, 1, .32, 1), transform 1s cubic-bezier(.23, 1, .32, 1);
}

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

/* ─── 响应式 ─── */
@media (max-width: 600px) {
  .photo-slot {
    padding: 10px 10px 44px 10px;
  }

  .photo-slot::before {
    inset: 10px 10px 44px 10px !important;
  }

  .choice {
    padding: 18px 20px;
    font-size: 15px;
  }

  .answer-response {
    padding: 20px;
    font-size: 17px;
  }

  .admin-panel {
    padding: 30px 20px;
  }

  .heart-particle {
    font-size: 10px !important;
  }
}
