@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@400;500;600&display=swap');

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at center, #4a1515 0%, #2a0505 30%, #0a0001 60%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Vignette overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 60%, rgba(10, 0, 0, 0.15) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('media/noise.svg');
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  filter: contrast(150%);
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* ==================== ENVELOPE WRAPPER ==================== */
.envelope-wrapper {
  position: relative;
  width: 320px;
  height: 200px;
  cursor: pointer;
  perspective: 1000px;
}

/* ==================== CARD (inside envelope) ==================== */
.card {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotateZ(-90deg);
  transform-origin: center center;
  width: 200px;
  height: 320px;
  z-index: 5;
  transform-style: preserve-3d;
  opacity: 0;
  visibility: hidden;
}

/* Card appears and animates when envelope opens */
.envelope-wrapper.open .card {
  opacity: 1;
  visibility: visible;
  z-index: 30;
  animation: cardFlyOut 1.5s ease-out 0.3s forwards;
}

@keyframes cardFlyOut {
  0% {
    bottom: 20px;
    transform: translateX(-50%) rotateZ(-90deg);
  }
  50% {
    bottom: 280px;
    transform: translateX(-50%) rotateZ(-90deg);
  }
  100% {
    bottom: 0px;
    transform: translateX(-50%) rotateZ(6deg);
  }
}

/* ==================== CARD INNER (the flipping part) ==================== */
.card-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 0.6s ease;
  z-index: 2;
}

/* Card cover (front face) */
.card-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #ffffff 0%, #f8f8f8 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Card back (seen when flipped) */
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #fff0f3;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 8px;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Decorative heart on card back when no image */
.card-back::after {
  content: '\2764';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  color: rgba(233, 30, 99, 0.15);
  pointer-events: none;
}

.card-back.has-image::after {
  display: none;
}

/* Card flips open on hover ONLY when animation is done */
.envelope-wrapper.open .card.animation-done:hover .card-inner {
  transform: rotateY(-150deg);
}

/* ==================== CARD BODY (message inside) ==================== */
.card-body {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #ffffff 0%, #fffafa 100%);
  border-radius: 8px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar */
.card-body::-webkit-scrollbar {
  width: 4px;
}

.card-body::-webkit-scrollbar-track {
  background: rgba(233, 30, 99, 0.1);
  border-radius: 2px;
}

.card-body::-webkit-scrollbar-thumb {
  background: rgba(233, 30, 99, 0.4);
  border-radius: 2px;
}

.card-greeting {
  font-family: 'Dancing Script', cursive;
  font-size: 18px;
  font-weight: 700;
  color: #c2185b;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.card-message {
  font-family: 'Dancing Script', cursive;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-ending {
  font-family: 'Dancing Script', cursive;
  font-size: 16px;
  font-weight: 700;
  color: #c2185b;
  text-align: right;
  flex-shrink: 0;
  margin-top: auto;
}

/* Typewriter animation for handwriting effect */
.card-body .typewriter {
  overflow: hidden;
  white-space: normal;
}

.card-body .typewriter span {
  opacity: 0;
  display: inline;
  animation: fadeInChar 0.3s forwards;
}

@keyframes fadeInChar {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== CARD TITLE ==================== */
.card-title {
  text-align: center;
}

.card-title-secondary {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.card-title-main {
  display: block;
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  color: #e91e63;
  margin: 8px 0;
}

/* ==================== ENVELOPE ==================== */
.envelope {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 320px;
  height: 200px;
  z-index: 10;
}

/* Envelope back (gray inside) */
.envelope-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #d5d5d5;
  border-radius: 0 0 10px 10px;
}

/* Envelope lid (flap that opens) */
.envelope-lid {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 120px solid #e0e0e0;
  transform-origin: top center;
  transition: transform 0.5s ease-in-out;
  z-index: 25;
}

/* Lid opens when wrapper has .open class */
.envelope-wrapper.open .envelope-lid {
  transform: rotateX(180deg);
}

/* Envelope front (covers bottom of card) */
.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* Front bottom triangle */
.envelope-front::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-bottom: 120px solid #f0f0f0;
}

/* Front side panels */
.envelope-front::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, #f5f5f5 0%, #f5f5f5 60%, transparent 100%);
  border-radius: 0 0 10px 10px;
}

/* ==================== HEART SEAL ==================== */
.heart-seal {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 45px;
  z-index: 30;
  transition: all 0.3s ease;
  cursor: pointer;
}

.heart-seal::before,
.heart-seal::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b9d 0%, #e91e63 100%);
  border-radius: 25px 25px 0 0;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
}

