/* ================= 扩展动画样式 ================= */

/* -------- 狠话保险箱 · 富动画 -------- */
.safe-wrap {
  position: relative; width: 240px; height: 220px;
  display: flex; align-items: flex-end; justify-content: center;
}
.safe-drop-letter {
  position: absolute; left: 50%; top: -70px; transform: translateX(-50%) rotate(-2deg);
  width: 160px; padding: 8px 10px;
  background: hsl(45 80% 96%); color: hsl(20 55% 30%);
  font-family: 'ZCOOL KuaiLe', cursive; font-size: 11px; line-height: 1.4;
  border-radius: 3px; box-shadow: 0 8px 16px hsl(258 30% 60% / .3);
  opacity: 0; z-index: 4; max-height: 80px; overflow: hidden;
}
.safe-drop-letter.drop-in {
  animation: safeDropIn 1.6s cubic-bezier(.55,.05,.4,.9) forwards;
}
@keyframes safeDropIn {
  0%   { opacity: 0; top: -70px; transform: translateX(-50%) rotate(-2deg); }
  20%  { opacity: 1; }
  70%  { top: 40px; transform: translateX(-50%) rotate(5deg) scale(.9); }
  100% { top: 60px; transform: translateX(-50%) rotate(0) scale(.4); opacity: 0; }
}
.safe-box {
  position: relative; width: 210px; height: 160px; border-radius: 14px;
  background: linear-gradient(160deg, hsl(20 85% 95%), hsl(20 65% 86%));
  border: 2px solid hsl(15 80% 72%);
  box-shadow: 0 20px 40px -20px hsl(15 90% 65% / .55), inset 0 0 20px rgba(255, 220, 200, .5);
  overflow: hidden;
}
.safe-lid {
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: linear-gradient(180deg, hsl(15 60% 72%), hsl(20 55% 78%));
  border-bottom: 2px solid hsl(15 60% 62%);
  transform: translateY(-34px);
  transition: transform .8s cubic-bezier(.4,1.4,.4,1);
  z-index: 3;
}
.safe-lid.lid-shut { transform: translateY(0); }
.safe-lid::after {
  content: '❤'; position: absolute; bottom: -12px; left: 50%;
  transform: translateX(-50%); font-size: 14px; color: hsl(15 80% 55%);
}
.safe-lock {
  position: absolute; top: 46px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 2;
}
.lock-digit {
  width: 26px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: hsl(20 30% 20%); color: hsl(15 90% 80%);
  font-family: 'Outfit', monospace; font-weight: 500; font-size: 18px;
  border-radius: 4px; box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
}
.safe-box .note {
  font-family: 'ZCOOL KuaiLe', cursive; color: hsl(15 55% 42%); font-size: 12px;
  padding: 90px 14px 14px; text-align: center; word-break: break-all;
  max-height: 100%; overflow: hidden;
  transition: all 1.2s;
}
.safe-box-open .note { opacity: 1; }
.safe-box.sealed .note { filter: blur(6px); opacity: 0.2; letter-spacing: 5px; }
.safe-box .seal-stamp {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: hsl(15 85% 48%); font-size: 42px; font-family: 'ZCOOL KuaiLe', cursive; font-weight: 900;
  transform: rotate(-15deg) scale(3); opacity: 0; letter-spacing: 6px;
  z-index: 5;
}
.safe-box .seal-stamp.on { animation: stamp .6s cubic-bezier(.2,.8,.2,1) forwards; }
.safe-tag {
  position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; transition: opacity .5s;
}
.safe-badge { padding: 3px 10px; background: hsl(130 60% 92%); color: hsl(130 55% 30%); border: 1px solid hsl(130 50% 70%); border-radius: 999px; font-size: 11px; font-weight: 500; }
.safe-id { font-family: 'Outfit', monospace; font-size: 11px; color: hsl(258 20% 45%); letter-spacing: .05em; }

