/* ============================================================
   谢言蹊 · 一周岁生日快乐
   温馨可爱风格样式表
   ============================================================ */

:root {
  --pink: #ff8fab;
  --pink-deep: #f4719a;
  --pink-light: #ffc2d4;
  --pink-pale: #ffe9f1;
  --peach: #ffd6a5;
  --cream: #fff6f0;
  --blue: #a2d2ff;
  --ink: #8a5a6d;
  --ink-soft: #b58a9c;
  --white: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'ZCOOL KuaiLe', 'Ma Shan Zheng', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #fff7f9 0%, #ffeef4 32%, #fff3e4 68%, #ffeef8 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.hidden { display: none !important; }

/* ============ 阅读进度条 ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--pink-light), var(--pink), var(--peach));
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(255, 143, 171, 0.55);
}

/* ============ 背景天空装饰 ============ */
.sky {
  position: fixed;
  inset: -60px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  /* 鼠标视差：--px / --py 由 JS 根据光标位置设置 */
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
  will-change: transform;
}

/* --- 云朵 --- */
.cloud {
  position: absolute;
  left: -220px;
  width: 130px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  opacity: 0.85;
  animation: drift linear infinite;
}
.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { left: 20px; top: -22px; width: 56px; height: 56px; }
.cloud::after  { left: 58px; top: -12px; width: 40px; height: 40px; }

.cloud-1 { top: 12%; animation-duration: 46s; animation-delay: -10s; transform: scale(1); }
.cloud-2 { top: 28%; animation-duration: 64s; animation-delay: -34s; transform: scale(0.72); opacity: 0.6; }
.cloud-3 { top: 62%; animation-duration: 52s; animation-delay: -20s; transform: scale(0.9); }
.cloud-4 { top: 78%; animation-duration: 74s; animation-delay: -50s; transform: scale(0.6); opacity: 0.55; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 440px)); }
}

/* --- 星星 --- */
.star {
  position: absolute;
  border-radius: 50%;
  background: #ffd9e6;
  box-shadow: 0 0 10px 2px rgba(255, 179, 198, 0.75);
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50%      { opacity: 0.95; transform: scale(1.15); }
}

/* --- 气球 --- */
.balloon-wrap {
  position: absolute;
  bottom: -200px;
  animation: floatUp linear infinite;
  will-change: transform;
}
.balloon {
  position: relative;
  width: var(--s, 80px);
  height: calc(var(--s, 80px) * 1.2);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.6), transparent 42%),
    var(--c, #ffb3c6);
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  box-shadow: inset -7px -9px 16px rgba(0, 0, 0, 0.08);
  animation: sway ease-in-out infinite alternate;
}
.balloon::before {
  content: '';
  position: absolute;
  bottom: -52px;
  left: 50%;
  width: 2px;
  height: 52px;
  background: rgba(160, 120, 130, 0.45);
  transform: translateX(-50%);
}
.balloon::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--c, #ffb3c6);
  border-bottom: 0;
}

@keyframes floatUp {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(-100vh - 400px)); }
}
@keyframes sway {
  from { transform: translateX(-13px) rotate(-5deg); }
  to   { transform: translateX(13px) rotate(5deg); }
}

/* --- 飘浮爱心 --- */
.heart-wrap {
  position: absolute;
  bottom: -60px;
  animation: floatUp linear infinite;
  will-change: transform;
  opacity: 0.75;
}
.heart {
  position: relative;
  width: var(--hs, 18px);
  height: var(--hs, 18px);
  background: var(--hc, #ffb3c6);
  transform: rotate(45deg);
  animation: heartSway ease-in-out infinite alternate;
  box-shadow: inset -3px -4px 6px rgba(0, 0, 0, 0.06);
}
.heart::before,
.heart::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
}
.heart::before { left: -50%; }
.heart::after { top: -50%; }

@keyframes heartSway {
  from { transform: rotate(45deg) translateX(-9px); }
  to   { transform: rotate(45deg) translateX(9px); }
}