.heart-seal::before {
  left: 25px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart-seal::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

/* Heart seal disappears when open */
.envelope-wrapper.open .heart-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0);
}

/* ==================== CLICK INSTRUCTION ==================== */
.click-instruction {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  letter-spacing: 1px;
  animation: pulse-text 2s ease-in-out infinite;
  transition: opacity 0.3s;
  margin-top: -10px;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ==================== FLYING HEARTS BACKGROUND ==================== */
.flying-hearts-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.flying-heart {
  position: absolute;
  background-color: #ff526f;
  transform: rotate(45deg);
  animation: floatUp 8s ease-out forwards;
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 82, 111, 0.8)) drop-shadow(0 0 20px rgba(255, 82, 111, 0.6));
  will-change: transform, opacity, bottom;
}

.flying-heart::before,
.flying-heart::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background-color: inherit;
}

.flying-heart::before {
  top: -50%;
  left: 0;
  width: 100%;
  height: 100%;
}

.flying-heart::after {
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
}

@keyframes floatUp {
  0% {
    transform: rotate(45deg) translateY(0) rotate(0deg) scale(0);
    opacity: 0;
    bottom: -50px;
  }
  5% {
    opacity: 1;
    transform: rotate(45deg) translateY(0) rotate(18deg) scale(1);
  }
  95% {
    opacity: 1;
    transform: rotate(45deg) translateY(0) rotate(342deg) scale(1);
  }
  100% {
    transform: rotate(45deg) translateY(0) rotate(360deg) scale(0);
    opacity: 0;
    bottom: calc(100vh + 50px);
  }
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 40, 0.9);
  backdrop-filter: blur(10px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  animation: modal-in 0.5s ease;
}

@keyframes modal-in {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e91e63;
  color: white;
  font-size: 24px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.close:hover {
  transform: scale(1.1) rotate(90deg);
}

.polaroid-image {
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.polaroid-image.fade-in {
  opacity: 1;
  transform: scale(1);
}

.polaroid-image img {
  width: 60%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

.polaroid-text {
  text-align: center;
}

.polaroid-text h2 {
  color: #e91e63;
  font-family: 'Pacifico', cursive;
  font-size: 24px;
  margin-bottom: 15px;
}

.polaroid-text p {
  color: #555;
  font-family: 'Dancing Script', cursive;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 10px;
}

.polaroid-text .signature {
  color: #e91e63;
  font-family: 'Dancing Script', cursive;
  font-style: italic;
  font-weight: 700;
  margin-top: 20px;
}

/* Typewriter effect cho modal */
.polaroid-text .typewriter-modal {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.polaroid-text .typewriter-modal span {
  opacity: 0;
  display: inline;
  animation: fadeInCharModal 0.3s forwards;
}

@keyframes fadeInCharModal {
  0% {
    opacity: 0;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

/* ==================== HEART CLOSE BUTTON (cuối thư trong modal) ==================== */
.heart-close-btn {
  text-align: center;
  margin-top: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.heart-close-btn img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(233, 30, 99, 0.4));
  transition: transform 0.3s ease;
}

.heart-close-btn:hover img {
  transform: scale(1.15);
}

.heart-close-btn:active img {
  transform: scale(0.95);
}

/* ==================== FLYING IMAGES (ảnh bay lên sau khi chạm heart) ==================== */
.flying-images-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  pointer-events: none;
  overflow: hidden;
}

/* Wrapper: bay lên đều đặn + hiện/mờ dần. Ảnh bên trong đung đưa riêng,
   nhờ vậy chuyển động ngang mượt như con lắc, không giật theo keyframe dọc. */
.flying-photo-wrap {
  position: fixed;
  bottom: -25vh;
  left: var(--startX, 50%);
  z-index: 3001;
  opacity: 0;
  will-change: transform, opacity;
  transform: translate(-50%, 0);
  animation: photoRise var(--dur, 7s) cubic-bezier(0.37, 0, 0.63, 1) var(--delay, 0ms) forwards;
}

@keyframes photoRise {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  12% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160vh) scale(1);
  }
}

.flying-photo {
  display: block;
  width: var(--size, 140px);
  height: var(--size, 140px);
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 10px rgba(233, 30, 99, 0.6),
    0 0 20px rgba(233, 30, 99, 0.4),
    0 0 40px rgba(233, 30, 99, 0.2);
  object-fit: cover;
  will-change: transform;
  animation: photoSway var(--swayDur, 3s) ease-in-out var(--swayDelay, 0ms) infinite alternate;
}

@keyframes photoSway {
  from {
    transform: translateX(calc(var(--sway, 40px) * -1)) rotate(calc(var(--tilt, 6deg) * -1));
  }
  to {
    transform: translateX(var(--sway, 40px)) rotate(var(--tilt, 6deg));
  }
}

/* ==================== MAIN CONTENT HIDDEN STATE ==================== */
.main-content.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* ==================== MUSIC TOGGLE ==================== */
.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #e91e63);
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
  transition: transform 0.3s;
}

.music-toggle:hover {
  transform: scale(1.1);
}

.music-toggle.playing {
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(233, 30, 99, 0.8); }
}

