/* ==========================================================================
   HIBA'S BIRTHDAY EXPERIENCE - LUXURY ROMANTIC DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #0a0410;
  --bg-secondary: #140822;
  --bg-tertiary: #1f0d33;
  --accent-rose: #ff4d6d;
  --accent-rose-light: #ff758f;
  --accent-blush: #ffb3c1;
  --accent-gold: #ffd166;
  --accent-gold-light: #fff0c2;
  --accent-lavender: #c77dff;

  /* Text Colors */
  --text-pure: #ffffff;
  --text-primary: #fbebf1;
  --text-muted: #d0b8cc;
  --text-gold: #ffe399;

  /* Glassmorphism & Borders */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 180, 200, 0.18);
  --glass-glow: 0 8px 32px 0 rgba(255, 77, 109, 0.18);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-heading: 'Cinzel', serif;
  --font-handwriting: 'Great Vibes', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Canvas for floating stars & petals */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Screen Switcher */
.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 2;
  display: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
}

.screen.active {
  display: flex;
  opacity: 1;
}

/* ==========================================================================
   FLOATING MUSIC CONTROLLER
   ========================================================================== */
.music-pill {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(26, 10, 40, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-gold);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 77, 109, 0.2);
  transition: transform 0.2s ease, background 0.3s ease;
}

.music-pill:active {
  transform: scale(0.95);
}

.music-pill.hidden {
  display: none !important;
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.music-bars .bar {
  width: 2.5px;
  background: var(--accent-rose-light);
  border-radius: 2px;
  animation: musicBounce 1.2s infinite ease-in-out;
}

.music-bars .bar-1 {
  height: 6px;
  animation-delay: 0.1s;
}

.music-bars .bar-2 {
  height: 12px;
  animation-delay: 0.3s;
}

.music-bars .bar-3 {
  height: 8px;
  animation-delay: 0.2s;
}

.music-pill.paused .music-bars .bar {
  animation: none;
  height: 3px;
}

@keyframes musicBounce {

  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 13px;
  }
}

/* ==========================================================================
   SCREEN 1: THE ROMANTIC ENVELOPE INTRO
   ========================================================================== */
#introScreen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  background: radial-gradient(circle at 50% 30%, #290f42 0%, #10061e 50%, #06020c 100%);
}

.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.sparkle-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.1);
    transform: translateY(0);
  }

  100% {
    box-shadow: 0 0 25px rgba(255, 209, 102, 0.35);
    transform: translateY(-2px);
  }
}

/* 3D Envelope Component */
.envelope-wrapper {
  position: relative;
  width: 280px;
  height: 190px;
  margin: 10px auto 35px;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.4s var(--ease-spring);
}

.envelope-wrapper:active {
  transform: scale(0.97);
}

.envelope-shadow {
  position: absolute;
  bottom: -15px;
  left: 5%;
  width: 90%;
  height: 25px;
  background: radial-gradient(ellipse at center, rgba(255, 77, 109, 0.3) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 80%);
  filter: blur(8px);
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background: #c93d5a;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 77, 109, 0.25);
  overflow: visible;
}

.envelope-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #9b2840;
  border-radius: 12px;
}

.envelope-letter-peek {
  position: absolute;
  top: 15px;
  left: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 20px);
  background: #fff8f0;
  border-radius: 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s var(--ease-spring);
  z-index: 2;
}

.peek-title {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  color: #9b2840;
  line-height: 1;
}

.peek-heart {
  font-size: 1.5rem;
  margin-top: 4px;
}

.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 140px 105px 140px;
  border-color: transparent transparent #e04b6b transparent;
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

.envelope-front::before {
  content: '';
  position: absolute;
  bottom: -105px;
  left: -140px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 95px 0 95px 140px;
  border-color: transparent transparent transparent #cc3e5c;
  border-radius: 12px 0 0 12px;
}

.envelope-front::after {
  content: '';
  position: absolute;
  bottom: -105px;
  right: -140px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 95px 140px 95px 0;
  border-color: transparent #d44362 transparent transparent;
  border-radius: 0 12px 12px 0;
}

.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 105px 140px 0 140px;
  border-color: #f25577 transparent transparent transparent;
  transform-origin: top center;
  transition: transform 0.6s var(--ease-spring);
  z-index: 4;
}

.wax-seal {
  position: absolute;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 35%, #ffd166, #c79524 60%, #87610f 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  z-index: 5;
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.seal-letter {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #5c3e03;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Envelope Opening Animation State */
.envelope-wrapper.opening .envelope-top-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrapper.opening .wax-seal {
  transform: translateX(-50%) scale(0);
  opacity: 0;
}

.envelope-wrapper.opening .envelope-letter-peek {
  transform: translateY(-80px) scale(1.05);
}

.intro-caption {
  margin-top: 10px;
}

.intro-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-pure);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(255, 77, 109, 0.3);
}

.intro-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-open-envelope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-rose), #e61f4c);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 77, 109, 0.45);
  transition: all 0.3s var(--ease-spring);
}

