:root {

  --bg-dark: #0d0617;
  --bg-gradient: radial-gradient(circle at 50% 20%, #290d3d 0%, #150824 55%, #080310 100%);
  --accent-pink: #ff7ebb;
  --accent-pink-soft: #ffb8dd;
  --accent-pink-glow: rgba(255, 126, 187, 0.45);
  --accent-cyan: #7fe6ff;
  --accent-gold: #ffe685;
  --accent-green: #78ffd6;
  --text-white: #ffffff;
  --text-dim: #f3d6ea;
  --text-muted: rgba(255, 236, 246, 0.75);

  --glass-bg: rgba(30, 12, 42, 0.76);
  --glass-border: rgba(255, 175, 215, 0.32);
  --glass-border-highlight: rgba(255, 255, 255, 0.42);
  --glass-shadow: 0 16px 45px rgba(230, 90, 160, 0.18), 0 2px 10px rgba(0, 0, 0, 0.4);

  --font-main: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Courier Prime', monospace;
  --touch-min: 44px;
  --radius-pill: 9999px;
  --radius-card: 26px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: clip;
  overflow-y: hidden;
  background-color: var(--bg-dark);
  background: var(--bg-gradient);
  font-family: var(--font-main);
  color: var(--text-white);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#sky-canvas,
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#sky-canvas {
  z-index: 1;
}

#fx-canvas {
  z-index: 4;
}

.music-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  background: rgba(45, 18, 60, 0.78);
  border: 1.5px solid var(--accent-pink-soft);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(255, 126, 187, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s, box-shadow 0.25s;
}

.music-btn:hover {
  transform: scale(1.06);
  background: rgba(70, 25, 90, 0.88);
  box-shadow: 0 6px 22px rgba(255, 126, 187, 0.45);
}

.music-btn:active {
  transform: scale(0.96);
}

.music-disc {
  font-size: 16px;
  display: inline-block;
  animation: discSpin 4s linear infinite;
}

.music-btn.paused .music-disc {
  animation-play-state: paused;
  opacity: 0.6;
}

@keyframes discSpin {
  100% {
    transform: rotate(360deg);
  }
}

.music-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music-wave span {
  width: 3px;
  background: var(--accent-pink);
  border-radius: 2px;
  animation: waveBar 1.2s ease-in-out infinite alternate;
}

.music-wave span:nth-child(1) {
  height: 6px;
  animation-delay: 0.1s;
}

.music-wave span:nth-child(2) {
  height: 14px;
  animation-delay: 0.3s;
}

.music-wave span:nth-child(3) {
  height: 8px;
  animation-delay: 0.2s;
}

.music-btn.paused .music-wave span {
  animation: none;
  height: 3px !important;
  opacity: 0.4;
}

@keyframes waveBar {
  0% {
    height: 4px;
  }

  100% {
    height: 14px;
  }
}

.stage-container {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  cursor: pointer;
}

.robot-wrap {
  position: relative;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: robotFloat 4s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.robot-wrap:hover {
  filter: drop-shadow(0 0 16px rgba(255, 126, 187, 0.45));
}

.robot-wrap.squish {
  animation: robotSquish 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes robotSquish {
  0% {
    transform: scale(1, 1);
  }

  25% {
    transform: scale(1.18, 0.82) translateY(8px);
  }

  50% {
    transform: scale(0.9, 1.12) translateY(-14px);
  }

  75% {
    transform: scale(1.05, 0.96) translateY(2px);
  }

  100% {
    transform: scale(1, 1) translateY(0);
  }
}

.robot-wrap.is-grooving {
  animation: robotGroove 1.6s ease-in-out infinite alternate !important;
}

@keyframes robotGroove {
  0% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-12px) rotate(0deg);
  }

  100% {
    transform: translateY(-2px) rotate(2deg);
  }
}

.robot-wrap.is-trembling {
  animation: robotTremble 0.15s ease-in-out infinite alternate !important;
}

@keyframes robotTremble {
  0% {
    transform: translate(-2px, 1px) rotate(-1deg);
  }

  100% {
    transform: translate(2px, -1px) rotate(1deg);
  }
}

.robot-wrap.is-petting {
  animation: robotPet 0.8s ease-in-out infinite alternate !important;
}

@keyframes robotPet {
  0% {
    transform: scale(1.05, 0.95) rotate(-2deg);
  }

  100% {
    transform: scale(0.96, 1.04) rotate(2deg);
  }
}

@keyframes robotFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.robot-speech-bubble {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.9);
  background: rgba(30, 10, 42, 0.94);
  border: 1.5px solid var(--accent-pink);
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff9fc;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(255, 126, 187, 0.45);
  pointer-events: none;
  opacity: 0;
  z-index: 25;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.robot-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent-pink);
}