.music-icon {
  width: 24px;
  height: 24px;
}

.music-icon .wave {
  opacity: 0;
}

.music-icon.playing .wave {
  opacity: 1;
  animation: wave-anim 1s infinite;
}

@keyframes wave-anim {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

/* ==================== ROSE INTRO (WARP TUNNEL) ==================== */
.rose-intro {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.6s ease;
}

.rose-intro::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(300px, 60vmin, 500px);
  height: clamp(300px, 60vmin, 500px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 105, 140, 0.45) 0%, rgba(255, 60, 90, 0.18) 35%, transparent 70%);
  filter: blur(30px);
  animation: bouquetGlow 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes bouquetGlow {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.2); }
}

.rose-bouquet {
  --bouquet-scale: 1;
  position: relative;
  width: 300px;
  height: 320px;
  z-index: 3;
  animation: bouquetBreathe 3.5s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

@keyframes bouquetBreathe {
  0%, 100% { transform: scale(var(--bouquet-scale)); }
  50%      { transform: scale(calc(var(--bouquet-scale) * 1.06)); }
}

.rose-intro.warping .rose-bouquet {
  animation: bouquetExplode 0.7s ease-out forwards;
}

@keyframes bouquetExplode {
  0%   { transform: scale(var(--bouquet-scale));            opacity: 1; filter: brightness(1); }
  40%  { transform: scale(calc(var(--bouquet-scale) * 1.5)); opacity: 1; filter: brightness(1.6); }
  100% { transform: scale(calc(var(--bouquet-scale) * 3));   opacity: 0; filter: brightness(2); }
}

.bouquet-rose {
  position: absolute;
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 12px rgba(255, 105, 140, 0.4));
}

/* Bouquet arrangement — 7 roses xếp tầng tạo cụm hoa */
.bouquet-rose.r1 { top: 25px;  left: 80px;  transform: rotate(-12deg); z-index: 3; }
.bouquet-rose.r2 { top: 55px;  left: 20px;  transform: rotate(28deg) scale(0.82); z-index: 2; }
.bouquet-rose.r3 { top: 55px;  left: 145px; transform: rotate(-32deg) scale(0.85); z-index: 2; }
.bouquet-rose.r4 { top: 105px; left: 80px;  transform: rotate(8deg) scale(1.05); z-index: 5; }
.bouquet-rose.r5 { top: 145px; left: 30px;  transform: rotate(38deg) scale(0.72); z-index: 4; }
.bouquet-rose.r6 { top: 145px; left: 135px; transform: rotate(-40deg) scale(0.74); z-index: 4; }
.bouquet-rose.r7 { top: 165px; left: 85px;  transform: rotate(-5deg) scale(0.65); z-index: 6; }