/* -------- 小怪兽 · 富动画 -------- */
.monster-wrap {
  position: relative; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.monster-tongue {
  position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%) translateY(30px);
  width: 40px; height: 20px; background: hsl(340 55% 55%); border-radius: 0 0 20px 20px;
  opacity: 0; transition: all .3s;
}
.monster.eating .monster-tongue { opacity: 1; transform: translateX(-50%) translateY(6px); }
.monster.chewing .monster-body { animation: chew 0.5s ease-in-out 5; }
@keyframes chew {
  0%,100% { transform: scale(1); }
  25% { transform: scale(1.08, .95) translateY(2px); }
  50% { transform: scale(.94, 1.08) translateY(-2px); }
}
.monster.burp .monster-body { animation: burp 1s ease-in-out; }
@keyframes burp {
  0%,100% { transform: scale(1); }
  40% { transform: scale(1.15) translateY(-8px); }
  60% { transform: scale(1.05) translateY(0); }
}
.monster.burp .monster-mouth { width: 40px; height: 45px; border-radius: 50%; }
.monster-arms { position: absolute; top: 40%; left: 0; right: 0; z-index: 4; pointer-events: none; }
.arm { position: absolute; font-size: 26px; opacity: 0; transition: all .4s; }
.arm-l { left: -18px; transform: rotate(-30deg); }
.arm-r { right: -18px; transform: rotate(30deg) scaleX(-1); }
.monster.eating .arm, .monster.chewing .arm { opacity: 1; animation: armWave 1s infinite; }
@keyframes armWave { 0%,100% { transform: translateY(0) rotate(-30deg); } 50% { transform: translateY(-6px) rotate(-40deg); } }
.arm-r.arm { animation-delay: -.5s; }
.monster-out { position: absolute; bottom: 30%; left: 0; right: 0; text-align: center; pointer-events: none; }
.heart-out {
  display: inline-block; font-size: 20px; opacity: 0;
  margin: 0 6px;
}
.monster-out.emit .heart-out {
  animation: heartFloat 2.6s ease-out forwards;
}
.monster-out.emit .heart-2 { animation-delay: .3s; font-size: 16px; }
.monster-out.emit .heart-3 { animation-delay: .6s; font-size: 14px; }
@keyframes heartFloat {
  0% { opacity: 0; transform: translateY(0) scale(.3); }
  30% { opacity: 1; transform: translateY(-20px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-100px) scale(.8); }
}