.btn-open-envelope:active {
  transform: scale(0.95);
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
}

.btn-heart {
  font-size: 1.2rem;
  animation: heartThrob 1.4s infinite ease-in-out;
}

@keyframes heartThrob {

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

  50% {
    transform: scale(1.25);
  }
}

/* ==========================================================================
   SCREEN 2: MAIN ROMANTIC JOURNEY
   ========================================================================== */
#mainExperience {
  flex-direction: column;
  padding: 0 0 60px 0;
  background: linear-gradient(180deg, #090310 0%, #150824 30%, #1b092f 60%, #0a0312 100%);
}

/* Hero Section */
.romantic-hero {
  padding: 50px 20px 30px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.beloved-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.tag-sparkle {
  color: var(--accent-rose-light);
}

.main-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-pure);
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(255, 77, 109, 0.25);
}

.highlight-name {
  font-family: var(--font-handwriting);
  font-size: 3.4rem;
  font-weight: 400;
  background: linear-gradient(135deg, #ff8fa3, #ffd166);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1.1;
  padding-top: 5px;
}

/* Belated Birthday Special Tribute Box */
.belated-tribute-box {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: var(--glass-glow);
  margin-top: 10px;
}

.quote-symbol {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-gold);
  opacity: 0.5;
  margin-bottom: -15px;
}

.tribute-text {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.tribute-text strong {
  color: var(--text-gold);
  font-weight: 600;
}

.tribute-stars {
  margin-top: 14px;
  font-size: 0.95rem;
  letter-spacing: 6px;
  opacity: 0.8;
}

/* Section Common Styles */
.experience-section {
  padding: 40px 18px;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.section-badge {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-rose-light);
  text-align: center;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   CHAPTER 1: INTERACTIVE BIRTHDAY CAKE & WISH
   ========================================================================== */
.cake-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--glass-glow);
  text-align: center;
}

.cake-image-container {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cake-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  transition: transform 0.5s ease;
}

/* Interactive Candle Flame */
.interactive-candle {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 90px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.candle-glow {
  position: absolute;
  top: 15px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 180, 0, 0.8) 0%, rgba(255, 77, 109, 0.4) 45%, transparent 70%);
  border-radius: 50%;
  animation: candleGlowPulse 1.8s infinite alternate ease-in-out;
}

.flame-body {
  position: absolute;
  top: 22px;
  width: 16px;
  height: 28px;
  background: linear-gradient(to top, #ff3c00, #ffb703 60%, #ffffff 100%);
  border-radius: 50% 50% 25% 25% / 60% 60% 35% 35%;
  box-shadow: 0 0 16px #ffb703, 0 0 30px #ff7700;
  animation: flameFlicker 0.12s infinite alternate ease-in-out;
  transform-origin: center bottom;
}

.flame-core {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  filter: blur(1px);
}

@keyframes flameFlicker {
  0% {
    transform: scale(1) rotate(-1.5deg);
  }

  50% {
    transform: scale(1.06, 0.96) rotate(1.5deg);
  }

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

@keyframes candleGlowPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.75;
  }

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

/* Smoke puff when blown out */
.smoke-particle {
  position: absolute;
  top: 20px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}

.candle-blown .flame-body,
.candle-blown .candle-glow {
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.candle-blown .smoke-particle {
  animation: smokeRise 1.6s forwards ease-out;
}

@keyframes smokeRise {
  0% {
    opacity: 0.8;
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0.5;
    transform: translateY(-30px) scale(2.2);
  }

  100% {
    opacity: 0;
    transform: translateY(-60px) scale(3.5);
  }
}

.wish-status {
  padding: 16px 10px 8px;
}

.wish-instruction {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.1);
  border: 1px dashed rgba(255, 209, 102, 0.4);
  padding: 8px 18px;
  border-radius: 999px;
  animation: pulseHint 2s infinite ease-in-out;
}

@keyframes pulseHint {

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

  50% {
    transform: scale(1.03);
  }
}

.wish-revealed {
  margin-top: 14px;
  padding: 20px 16px;
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.15), rgba(255, 209, 102, 0.15));
  border: 1px solid var(--accent-gold);
  border-radius: 16px;
  animation: revealFadeUp 0.8s var(--ease-spring);
}

.wish-revealed.hidden {
  display: none;
}

.wish-sparkles {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.wish-revealed h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.wish-revealed p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

@keyframes revealFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

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

/* ==========================================================================
   CHAPTER 2: "WHY I LOVE YOU" CARDS (INTERACTIVE JAR)
   ========================================================================== */
.cards-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.love-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.love-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.35s var(--ease-spring);
  overflow: hidden;
}

.love-card:active {
  transform: scale(0.98);
}

.love-card.revealed {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.18), rgba(41, 15, 66, 0.7));
  border-color: rgba(255, 117, 143, 0.5);
  box-shadow: 0 8px 24px rgba(255, 77, 109, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 77, 109, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-pure);
}