.bouquet-hint {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 200, 215, 0.9);
  font-family: 'Dancing Script', cursive;
  font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(255, 105, 140, 0.7);
  animation: hintPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}

.rose-intro.warping .bouquet-hint {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Flash burst khi chạm */
.rose-intro.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 200, 215, 0.55) 0%, rgba(255, 105, 140, 0.3) 30%, transparent 65%);
  animation: flashBurst 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}

@keyframes flashBurst {
  0%   { opacity: 0; transform: scale(0.6); }
  30%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* Warp 3D tunnel */
.rose-warp {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 4;
}

.warp-rose {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, 100px);
  height: var(--size, 100px);
  margin-left: calc(var(--size, 100px) / -2);
  margin-top: calc(var(--size, 100px) / -2);
  object-fit: contain;
  opacity: 0;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 105, 140, 0.5));
  animation: warpFly var(--dur, 2s) ease-out forwards;
}

@keyframes warpFly {
  0% {
    opacity: 0;
    transform: translate3d(var(--x), var(--y), -2200px) rotate(var(--rs));
    filter: drop-shadow(0 0 6px rgba(255, 105, 140, 0.3)) blur(2px);
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
    transform: translate3d(var(--x), var(--y), 600px) rotate(var(--re));
    filter: drop-shadow(0 0 14px rgba(255, 105, 140, 0.7)) blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--x), var(--y), 1000px) rotate(var(--re));
    filter: drop-shadow(0 0 16px rgba(255, 105, 140, 0.5)) blur(6px);
  }
}

.rose-intro.fading {
  opacity: 0;
  pointer-events: none;
}

.rose-intro.gone {
  display: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 400px) {
  .envelope-wrapper {
    width: 280px;
    height: 450px;
  }

  .envelope {
    width: 280px;
    height: 175px;
  }

  .envelope-lid {
    border-left-width: 140px;
    border-right-width: 140px;
    border-top-width: 105px;
  }

  .envelope-front::before {
    border-left-width: 140px;
    border-right-width: 140px;
    border-bottom-width: 105px;
  }

  .heart-seal {
    top: 58px;
  }

  .heart-seal::before,
  .heart-seal::after {
    width: 22px;
    height: 35px;
  }

  .heart-seal::before {
    left: 22px;
  }

  .card {
    width: 175px;
    height: 280px;
    bottom: 15px;
  }

  .envelope-wrapper.open .card {
    z-index: 30;
    animation: cardFlyOutMobile 1.5s ease-out 0.3s forwards;
  }

  @keyframes cardFlyOutMobile {
    0% {
      bottom: 15px;
      transform: translateX(-50%) rotateZ(-90deg);
    }
    50% {
      bottom: 240px;
      transform: translateX(-50%) rotateZ(-90deg);
    }
    100% {
      bottom: 0px;
      transform: translateX(-50%) rotateZ(6deg);
    }
  }

  .card-title-main {
    font-size: 26px;
  }

  .card-title-secondary {
    font-size: 12px;
  }

  .card-body {
    padding: 20px;
  }

  .card-greeting {
    font-size: 18px;
  }

  .card-message {
    font-size: 13px;
  }

  .card-ending {
    font-size: 14px;
  }

  .modal-content {
    padding: 20px;
    width: 92%;
  }

  .close {
    width: 32px;
    height: 32px;
    font-size: 20px;
    right: 10px;
    top: 10px;
  }

  .polaroid-text h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .polaroid-text p {
    font-size: 13px;
    line-height: 1.6;
  }

  .polaroid-text .signature {
    font-size: 13px;
    margin-top: 12px;
  }

}

/* Rose intro responsive scaling — scale toàn bộ bó hoa theo viewport */
@media (max-width: 768px) {
  .rose-bouquet { --bouquet-scale: 0.85; }
  .bouquet-hint { font-size: 22px; bottom: 22%; }
}

@media (max-width: 480px) {
  .rose-bouquet { --bouquet-scale: 0.7; }
  .bouquet-hint { font-size: 19px; bottom: 24%; }
}

@media (max-width: 360px) {
  .rose-bouquet { --bouquet-scale: 0.6; }
  .bouquet-hint { font-size: 17px; }
}