/* ============ 顶部导航 ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 30px;
  background: rgba(255, 250, 252, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px rgba(255, 143, 171, 0.14);
}
.nav-logo {
  font-size: 1.25rem;
  color: var(--pink-deep);
  text-decoration: none;
  font-weight: bold;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 4px 2px;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2.5px;
  border-radius: 2px;
  background: var(--pink);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--pink-deep); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--pink-deep); }
.nav-links a.active::after { width: 100%; }

/* ============ 首页横幅 ============ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 20px 70px;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}
/* 名字背后的柔和光晕 */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(780px, 94vw);
  height: min(780px, 94vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(255, 179, 198, 0.42),
    rgba(255, 214, 165, 0.2) 45%,
    transparent 70%);
  border-radius: 50%;
  animation: glowPulse 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%      { transform: translate(-50%, -50%) scale(1.14); opacity: 1; }
}

.hero-en {
  font-family: 'Baloo 2', 'ZCOOL KuaiLe', sans-serif;
  letter-spacing: 0.35em;
  color: var(--pink-deep);
  font-size: clamp(0.85rem, 2.4vw, 1.2rem);
  font-weight: 700;
  opacity: 0;
  animation: fadeDown 0.9s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(72px, 16vw, 160px);
  line-height: 1.1;
  margin: 6px 0 4px;
  /* 流光渐变字：高光带在文字上不断扫过 */
  background: linear-gradient(115deg,
    #f4719a 25%, #ffb3c6 38%, #ffd6a5 45%, #ffb3c6 52%, #f4719a 65%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 6px 0 var(--white)) drop-shadow(0 12px 26px rgba(255, 143, 171, 0.4));
  animation: popIn 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.35s both,
             bob 3.2s ease-in-out 1.6s infinite,
             nameShimmer 5.5s linear infinite;
}
@keyframes nameShimmer {
  0%   { background-position: 120% center; }
  100% { background-position: -120% center; }
}

.hero-sub {
  font-size: clamp(1.25rem, 4vw, 2rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em; /* 抵消最后一个字的字间距，保证居中 */
  color: var(--ink);
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeDown 0.9s ease 0.7s forwards;
}

.hero-date {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed var(--pink-light);
  border-radius: 999px;
  padding: 8px 26px;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--pink-deep);
  box-shadow: 0 6px 18px rgba(255, 143, 171, 0.22);
  opacity: 0;
  animation: fadeDown 0.9s ease 0.95s forwards;
}

@keyframes popIn {
  from { transform: scale(0.45); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-12px) rotate(1.5deg); }
}
@keyframes fadeDown {
  from { transform: translateY(-22px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* --- 倒计时 --- */
.countdown { margin: 40px auto 0; }
.cd-label { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 16px; }
.cd-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cd-card {
  background: linear-gradient(165deg, var(--white), var(--pink-pale));
  border: 2px solid var(--pink-light);
  border-radius: 20px;
  padding: 14px 10px 10px;
  min-width: 82px;
  box-shadow: 0 10px 24px rgba(255, 143, 171, 0.22);
  animation: cdPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
}
.cd-card:nth-child(1) { animation-delay: 1.15s; }
.cd-card:nth-child(2) { animation-delay: 1.3s; }
.cd-card:nth-child(3) { animation-delay: 1.45s; }
.cd-card:nth-child(4) { animation-delay: 1.6s; }
.cd-num {
  font-family: 'Baloo 2', 'ZCOOL KuaiLe', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--pink-deep);
  line-height: 1;
}
.cd-unit { font-size: 0.95rem; color: var(--ink-soft); margin-top: 6px; }

@keyframes cdPop {
  from { transform: translateY(26px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* --- 生日当天横幅 --- */
.celebrate { margin: 36px auto 0; }
.celebrate-big {
  font-size: clamp(32px, 7vw, 62px);
  color: var(--pink-deep);
  text-shadow: 0 4px 0 var(--white), 0 10px 22px rgba(255, 143, 171, 0.35);
  animation: bob 2.4s ease-in-out infinite;
}
.celebrate-sub { font-size: 1.2rem; margin-top: 10px; color: var(--ink); }

/* --- 操作按钮 --- */
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
  animation: fadeDown 0.9s ease 1.8s forwards;
}
.btn-confetti {
  font-family: inherit;
  font-size: 1.15rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  border: none;
  border-radius: 999px;
  padding: 13px 32px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(244, 113, 154, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-confetti:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 28px rgba(244, 113, 154, 0.5); }
.btn-confetti:active { transform: translateY(0) scale(0.98); }

/* 按钮点击涟漪 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleAnim 0.65s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(1); opacity: 0; }
}

.btn-scroll {
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--pink-light);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 11px 28px;
  transition: all 0.25s ease;
}
.btn-scroll:hover { border-color: var(--pink); color: var(--pink-deep); transform: translateY(-2px); }

/* ============ 通用区块 ============ */
.section {
  position: relative;
  z-index: 1;
  padding: 96px 22px;
}
.section-title {
  text-align: center;
  font-size: clamp(30px, 5vw, 44px);
  color: var(--pink-deep);
  margin-bottom: 8px;
}
.section-desc {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 44px;
}

/* 滚动显现动画 */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ 成长相册 ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
  max-width: 1020px;
  margin: 0 auto;
}
.polaroid {
  background: var(--white);
  padding: 14px 14px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(138, 90, 109, 0.18);
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}
/* 悬停时的斜向扫光 */
.polaroid::after {
  content: '';
  position: absolute;
  top: 0;
  left: -90%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
  pointer-events: none;
  z-index: 2;
}
.polaroid:hover::after { left: 135%; }
.polaroid:nth-child(odd)  { --rot: -2.5deg; }
.polaroid:nth-child(even) { --rot: 2.2deg; }
.polaroid:nth-child(3n)   { --rot: 3deg; }

.polaroid:hover {
  transform: rotate(0deg) translateY(-10px) scale(1.045);
  box-shadow: 0 22px 44px rgba(138, 90, 109, 0.28);
  z-index: 3;
}

.polaroid img,
.polaroid .photo-ph {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* 照片占位（未放照片时显示） */
.photo-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, var(--pink-pale), #fff3e0);
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.7;
}
.photo-ph .ph-emoji { font-size: 3rem; }

.polaroid figcaption {
  text-align: center;
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: 0.06em;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(90, 45, 62, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFade 0.3s ease;
}
.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: lbZoom 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.lb-close {
  position: absolute;
  top: 24px;
  right: 30px;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.25s, transform 0.25s;
}
.lb-close:hover { background: rgba(255, 255, 255, 0.34); transform: rotate(90deg); }

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ 给言蹊的一封信 ============ */
.letter-paper {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  background: #fffdf7;
  border-radius: 14px;
  padding: 52px 56px 46px;
  box-shadow: 0 16px 40px rgba(138, 90, 109, 0.18);
  font-family: 'Ma Shan Zheng', 'ZCOOL KuaiLe', 'KaiTi', cursive;
  font-size: 1.35rem;
  line-height: 2.15;
  color: #6d4a58;
}
/* 信纸上的胶带装饰 */
.letter-paper::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 160px;
  height: 34px;
  background: linear-gradient(90deg, rgba(255, 210, 130, 0.85), rgba(255, 225, 160, 0.85));
  border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  opacity: 0.9;
}
.letter-greet { font-size: 1.55rem; margin-bottom: 8px; }
.letter-sign { text-align: right; margin-top: 18px; }

/* --- 信件文字闪闪发光：金色高光带不断扫过 --- */
.letter-paper p {
  background: linear-gradient(115deg,
    #6d4a58 36%, #e8a03c 45%, #ff9fb2 50%, #e8a03c 55%, #6d4a58 64%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: letterShimmer 7s linear infinite;
}
/* 每一行错开相位，让流光像波浪一样逐行划过 */
.letter-paper p:nth-child(1) { animation-delay: 0s; }
.letter-paper p:nth-child(2) { animation-delay: -1.2s; }
.letter-paper p:nth-child(3) { animation-delay: -2.4s; }
.letter-paper p:nth-child(4) { animation-delay: -3.6s; }
.letter-paper p:nth-child(5) { animation-delay: -4.8s; }
.letter-paper p:nth-child(6) { animation-delay: -6s; }
.letter-paper p:nth-child(7) { animation-delay: -2s; }

@keyframes letterShimmer {
  0%   { background-position: 130% center; }
  100% { background-position: -130% center; }
}

/* --- 信纸上闪闪烁烁的小星星 --- */
.letter-sparkle {
  position: absolute;
  z-index: 2;
  font-family: 'ZCOOL KuaiLe', 'Ma Shan Zheng', serif;
  font-size: var(--sw, 14px);
  color: var(--sc, #f7b733);
  text-shadow: 0 0 10px currentColor;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  animation: sparkleTwinkle var(--sd, 2.8s) ease-in-out infinite;
  animation-delay: var(--sdelay, 0s);
}
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.35) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.05) rotate(60deg); }
}

/* ============ 三个小愿望 ============ */
.wish-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 960px;
  margin: 0 auto;
}
.wish {
  background: linear-gradient(165deg, var(--white), var(--pink-pale));
  border: 2px solid var(--pink-light);
  border-radius: 24px;
  padding: 38px 22px;
  text-align: center;
  font-size: 1.25rem;
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(255, 143, 171, 0.2);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.wish:hover {
  transform: translateY(-10px) rotate(-1.5deg);
  box-shadow: 0 20px 40px rgba(255, 143, 171, 0.32);
}
.wish-emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 12px;
  animation: emojiBob 2.6s ease-in-out infinite;
}
.wish:nth-child(2) .wish-emoji { animation-delay: -0.9s; }
.wish:nth-child(3) .wish-emoji { animation-delay: -1.8s; }
@keyframes emojiBob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-10px) rotate(6deg); }
}