/* -------- 黑烟 · 富动画 -------- */
.smoke-note.shake { animation: shakeText .3s infinite; }
@keyframes shakeText {
  0%,100% { transform: translate(-50%,-50%); }
  25% { transform: translate(calc(-50% - 2px), calc(-50% + 1px)); }
  75% { transform: translate(calc(-50% + 2px), calc(-50% - 1px)); }
}
.smoke-note.burning {
  animation: none;
  color: hsl(15 65% 40%);
  border-color: hsl(15 80% 60% / .8);
  box-shadow: 0 0 20px hsl(15 90% 60% / .5), inset 0 0 15px hsl(15 90% 70% / .4);
  background: linear-gradient(160deg, hsl(25 90% 92%), hsl(15 85% 88%));
}
.spark {
  position: absolute; color: hsl(30 100% 60%); font-size: 12px;
  opacity: 0; pointer-events: none;
  text-shadow: 0 0 4px hsl(30 100% 55%);
}
.spark.twinkle { animation: sparkTwinkle 1.5s ease-out infinite; }
@keyframes sparkTwinkle {
  0%,100% { opacity: 0; transform: scale(.5); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* -------- 碎纸机 · 富动画 -------- */
.shredder-body {
  position: absolute; top: 55px; left: 0; right: 0; height: 34px;
  background: linear-gradient(180deg, hsl(258 20% 88%), hsl(258 15% 76%));
  border: 1px solid hsl(15 70% 62% / .7);
  border-radius: 6px;
  display: flex; flex-direction: column; padding: 4px;
}
.shredder-body .shredder-mouth {
  position: relative; top: auto; left: auto; right: auto;
  flex: 1; background: hsl(258 30% 25%); border: none;
  border-radius: 3px;
}
.shredder-status {
  font-size: 8px; text-align: center; letter-spacing: .15em;
  color: hsl(258 25% 40%); margin-top: 2px; font-family: 'Outfit', monospace; font-weight: 500;
}
.shredder-status.warn { color: hsl(15 85% 50%); animation: blink 0.6s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.shredder-status.done { color: hsl(130 55% 40%); animation: none; }
.shredder.vibrate { animation: vibrate .08s infinite; }
@keyframes vibrate {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(1px); }
}
.shredder-tray {
  position: absolute; bottom: 0; left: 20px; right: 20px; height: 8px;
  background: linear-gradient(180deg, hsl(258 20% 82%), hsl(258 15% 72%));
  border: 1px solid hsl(258 20% 68%);
  border-radius: 0 0 6px 6px;
}

/* -------- 冷却舱 · 富动画 -------- */
.cryo-pod .frost-2 {
  animation-direction: reverse;
  animation-duration: 18s;
  opacity: .5;
}
.pod-inner { position: relative; z-index: 3; text-align: center; }
.pod-label { font-family: 'Outfit', sans-serif; font-size: 11px; color: hsl(220 55% 35%); letter-spacing: .3em; font-weight: 500; margin-bottom: 4px; }
.pod-temp { font-family: 'Outfit', monospace; font-size: 14px; color: hsl(20 60% 45%); margin-top: 4px; letter-spacing: .05em; transition: color .5s; }
.ice-crystal {
  position: absolute; left: 50%; top: 50%;
  font-size: 12px; color: hsl(200 100% 82%);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-110px);
  animation: iceGrow 3s ease-out forwards;
}
@keyframes iceGrow {
  0% { opacity: 0; font-size: 6px; }
  60% { opacity: 1; }
  100% { opacity: .8; font-size: 16px; }
}

/* -------- 24h 封存 · 富动画 -------- */
.seal-wrap {
  position: relative; width: 240px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.seal-letter-fall {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 160px; padding: 8px 10px;
  background: hsl(45 80% 96%); color: hsl(20 55% 30%);
  font-family: 'ZCOOL KuaiLe', cursive; font-size: 11px; line-height: 1.4;
  border-radius: 3px; box-shadow: 0 8px 16px hsl(258 30% 60% / .3);
  opacity: 0; z-index: 4; max-height: 60px; overflow: hidden;
}
.seal-letter-fall.drop { animation: sealLetterDrop 1.5s cubic-bezier(.5,.05,.4,.9) forwards; }
@keyframes sealLetterDrop {
  0% { opacity: 0; top: -70px; }
  15% { opacity: 1; }
  70% { top: 40px; transform: translateX(-50%) rotate(5deg) scale(.85); }
  100% { top: 70px; opacity: 0; transform: translateX(-50%) rotate(0) scale(.3); }
}
.seal-envelope {
  position: relative; width: 220px; height: 140px;
  background: linear-gradient(160deg, hsl(220 70% 92%), hsl(240 65% 84%));
  border-radius: 8px; box-shadow: 0 20px 40px -20px hsl(220 70% 60% / .45);
  overflow: visible;
  transition: transform 2s;
}
.seal-flap {
  position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(180deg, hsl(220 75% 85%), hsl(220 70% 78%));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: rotateX(-180deg); transform-origin: top;
  transition: transform 1.1s cubic-bezier(.5,.05,.4,1);
  z-index: 2;
}
.seal-flap.close { transform: rotateX(0deg); }
.seal-wax {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%) scale(0);
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, hsl(345 90% 78%), hsl(345 85% 58%));
  box-shadow: 0 6px 18px hsl(345 90% 65% / .6);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; z-index: 5;
  transition: all .8s cubic-bezier(.2,1.6,.4,1);
}
.seal-wax.drip { top: 50px; transform: translateX(-50%) scale(1); }
.seal-wax.press { top: 62px; transform: translateX(-50%) scale(1.1); box-shadow: 0 10px 20px hsl(345 90% 55% / .7), inset 0 -3px 6px hsl(345 90% 40% / .5); }
.seal-postmark {
  position: absolute; top: 22px; right: 12px;
  padding: 4px 8px; border: 2px solid hsl(345 60% 50%);
  color: hsl(345 55% 45%); font-family: 'Outfit', monospace; font-size: 9px;
  line-height: 1.2; letter-spacing: .1em;
  transform: rotate(-10deg) scale(0); opacity: 0;
  transition: all .6s cubic-bezier(.2,1.6,.4,1);
  z-index: 6;
}
.seal-postmark.show { transform: rotate(-10deg) scale(1); opacity: .9; }
.seal-date { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: hsl(220 50% 32%); font-size: 12px; font-family: 'Outfit'; letter-spacing: .1em; z-index: 4; }
.seal-envelope.drift { transform: translate(30px, -30px) rotate(6deg) scale(.75); opacity: .8; }

/* -------- 呼吸 · 富动画 -------- */
.breath-ring {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  border: 2px dashed hsl(200 60% 70%);
  animation: ringRotate 20s linear infinite;
  pointer-events: none;
}
@keyframes ringRotate { to { transform: rotate(360deg); } }
.breath-orb {
  flex-direction: column; gap: 4px;
}
.breath-label { font-size: 20px; font-weight: 500; }
.breath-round { font-family: 'Outfit', monospace; font-size: 11px; color: hsl(220 55% 35%); letter-spacing: .1em; }