.card-hint {
  font-size: 0.8rem;
  color: var(--accent-rose-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-body {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s var(--ease-smooth), opacity 0.35s ease, margin-top 0.3s ease;
  overflow: hidden;
}

.love-card.revealed .card-body {
  max-height: 180px;
  opacity: 1;
  margin-top: 14px;
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 12px;
}

/* ==========================================================================
   CHAPTER 3: MEMORY POLAROID CAROUSEL
   ========================================================================== */
.polaroids-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 8px 30px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.polaroids-carousel::-webkit-scrollbar {
  display: none;
}

.polaroid-card {
  position: relative;
  flex: 0 0 280px;
  scroll-snap-align: center;
  background: #fdfbf7;
  border-radius: 12px;
  padding: 14px 14px 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 117, 143, 0.15);
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease;
}

.polaroid-card:nth-child(even) {
  transform: rotate(1.5deg);
}

.polaroid-card:hover,
.polaroid-card:active {
  transform: scale(1.02) rotate(0deg);
}

/* Tape at top of polaroids */
.washi-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: rgba(255, 220, 180, 0.85);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0% 100%);
  z-index: 5;
}

.washi-tape.tape-gold {
  background: rgba(255, 209, 102, 0.85);
}

.washi-tape.tape-rose {
  background: rgba(255, 180, 200, 0.85);
}

.polaroid-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: #2a1538;
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  margin-top: 14px;
  text-align: center;
}

.caption-handwritten {
  font-family: var(--font-handwriting);
  font-size: 1.85rem;
  color: #3b1b2f;
  line-height: 1.2;
}

.caption-sub {
  display: block;
  font-size: 0.78rem;
  color: #7b596e;
  margin-top: 4px;
  line-height: 1.4;
}

.swipe-indicator {
  text-align: center;
  font-size: 0.82rem;
  color: var(--accent-rose-light);
  letter-spacing: 1px;
  margin-top: -10px;
  animation: pulseSubtle 2.5s infinite ease-in-out;
}

@keyframes pulseSubtle {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ==========================================================================
   CHAPTER 4: THE HANDWRITTEN LOVE LETTER
   ========================================================================== */
.parchment-letter {
  position: relative;
  background: radial-gradient(circle at 10% 10%, #fffbf2 0%, #faede1 100%);
  color: #2b111e;
  border-radius: 20px;
  padding: 36px 24px 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 209, 102, 0.2);
  border: 1px solid rgba(255, 215, 140, 0.6);
}

.letter-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px dashed #b84a62;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  transform: rotate(4deg);
}

.stamp-heart {
  font-size: 1.2rem;
}

.stamp-date {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #b84a62;
  letter-spacing: 1px;
}

.letter-content {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #381928;
}

.letter-salutation {
  font-family: var(--font-handwriting);
  font-size: 2.3rem;
  color: #9e1f40;
  margin-bottom: 14px;
}

.letter-content p {
  margin-bottom: 16px;
}

.letter-closing {
  margin-top: 24px;
  font-size: 1.02rem;
}

.letter-signature {
  display: inline-block;
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  color: #9e1f40;
  margin-top: 6px;
}

/* ==========================================================================
   CHAPTER 5: VIRTUAL HUG INTERACTIVE BUTTON
   ========================================================================== */
.hug-interactive-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 15px auto;
}

.hug-progress-ring {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: url(#hugGradient);
  stroke: var(--accent-rose);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 452.39;
  stroke-dashoffset: 452.39;
  transition: stroke-dashoffset 0.05s linear;
}

.hug-heart-btn {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff5c7a, #cf1b45 75%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.5), inset 0 3px 6px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-user-select: none;
}

.hug-heart-btn:active,
.hug-heart-btn.holding {
  transform: scale(0.92);
}

.heart-pulse-icon {
  font-size: 3rem;
  animation: heartPulseFast 1.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes heartPulseFast {

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

  50% {
    transform: scale(1.15);
  }
}

.hug-caption {
  margin-top: 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 6px 18px;
  border-radius: 999px;
}

/* Hug Modal Overlay */
.hug-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 3, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  animation: fadeIn 0.4s ease;
}

.hug-modal.hidden {
  display: none;
}

.hug-modal-card {
  background: linear-gradient(135deg, #240a33, #3a0d42);
  border: 1px solid var(--accent-rose-light);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 77, 109, 0.4);
  animation: scaleUp 0.4s var(--ease-spring);
}

.hug-modal-emoji {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.hug-modal-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-pure);
  margin-bottom: 12px;
}

.hug-modal-card p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.btn-close-modal {
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--accent-rose), #e61f4c);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 77, 109, 0.4);
}

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

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.romantic-footer {
  text-align: center;
  padding: 40px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 20px;
}

.footer-heart {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  color: var(--accent-rose-light);
  line-height: 1.2;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   HEART CONFETTI BURST ELEMENT
   ========================================================================== */
.floating-burst-heart {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  user-select: none;
  animation: floatBurst 1.8s forwards ease-out;
}

@keyframes floatBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }

  50% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(1.4) rotate(var(--rot));
  }
}