/* ============ 页脚 ============ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 44px 20px 56px;
  background: linear-gradient(180deg, transparent, rgba(255, 214, 228, 0.5));
  color: var(--ink);
}
.footer-main { font-size: 1.35rem; color: var(--pink-deep); }
.footer-date { margin-top: 6px; color: var(--ink-soft); letter-spacing: 0.15em; }
.footer-made { margin-top: 14px; font-size: 0.95rem; color: var(--ink-soft); font-family: 'Baloo 2', sans-serif; }

/* ============ 音乐按钮 ============ */
.music-btn {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 50;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(244, 113, 154, 0.45);
  animation: pulse 2.4s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.music-btn:hover { transform: scale(1.12); }
.music-btn.paused { animation: none; filter: grayscale(0.55); opacity: 0.85; }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 24px rgba(244, 113, 154, 0.45); }
  50%      { transform: scale(1.09); box-shadow: 0 14px 32px rgba(244, 113, 154, 0.6); }
}

/* ============ 撒花彩纸 ============ */
.confetti-piece {
  position: fixed;
  top: -24px;
  z-index: 90;
  border-radius: 3px;
  pointer-events: none;
  animation: confettiFall var(--d, 4s) linear forwards;
}
.confetti-piece.round { border-radius: 50%; }
.confetti-piece.heart { border-radius: 0; clip-path: polygon(50% 0%, 61% 10%, 74% 4%, 87% 13%, 91% 30%, 87% 46%, 76% 62%, 50% 86%, 24% 62%, 13% 46%, 9% 30%, 13% 13%, 26% 4%, 39% 10%); }
.confetti-piece.star  { border-radius: 0; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

@keyframes confettiFall {
  to {
    transform: translateY(112vh) translateX(var(--drift, 0px)) rotate(var(--r, 720deg));
    opacity: 0.85;
  }
}

/* ============ 鼠标星星轨迹 ============ */
.trail-sparkle {
  position: fixed;
  z-index: 95;
  pointer-events: none;
  font-size: var(--tw, 12px);
  color: var(--tc, #ffb3c6);
  text-shadow: 0 0 8px currentColor;
  line-height: 1;
  animation: trailFade 0.8s ease-out forwards;
}
@keyframes trailFade {
  from { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  to   { opacity: 0; transform: translateY(-18px) scale(0.3) rotate(80deg); }
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .wish-grid { grid-template-columns: repeat(2, 1fr); }
  .letter-paper { padding: 40px 32px; font-size: 1.22rem; }
}

@media (max-width: 560px) {
  .nav { padding: 12px 18px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.9rem; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 420px; }
  .wish-grid { grid-template-columns: 1fr; }
  .letter-paper { padding: 34px 22px; font-size: 1.15rem; }
  .cd-card { min-width: 68px; padding: 10px 6px 8px; }
  .cd-num { font-size: 2rem; }
  .music-btn { right: 18px; bottom: 18px; }
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