.robot-speech-bubble.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ==========================================================================
   CUTE PINK CAT HEAD & FACIAL EXPRESSIONS
   ========================================================================== */

.robot-head.cat-head,
.robot-head {
  position: relative;
  width: 172px;
  height: 136px;
  background: linear-gradient(150deg, #ffffff 0%, #ffe3f1 45%, #ffd1e7 75%, #f7b4d7 100%);
  border-radius: 54px 54px 62px 62px;
  border: 3.5px solid #ffaed6;
  box-shadow: 0 12px 36px rgba(255, 105, 180, 0.4),
    inset 0 4px 8px rgba(255, 255, 255, 0.95),
    0 0 20px rgba(255, 192, 203, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

/* Tai mèo trên đầu (Cat ears on top) */
.cat-ear-top {
  position: absolute;
  top: -36px;
  width: 50px;
  height: 54px;
  z-index: 1;
  pointer-events: none;
  transform-origin: bottom center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-ear-top.left {
  left: 6px;
  transform: rotate(-14deg);
  animation: catEarTwitchLeft 6s ease-in-out infinite;
}

.cat-ear-top.right {
  right: 6px;
  transform: rotate(14deg);
  animation: catEarTwitchRight 6s ease-in-out infinite 0.7s;
}

.cat-ear-outer {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #ffffff 0%, #ffc0e2 50%, #f49ecb 100%);
  border: 3.5px solid #ff9ecb;
  box-shadow: 0 4px 14px rgba(255, 105, 180, 0.38);
}

.cat-ear-top.left .cat-ear-outer {
  border-radius: 40px 10px 22px 8px;
}

.cat-ear-top.right .cat-ear-outer {
  border-radius: 10px 40px 8px 22px;
}

.cat-ear-inner {
  position: absolute;
  top: 10px;
  width: 28px;
  height: 32px;
  background: linear-gradient(140deg, #ff7ebb, #ff2a70);
  box-shadow: inset 0 2px 6px rgba(120, 10, 60, 0.3), 0 0 10px rgba(255, 64, 129, 0.45);
}

.cat-ear-top.left .cat-ear-inner {
  left: 9px;
  border-radius: 26px 8px 16px 6px;
}

.cat-ear-top.right .cat-ear-inner {
  right: 9px;
  border-radius: 8px 26px 6px 16px;
}

.cat-ear-fluff {
  position: absolute;
  bottom: 4px;
  width: 14px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.95;
  filter: blur(0.5px);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.cat-ear-top.left .cat-ear-fluff {
  left: 14px;
}

.cat-ear-top.right .cat-ear-fluff {
  right: 14px;
}

/* Tai mèo vẫy khi hào hứng hoặc được vuốt ve */
.robot-wrap.excited .cat-ear-top.left,
.robot-wrap.is-petting .cat-ear-top.left {
  animation: earWiggleCuteLeft 0.35s ease-in-out infinite alternate !important;
}

.robot-wrap.excited .cat-ear-top.right,
.robot-wrap.is-petting .cat-ear-top.right {
  animation: earWiggleCuteRight 0.35s ease-in-out infinite alternate !important;
}

@keyframes earWiggleCuteLeft {
  0% {
    transform: rotate(-22deg) scale(0.96);
  }

  100% {
    transform: rotate(-6deg) scale(1.04);
  }
}

@keyframes earWiggleCuteRight {
  0% {
    transform: rotate(6deg) scale(1.04);
  }

  100% {
    transform: rotate(22deg) scale(0.96);
  }
}

@keyframes catEarTwitchLeft {

  0%,
  88%,
  100% {
    transform: rotate(-14deg);
  }

  90% {
    transform: rotate(-24deg);
  }

  93% {
    transform: rotate(-10deg);
  }

  96% {
    transform: rotate(-18deg);
  }
}

@keyframes catEarTwitchRight {

  0%,
  86%,
  100% {
    transform: rotate(14deg);
  }

  88% {
    transform: rotate(24deg);
  }

  91% {
    transform: rotate(10deg);
  }

  94% {
    transform: rotate(18deg);
  }
}

/* Phụ kiện nơ / charm / quả chuông phát sáng giữa 2 tai mèo */
.robot-antenna {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -4px;
}

.robot-antenna.cat-accessory {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin-bottom: 0;
}

.antenna-orb {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #fff, var(--accent-pink));
  border-radius: 50%;
  box-shadow: 0 0 16px #ff7ebb, 0 0 30px #ff4081;
  animation: orbPulse 1.8s ease-in-out infinite alternate;
  transition: all 0.5s ease;
}

.antenna-orb.star-mode {
  background: radial-gradient(circle, #fff, #ffd700);
  box-shadow: 0 0 18px #ffd700, 0 0 32px #ffaa00;
}

.antenna-orb.heart-mode {
  background: radial-gradient(circle, #fff, #ff2a70);
  box-shadow: 0 0 18px #ff2a70, 0 0 32px #ff0055;
}

.antenna-orb.clover-mode {
  background: radial-gradient(circle, #fff, #00ff88);
  box-shadow: 0 0 18px #00ff88, 0 0 32px #00cc66;
}

@keyframes orbPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.2);
    opacity: 1;
    filter: drop-shadow(0 0 8px #ff7ebb);
  }
}

.antenna-stick {
  width: 4px;
  height: 16px;
  background: linear-gradient(to bottom, #ff9ecb, #d864a9);
  border-radius: 2px;
  transform-origin: bottom center;
  animation: antennaSway 3s ease-in-out infinite alternate;
}

@keyframes antennaSway {
  0% {
    transform: rotate(-4deg);
  }

  100% {
    transform: rotate(4deg);
  }
}

/* Lông má mèo phúng phính hai bên (Fluffy cheek tufts) */
.cat-cheek-fluff {
  position: absolute;
  top: 56px;
  width: 14px;
  height: 32px;
  pointer-events: none;
  z-index: 1;
}

.cat-cheek-fluff.left {
  left: -10px;
}

.cat-cheek-fluff.right {
  right: -10px;
}

.cat-cheek-fluff span {
  position: absolute;
  width: 12px;
  height: 14px;
  background: linear-gradient(145deg, #ffffff, #ffd1e7);
  border: 2px solid #ffaed6;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(255, 126, 187, 0.35);
}

.cat-cheek-fluff.left span:nth-child(1) {
  top: 0;
  left: 0;
  transform: rotate(-25deg);
}

.cat-cheek-fluff.left span:nth-child(2) {
  top: 10px;
  left: 2px;
  width: 10px;
  height: 12px;
  transform: rotate(-15deg);
}

.cat-cheek-fluff.right span:nth-child(1) {
  top: 0;
  right: 0;
  transform: rotate(25deg);
}

.cat-cheek-fluff.right span:nth-child(2) {
  top: 10px;
  right: 2px;
  width: 10px;
  height: 12px;
  transform: rotate(15deg);
}

/* Mặt mèo / Face Screen */
.robot-screen.cat-face-screen,
.robot-screen {
  position: relative;
  width: 142px;
  height: 104px;
  background: #140822;
  border-radius: 40px 40px 48px 48px;
  border: 2.5px solid #4a2163;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 126, 187, 0.25);
}

/* Râu mèo hai bên má (Cat Whiskers) */
.cat-whiskers {
  position: absolute;
  top: 60px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  z-index: 3;
}

.cat-whiskers.left {
  left: 8px;
}

.cat-whiskers.right {
  right: 8px;
}

.whisker {
  display: block;
  height: 2px;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.cat-whiskers.left .whisker.w1 {
  width: 22px;
  background: linear-gradient(to left, #ff9ecb, rgba(255, 255, 255, 0.9));
  transform: rotate(-7deg);
  box-shadow: 0 0 6px #ff7ebb;
}

.cat-whiskers.left .whisker.w2 {
  width: 19px;
  background: linear-gradient(to left, #ff9ecb, rgba(255, 255, 255, 0.9));
  transform: rotate(6deg);
  box-shadow: 0 0 6px #ff7ebb;
}

.cat-whiskers.right .whisker.w1 {
  width: 22px;
  background: linear-gradient(to right, #ff9ecb, rgba(255, 255, 255, 0.9));
  transform: rotate(7deg);
  box-shadow: 0 0 6px #ff7ebb;
}

.cat-whiskers.right .whisker.w2 {
  width: 19px;
  background: linear-gradient(to right, #ff9ecb, rgba(255, 255, 255, 0.9));
  transform: rotate(-6deg);
  box-shadow: 0 0 6px #ff7ebb;
}

/* Má hồng mèo (Blush) */
.blush {
  position: absolute;
  bottom: 22px;
  width: 24px;
  height: 14px;
  background: #ff4081;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(2.5px);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  z-index: 1;
}

.blush.left {
  left: 10px;
}

.blush.right {
  right: 10px;
}

.robot-screen.is-blushing .blush {
  opacity: 0.95;
  transform: scale(1.4);
  filter: blur(1.5px);
  box-shadow: 0 0 14px #ff4081, 0 0 24px #ff80ab;
}

/* Mũi mèo nhỏ hồng xinh xắn (Cat Nose) */
.cat-nose {
  position: absolute;
  top: 57px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 6px;
  background: linear-gradient(180deg, #ff7ebb, #ff3377);
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 0 8px #ff4081, 0 0 14px rgba(255, 82, 154, 0.7);
  z-index: 4;
  pointer-events: none;
}

.cat-nose::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 2px;
  width: 3px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.9;
}

/* Miệng mèo cute :3 (Cat Mouth) */
.cat-mouth {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 4;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-lip {
  width: 10px;
  height: 6px;
  border: 2px solid #ff7ebb;
  border-top: none;
  box-shadow: 0 2px 6px rgba(255, 126, 187, 0.7);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-lip.left {
  border-radius: 0 0 0 8px;
  border-right: none;
  transform: rotate(-6deg);
  margin-right: -0.5px;
}

.cat-lip.right {
  border-radius: 0 0 8px 0;
  border-left: none;
  transform: rotate(6deg);
  margin-left: -0.5px;
}

.cat-tongue {
  position: absolute;
  top: 3px;
  width: 10px;
  height: 8px;
  background: linear-gradient(180deg, #ff6097, #ff2a70);
  border-radius: 0 0 8px 8px;
  border: 1.5px solid #ff80ab;
  border-top: none;
  transform: scale(0);
  transform-origin: top center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(255, 42, 112, 0.6);
  z-index: -1;
}

/* Biểu cảm miệng mèo: Happy / Warm / Curious */
.cat-mouth.happy,
.cat-mouth.warm,
.cat-mouth.curious {
  transform: translateX(-50%) translateY(-1px);
}

.cat-mouth.happy .cat-lip.left,
.cat-mouth.warm .cat-lip.left {
  transform: rotate(-14deg) translateY(-1px);
  border-color: #00f3ff;
  box-shadow: 0 2px 8px #00f3ff;
}

.cat-mouth.happy .cat-lip.right,
.cat-mouth.warm .cat-lip.right {
  transform: rotate(14deg) translateY(-1px);
  border-color: #00f3ff;
  box-shadow: 0 2px 8px #00f3ff;
}

.cat-mouth.happy .cat-tongue,
.cat-mouth.warm .cat-tongue {
  transform: scale(1) translateY(1px);
}

/* Biểu cảm miệng mèo: Wink (Blep tinh nghịch le lưỡi) */
.cat-mouth.wink {
  transform: translateX(-50%) rotate(4deg);
}

.cat-mouth.wink .cat-lip.left {
  transform: rotate(-3deg);
  border-color: #00f3ff;
}

.cat-mouth.wink .cat-lip.right {
  transform: rotate(16deg) translateY(-2px);
  border-color: #00f3ff;
  box-shadow: 0 2px 8px #00f3ff;
}

.cat-mouth.wink .cat-tongue {
  transform: scale(1.15) translate(2.5px, 2px) rotate(10deg);
}

/* Biểu cảm miệng mèo: Shy (Ngại ngùng) */
.cat-mouth.shy .cat-lip {
  width: 8px;
  height: 5px;
  border-color: #ff8dc5;
}

.cat-mouth.shy {
  animation: shyMouthTwitch 2s ease-in-out infinite alternate;
}

@keyframes shyMouthTwitch {
  0% {
    transform: translateX(-50%) scale(0.95);
  }

  100% {
    transform: translateX(-50%) scale(1.05);
  }
}

/* Biểu cảm miệng mèo: Dizzy (Chóng mặt bối rối) */
.cat-mouth.dizzy {
  animation: mouthWobble 0.25s infinite alternate;
}

.cat-mouth.dizzy .cat-lip {
  width: 8px;
  height: 4px;
  border-radius: 4px;
  border-color: #ff7ebb;
  border-right: 2px solid #ff7ebb;
  border-left: 2px solid #ff7ebb;
  transform: none !important;
}

.cat-mouth.dizzy .cat-tongue {
  transform: scale(0);
}

@keyframes mouthWobble {
  0% {
    transform: translateX(calc(-50% - 2px));
  }

  100% {
    transform: translateX(calc(-50% + 2px));
  }
}

/* Biểu cảm miệng mèo: Sleepy (Mơ màng) */
.cat-mouth.sleepy .cat-lip {
  width: 7px;
  height: 3px;
  opacity: 0.65;
  transform: scaleY(0.6);
}

/* Biểu cảm miệng mèo: Starry / Clover (Hân hoan lấp lánh) */
.cat-mouth.starry .cat-lip.left,
.cat-mouth.clover .cat-lip.left {
  transform: rotate(-18deg) translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 2px 8px #ffd700;
}

.cat-mouth.starry .cat-lip.right,
.cat-mouth.clover .cat-lip.right {
  transform: rotate(18deg) translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 2px 8px #ffd700;
}

.cat-mouth.starry .cat-tongue,
.cat-mouth.clover .cat-tongue {
  transform: scale(1.2) translateY(2px);
}

/* Biểu cảm miệng mèo: Heart (Ngọt ngào thả tim) */
.cat-mouth.heart .cat-lip {
  border-color: #ff4081;
  box-shadow: 0 2px 8px #ff4081;
}

.cat-mouth.heart .cat-tongue {
  transform: scale(1.15) translateY(2px);
}

/* Biểu cảm miệng mèo: Emotional (Xúc động rưng rưng) */
.cat-mouth.emotional .cat-lip.left {
  transform: rotate(12deg);
  border-bottom: none;
  border-top: 2px solid #00f3ff;
  border-radius: 8px 0 0 0;
  box-shadow: 0 -2px 6px #00f3ff;
}

.cat-mouth.emotional .cat-lip.right {
  transform: rotate(-12deg);
  border-bottom: none;
  border-top: 2px solid #00f3ff;
  border-radius: 0 8px 0 0;
  box-shadow: 0 -2px 6px #00f3ff;
}

/* Biểu cảm miệng: Dịu dàng, thấu hiểu */
.cat-mouth.gentle .cat-lip {
  width: 9px;
  height: 5px;
  border-color: #ff9ecb;
  transform: translateY(-1px);
}

/* Biểu cảm miệng: Lo lắng nhắc nhở */
.cat-mouth.concerned .cat-lip {
  width: 8px;
  height: 4px;
  border-radius: 4px;
  border-color: #ff8dc5;
}

/* Biểu cảm miệng: Ấm áp vỗ về */
.cat-mouth.comfort .cat-lip {
  width: 9px;
  height: 5px;
  border-color: #ff7ebb;
}

/* Nghiêng đầu mèo khi dặn dò */
.robot-wrap.tilt-head .cat-head {
  transform: rotate(-8deg) translateY(-2px) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Hàng mắt mèo (Eyes row) */
.eyes-row {
  display: flex;
  justify-content: space-between;
  width: 82px;
  margin-top: -6px;
  margin-bottom: 4px;
  z-index: 2;
}

.eye {
  position: relative;
  width: 28px;
  height: 38px;
  background: #00f3ff;
  border-radius: 50%;
  box-shadow: 0 0 14px #00f3ff, 0 0 28px rgba(0, 243, 255, 0.6);
  transition: width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-radius 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.eye .pupil {
  position: absolute;
  width: 11px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  top: 5px;
  left: 5px;
  transform: translate(var(--look-x, 0px), var(--look-y, 0px));
  transition: transform 0.1s ease-out;
  box-shadow: 0 0 6px #ffffff;
}

.eye .glint {
  position: absolute;
  width: 5px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  bottom: 7px;
  right: 5px;
  transform: translate(calc(var(--look-x, 0px) * 0.5), calc(var(--look-y, 0px) * 0.5));
  transition: transform 0.1s ease-out;
}

.eye-symbol {
  display: none;
  font-size: 20px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  font-weight: bold;
}

.eye.blink {
  transform: scaleY(0.08) !important;
  transition: transform 0.08s ease-in !important;
}

.eye.sleepy {
  transform: scaleY(0.24);
  opacity: 0.65;
}

.eye.shy .pupil {
  top: 16px;
  left: 3px;
  transform: none;
}

.eye.shy .glint {
  bottom: 2px;
  right: 12px;
  transform: none;
}

.eye.wink {
  height: 7px;
  border-radius: 8px 8px 50% 50%;
  transform: translateY(6px);
  background: #00f3ff;
  box-shadow: 0 0 10px #00f3ff;
}

.eye.wink .pupil,
.eye.wink .glint {
  display: none;
}

.eye.happy {
  background: transparent !important;
  box-shadow: none !important;
  border-top: 6px solid #00f3ff;
  border-radius: 50% 50% 0 0;
  height: 18px;
  width: 26px;
  filter: drop-shadow(0 -2px 8px #00f3ff);
  animation: happyEyeBounce 0.8s ease-in-out infinite alternate;
}

.eye.happy .pupil,
.eye.happy .glint {
  display: none;
}

@keyframes happyEyeBounce {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-3px);
  }
}

.eye.starry {
  background: rgba(255, 215, 0, 0.2);
  border: 2px solid #ffd700;
  box-shadow: 0 0 18px #ffd700, 0 0 35px rgba(255, 215, 0, 0.6);
}

.eye.starry .pupil,
.eye.starry .glint {
  display: none;
}

.eye.starry .eye-symbol {
  display: block;
  color: #fff275;
  text-shadow: 0 0 10px #ffd700, 0 0 18px #ffaa00;
  animation: starSpin 3.5s linear infinite, starPulse 1.2s ease-in-out infinite alternate;
}

@keyframes starSpin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes starPulse {
  0% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 6px #fff);
  }
}

.eye.heart {
  background: rgba(255, 64, 129, 0.25);
  border: 2px solid #ff4081;
  box-shadow: 0 0 18px #ff4081, 0 0 35px rgba(255, 64, 129, 0.6);
}

.eye.heart .pupil,
.eye.heart .glint {
  display: none;
}

.eye.heart .eye-symbol {
  display: block;
  color: #ff6097;
  text-shadow: 0 0 10px #ff1744, 0 0 20px #ff4081;
  animation: heartThrob 0.7s ease-in-out infinite alternate;
}

@keyframes heartThrob {
  0% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1.3);
    filter: drop-shadow(0 0 8px #ff80ab);
  }
}

.eye.dizzy {
  background: rgba(255, 126, 187, 0.2);
  border: 2px solid #ff7ebb;
  box-shadow: 0 0 12px #ff7ebb;
  height: 26px;
}

.eye.dizzy .pupil,
.eye.dizzy .glint {
  display: none;
}

.eye.dizzy .eye-symbol {
  display: block;
  font-size: 22px;
  color: #ff7ebb;
  text-shadow: 0 0 8px #ff7ebb;
  font-family: monospace;
}

.eye.clover {
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid #00ff88;
  box-shadow: 0 0 18px #00ff88, 0 0 30px rgba(0, 255, 136, 0.5);
}

.eye.clover .pupil,
.eye.clover .glint {
  display: none;
}

.eye.clover .eye-symbol {
  display: block;
  font-size: 18px;
  animation: cloverSway 1.5s ease-in-out infinite alternate;
}

@keyframes cloverSway {
  0% {
    transform: rotate(-15deg) scale(0.95);
  }

  100% {
    transform: rotate(15deg) scale(1.15);
  }
}

.eye.emotional {
  background: #00f3ff;
  box-shadow: 0 0 20px #00f3ff, 0 0 35px rgba(0, 243, 255, 0.7);
  animation: tearGlisten 1.5s ease-in-out infinite alternate;
}

.eye.emotional .pupil {
  width: 14px;
  height: 18px;
  top: 3px;
  left: 3px;
  background: radial-gradient(circle, #ffffff 60%, #b3f7ff 100%);
  box-shadow: 0 0 10px #ffffff;
}

.eye.emotional .glint {
  width: 7px;
  height: 8px;
  bottom: 4px;
  right: 4px;
  box-shadow: 0 0 8px #ffffff;
}

@keyframes tearGlisten {
  0% {
    filter: drop-shadow(0 0 4px #fff);
  }

  100% {
    filter: drop-shadow(0 0 12px #b3f7ff);
  }
}

/* Biểu cảm mắt: Dịu dàng, thấu hiểu */
.eye.gentle {
  transform: scaleY(0.72);
  opacity: 0.95;
  box-shadow: 0 0 12px #7fe6ff, 0 0 22px rgba(127, 230, 255, 0.5);
}
.eye.gentle .pupil {
  top: 8px;
  left: 6px;
}

/* Biểu cảm mắt: Hơi lo lắng */
.eye.concerned {
  transform: scale(0.92) translateY(1px);
}
.eye.concerned .pupil {
  top: 4px;
  left: 5px;
}

/* Biểu cảm mắt: Ấm áp vỗ về */
.eye.comfort {
  transform: scaleY(0.78);
  background: linear-gradient(180deg, #7fe6ff, #00f3ff);
  box-shadow: 0 0 16px #7fe6ff, 0 0 26px rgba(127, 230, 255, 0.6);
}
.eye.comfort .pupil {
  top: 7px;
  left: 5px;
}

.sweatdrop {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.4s ease;
}

.sweatdrop.show {
  opacity: 1;
  transform: translateY(0);
}

.dialogue-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 220px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-top: 1.5px solid var(--glass-border-highlight);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
  padding: 24px 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.dialogue-card:hover {
  box-shadow: 0 20px 50px rgba(255, 126, 187, 0.25);
}

.dialogue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(255, 184, 221, 0.22);
  padding-bottom: 10px;
}

.robot-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-pink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00f3ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f3ff;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.tag-2010 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(255, 230, 133, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 230, 133, 0.3);
}

.dialogue-body {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 85px;
  padding: 8px 0;
}

.dialogue-line {
  font-size: clamp(16px, 2.5vw, 19.5px);
  line-height: 1.65;
  color: #fff9fc;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  min-height: 1.65em;
}

.dialogue-line .highlight {
  color: var(--accent-pink);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 126, 187, 0.6);
}

.dialogue-line .gold {
  color: var(--accent-gold);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 230, 133, 0.8);
}

.clover-container {
  display: none;
  flex-direction: column;
  align-items: center;
  margin: 14px 0 10px;
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.clover-container.show {
  display: flex;
}

.clover-leaves {
  position: relative;
  width: 58px;
  height: 58px;
  animation: cloverSpin 8s ease-in-out infinite alternate;
}

@keyframes cloverSpin {
  0% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(14deg);
  }
}

.clover-leaves .leaf {
  position: absolute;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #a8ff78, #78ffd6);
  border-radius: 50% 50% 0 50%;
  box-shadow: 0 0 12px rgba(120, 255, 214, 0.6);
}

.clover-leaves .l1 {
  top: 0;
  left: 0;
  transform: rotate(0deg);
}

.clover-leaves .l2 {
  top: 0;
  right: 0;
  transform: rotate(90deg);
}

.clover-leaves .l3 {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.clover-leaves .l4 {
  bottom: 0;
  left: 0;
  transform: rotate(270deg);
}

.clover-leaves .stem {
  position: absolute;
  bottom: -14px;
  left: 27px;
  width: 4px;
  height: 20px;
  background: #78ffd6;
  border-radius: 2px;
}

.clover-caption {
  font-size: 13.5px;
  font-weight: 600;
  color: #c9ffe7;
  margin-top: 18px;
  letter-spacing: 0.3px;
  text-shadow: 0 0 10px rgba(120, 255, 214, 0.6);
}

.dialogue-footer {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  width: 10%;
  height: 100%;
  background: linear-gradient(to right, var(--accent-pink), var(--accent-cyan));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.click-hint {
  font-size: 12.5px;
  color: var(--accent-pink-soft);
  text-align: right;
  opacity: 0.85;
  animation: hintBounce 1.8s ease-in-out infinite;
}

@keyframes hintBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.envelope-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.envelope-wrapper.show {
  display: flex;
}

.envelope-card {
  position: relative;
  width: min(290px, 88vw);
  height: 185px;
  perspective: 800px;
}

.envelope-body {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #381545, #1d0928);
  border-radius: 18px;
  border: 1.5px solid rgba(255, 184, 221, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 126, 187, 0.25);
  overflow: hidden;
}

.envelope-letter-peek {
  position: absolute;
  top: 22px;
  left: 20px;
  right: 20px;
  height: 130px;
  background: rgba(255, 245, 250, 0.95);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope-letter-peek .peek-badge {
  font-size: 13px;
  font-weight: 700;
  color: #ff4081;
}

.envelope-letter-peek .peek-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #442233;
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 15, 60, 0.95) 0%, rgba(30, 10, 42, 0.8) 70%, transparent 100%);
  pointer-events: none;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 95px;
  background: linear-gradient(180deg, #4d1c60, #381545);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

.envelope-flap.open {
  transform: rotateX(180deg);
  z-index: 1;
}

.wax-seal {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 56px;
  height: 56px;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff7ebb, #ff2a75);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 20px rgba(255, 42, 117, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: sealPulse 2s infinite ease-in-out;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 6px 28px rgba(255, 42, 117, 0.85);
}

.wax-seal:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.wax-seal .wax-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wax-seal.broken {
  transform: translate(-50%, -50%) scale(1.4);
  opacity: 0;
  pointer-events: none;
}

@keyframes sealPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(255, 42, 117, 0.6);
  }

  50% {
    box-shadow: 0 6px 30px rgba(255, 42, 117, 0.95), 0 0 15px rgba(255, 255, 255, 0.4);
  }
}

.envelope-hint {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: #ffd6ec;
  text-shadow: 0 0 10px rgba(255, 126, 187, 0.5);
  animation: floatHint 2.5s ease-in-out infinite alternate;
}

@keyframes floatHint {
  0% {
    transform: translateY(0);
    opacity: 0.85;
  }

  100% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.ending-card {
  display: none;
  position: relative;
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at top, rgba(50, 18, 64, 0.88), rgba(20, 8, 30, 0.95));
  border: 2px solid rgba(255, 180, 220, 0.4);
  border-top: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(255, 126, 187, 0.28), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  padding: 34px 24px 28px;
  text-align: center;
  backdrop-filter: blur(24px);
  animation: popIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ending-card.show {
  display: block;
}

@keyframes popIn {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.ending-ribbon {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff4081, #ff7ebb);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(255, 64, 129, 0.45);
  margin-bottom: 16px;
}

.ending-mascot img {
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.6), rgba(127, 230, 255, 0.4));
  box-shadow: 0 0 25px rgba(255, 126, 187, 0.5);
  animation: mascotGlow 3s ease-in-out infinite alternate;
}

@keyframes mascotGlow {
  0% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 10px rgba(255, 126, 187, 0.5));
  }

  100% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 20px rgba(255, 126, 187, 0.9));
  }
}

.ending-title {
  font-size: clamp(22px, 3.5vw, 28px);
  margin: 14px 0 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 10%, #ffbde0 60%, #ffd4a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ending-letter {
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.7;
  color: #ffecf6;
  margin-bottom: 22px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.ending-letter p {
  margin-bottom: 10px;
}

.ending-sign {
  margin-top: 18px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--accent-pink-soft);
}

.ending-sign strong {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 126, 187, 0.8);
}

.ending-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-min);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-pill.github {
  background: rgba(30, 16, 42, 0.85);
  border: 1.5px solid rgba(255, 184, 221, 0.5);
  color: #ffffff;
}

.social-pill.github:hover {
  background: rgba(65, 30, 85, 0.95);
  border-color: #ff8dc5;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 141, 197, 0.45);
}

.social-pill.save-btn {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.35), rgba(255, 230, 133, 0.3));
  border: 1.5px solid rgba(255, 230, 133, 0.6);
  color: #ffffff;
  cursor: pointer;
}

.social-pill.save-btn:hover {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.55), rgba(255, 230, 133, 0.5));
  border-color: #ffe685;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 230, 133, 0.45);
}

.social-pill.fortune-btn {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.35), rgba(127, 230, 255, 0.25));
  border: 1.5px solid rgba(127, 230, 255, 0.6);
  color: #ffffff;
  cursor: pointer;
}

.social-pill.fortune-btn:hover {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.55), rgba(127, 230, 255, 0.45));
  border-color: #7fe6ff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(127, 230, 255, 0.45);
}

.fortune-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fortune-modal.show {
  display: flex;
}

.fortune-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 4, 18, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fortune-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  background: radial-gradient(circle at top, rgba(50, 18, 64, 0.95), rgba(20, 8, 30, 0.98));
  border: 2px solid rgba(255, 180, 220, 0.45);
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(255, 126, 187, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.25);
  padding: 30px 24px 26px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.close-fortune {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-fortune:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.fortune-ribbon {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff7ebb, #ffd700);
  padding: 5px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(255, 126, 187, 0.4);
  margin-bottom: 14px;
}

.fortune-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(255, 126, 187, 0.5));
  animation: floatHint 2s ease-in-out infinite alternate;
}

.fortune-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(255, 230, 133, 0.6);
}