/* -------- 后悔预测 · 富动画 -------- */
.forecast-loading { display: flex; align-items: center; gap: 10px; padding: 20px 4px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid hsl(200 60% 82%); border-top-color: hsl(200 60% 50%);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: hsl(220 50% 40%); }
.forecast-summary { transition: opacity 1s; }

/* -------- Meme carousel -------- */
.meme-carousel { position: relative; width: 240px; height: 200px; }
.meme-carousel .meme-card {
  position: absolute; inset: 0;
  opacity: 0; transform: rotate(-4deg) scale(.85);
  transition: opacity .5s, transform .6s cubic-bezier(.2,1.4,.4,1);
}
.meme-carousel .meme-card.active {
  opacity: 1; transform: rotate(-2deg) scale(1);
  z-index: 2;
}
.meme-text { white-space: pre-line; }

/* -------- Cat -------- */
.cat-bubble { position: relative; }
.cat-typing { display: inline; }
.cat-caret {
  display: inline-block; width: 2px; margin-left: 2px;
  animation: caret 0.7s steps(2) infinite;
  color: hsl(20 60% 30%);
}
@keyframes caret { 50% { opacity: 0; } }
.cat-tail {
  position: absolute; bottom: -20px; left: 8px; font-size: 40px;
  animation: catTailWag 1s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes catTailWag {
  0%,100% { transform: rotate(-5deg); }
  50% { transform: rotate(10deg); }
}

/* -------- Drama stage -------- */
.drama-stage {
  position: relative; width: 100%; max-width: 340px; min-height: 220px;
  overflow: hidden; border-radius: 14px;
}
.curtain {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(180deg, hsl(345 60% 55%), hsl(345 65% 40%));
  z-index: 3;
  transition: transform 1.4s cubic-bezier(.5,.05,.4,1);
  box-shadow: inset 0 0 20px rgba(0,0,0,.3);
}
.curtain-l { left: 0; }
.curtain-r { right: 0; }
.drama-stage.open .curtain-l { transform: translateX(-100%); }
.drama-stage.open .curtain-r { transform: translateX(100%); }
.drama-scene { display: flex; flex-direction: column; gap: 8px; min-height: 140px; padding: 4px; }
.drama-line {
  opacity: 0; transform: translateY(4px);
  animation: dramaLineIn .6s cubic-bezier(.2,.9,.2,1) forwards;
  font-family: 'ZCOOL KuaiLe', cursive; font-size: 13px; line-height: 1.6; color: hsl(20 55% 25%);
}
@keyframes dramaLineIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.drama-applause {
  margin-top: 10px; padding: 8px; text-align: center;
  background: hsl(42 90% 92%); border-radius: 8px;
  color: hsl(20 55% 30%); font-size: 13px; font-family: 'ZCOOL KuaiLe', cursive;
  transition: opacity .8s;
}

/* -------- Plane sky -------- */
.plane-sky {
  position: relative; width: 100%; height: 220px; overflow: hidden; border-radius: 14px;
  background: linear-gradient(180deg, hsl(200 100% 92%), hsl(200 80% 96%));
}
.plane-sky .sun {
  position: absolute; top: 12px; right: 20px; font-size: 32px;
  animation: sunPulse 3s ease-in-out infinite;
}
@keyframes sunPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.cloud {
  position: absolute; font-size: 30px; opacity: .85;
}
.cloud.c1 { top: 30px; left: 20px; }
.cloud.c2 { top: 70px; left: 55%; font-size: 40px; }
.cloud.c3 { top: 130px; left: 15%; font-size: 26px; }
.plane-sky.clouds-drift .cloud {
  animation: cloudDrift 8s linear forwards;
}
.plane-sky.clouds-drift .cloud.c2 { animation-duration: 10s; }
.plane-sky.clouds-drift .cloud.c3 { animation-duration: 12s; animation-delay: .5s; }
@keyframes cloudDrift {
  to { transform: translateX(-160px); opacity: 0; }
}
.fold-note {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  width: 140px; padding: 10px 12px;
  background: hsl(45 90% 96%); color: hsl(20 55% 30%);
  font-family: 'ZCOOL KuaiLe', cursive; font-size: 11px; line-height: 1.5;
  border-radius: 3px; box-shadow: 0 10px 20px hsl(258 20% 60% / .3);
  z-index: 3;
  transition: all 2s;
}
.fold-note.folding {
  animation: foldPaper 2.2s cubic-bezier(.5,.05,.4,1) forwards;
}
@keyframes foldPaper {
  0% { transform: translate(-50%, -50%) rotate(0) scale(1); border-radius: 3px; }
  30% { transform: translate(-50%, -50%) rotate(-10deg) scale(.85); }
  60% { transform: translate(-50%, -50%) rotate(20deg) scale(.7); border-radius: 20px 3px; }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(.5); border-radius: 50% 3px; opacity: .3; }
}
.fold-note.gone { opacity: 0; }
.plane {
  position: absolute; left: 45%; top: 55%; font-size: 40px;
  opacity: 0; transform: translate(-50%, -50%) rotate(-15deg);
  transform-origin: center;
  z-index: 4;
}
.plane.ready { opacity: 1; }
.plane.fly {
  animation: planeFlyLong 5s cubic-bezier(.4,.1,.6,.9) forwards;
}
@keyframes planeFlyLong {
  0%   { left: 40%; top: 55%; opacity: 1; transform: translate(-50%,-50%) rotate(-15deg) scale(1); }
  25%  { left: 55%; top: 30%; transform: translate(-50%,-50%) rotate(-25deg) scale(.9); }
  55%  { left: 80%; top: 20%; transform: translate(-50%,-50%) rotate(-30deg) scale(.7); }
  100% { left: 130%; top: -10%; transform: translate(-50%,-50%) rotate(-45deg) scale(.2); opacity: 0; }
}
.plane-trail {
  position: absolute; left: 40%; top: 55%; width: 0; height: 2px;
  background: linear-gradient(90deg, hsl(200 60% 70%), transparent);
  transform-origin: left center;
  opacity: 0;
}
.plane-trail.draw {
  animation: trailDraw 5s ease-in forwards;
}
@keyframes trailDraw {
  0% { width: 0; opacity: 0.6; transform: rotate(-30deg); }
  50% { width: 220px; opacity: 0.7; transform: rotate(-32deg); }
  100% { width: 320px; opacity: 0; transform: rotate(-35deg); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* -------- 为什么要发这个消息 · why-card -------- */
.why-card {
  margin: 4px 0 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.55));
  border: 1px solid rgba(120, 100, 160, 0.14);
  border-radius: 22px;
  padding: 16px 16px 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -22px rgba(180, 140, 200, .35), 0 4px 16px -6px rgba(200, 170, 220, .3);
}
.why-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 12px; gap: 10px;
}
.why-title {
  font-size: 11px; letter-spacing: .12em;
  color: hsl(258 30% 55%); margin-bottom: 2px;
}
.why-question {
  font-size: 17px; font-weight: 600;
  background: linear-gradient(120deg, hsl(345 60% 50%), hsl(285 55% 50%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.why-hint {
  font-size: 11px; color: hsl(258 20% 55%);
  padding: 3px 8px; background: rgba(255,255,255,.6);
  border: 1px solid rgba(120, 100, 160, 0.14);
  border-radius: 999px; white-space: nowrap;
}
.why-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.why-chip {
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-family: inherit;
  color: hsl(258 30% 30%);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(120, 100, 160, 0.18);
  cursor: pointer;
  transition: all .2s cubic-bezier(.2,.9,.2,1);
}
.why-chip:hover {
  background: #fff;
  border-color: hsl(285 50% 65%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -6px hsl(285 40% 60% / .4);
}
.why-chip.active {
  background: linear-gradient(135deg, hsl(345 80% 92%), hsl(285 80% 92%));
  border-color: hsl(345 65% 65%);
  color: hsl(345 45% 32%);
  font-weight: 500;
  box-shadow: 0 10px 22px -10px hsl(345 65% 60% / .55);
}
.why-mirror {
  margin-top: 12px; padding: 0 2px;
  font-size: 13px; line-height: 1.6;
  color: hsl(258 30% 35%);
  min-height: 0; max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .5s cubic-bezier(.2,.9,.2,1), opacity .4s .1s, margin-top .3s;
}
.why-mirror.show {
  max-height: 200px;
  opacity: 1;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(120, 100, 160, 0.2);
}
.why-mirror strong {
  color: hsl(345 55% 45%);
  font-weight: 600;
}