.fortune-text {
  font-size: 15px;
  line-height: 1.6;
  color: #fff0f7;
  margin-bottom: 22px;
  padding: 0 10px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.fortune-gift-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-min);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1877f2, #ff4081);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px rgba(24, 119, 242, 0.45), 0 0 15px rgba(255, 64, 129, 0.35);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: sealPulse 1.8s infinite ease-in-out;
}

.fortune-gift-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 24px rgba(24, 119, 242, 0.65), 0 0 20px rgba(255, 64, 129, 0.5);
}

.fortune-gift-btn:active {
  transform: scale(0.96);
}

.draw-again-btn {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.4), rgba(255, 64, 129, 0.5));
  border: 1.5px solid var(--accent-pink-soft);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 18px rgba(255, 64, 129, 0.35);
}

.draw-again-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 22px rgba(255, 64, 129, 0.55);
}

.draw-again-btn:active {
  transform: scale(0.96);
}

.social-pill.facebook {
  background: rgba(20, 32, 60, 0.85);
  border: 1.5px solid rgba(160, 215, 255, 0.5);
  color: #ffffff;
}

.social-pill.facebook:hover {
  background: rgba(30, 60, 115, 0.95);
  border-color: #a0d7ff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(160, 215, 255, 0.45);
}

.social-pill:active {
  transform: scale(0.96);
}

.replay-btn {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.3), rgba(255, 64, 129, 0.4));
  border: 1.5px solid rgba(255, 184, 221, 0.6);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 12px 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 20px rgba(255, 64, 129, 0.35);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.replay-btn:hover {
  background: linear-gradient(135deg, rgba(255, 126, 187, 0.5), rgba(255, 64, 129, 0.65));
  border-color: #ffaed6;
  color: #ffffff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 25px rgba(255, 64, 129, 0.55);
}

.replay-btn:active {
  transform: scale(0.96);
}

@media (max-width: 500px) {
  .stage-container {
    padding: 12px;
  }

  .robot-wrap {
    margin-bottom: 16px;
  }

  .robot-head {
    width: 140px;
    height: 110px;
    border-radius: 38px;
  }

  .robot-screen {
    width: 112px;
    height: 80px;
    border-radius: 28px;
  }

  .dialogue-card {
    padding: 18px 16px 14px;
    min-height: 180px;
  }

  .dialogue-line {
    font-size: 15px;
  }

  .ending-card {
    padding: 24px 16px 20px;
    border-radius: 24px;
  }

  .ending-title {
    font-size: 20px;
    margin: 10px 0 12px;
  }

  .ending-letter {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .ending-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 16px;
  }

  .social-pill {
    width: 100%;
    min-height: var(--touch-min);
    justify-content: center;
    padding: 11px 18px;
    font-size: 13.5px;
  }

  .replay-btn {
    min-height: var(--touch-min);
    padding: 10px 24px;
  }
}