/* ========================================================
   Happy Birthday Experience - Stylesheet
   Replicating the Reel's Exact Animations & Aesthetics
   ======================================================== */

:root {
  --bg-blush-start: #fff1f2;
  --bg-blush-mid: #fde2e4;
  --bg-blush-end: #fbcfe8;
  --bg-parchment: #faf6f0;
  --text-dark: #4a2832;
  --text-primary: #5c2734;
  --text-secondary: #8c5a67;
  --text-muted: #b08993;
  --primary-rose: #df607d;
  --primary-rose-dark: #b83d5a;
  --primary-rose-light: #f7a8b8;
  --accent-gold: #e2b36e;
  --card-bg: rgba(255, 255, 255, 0.94);
  --shadow-soft: 0 10px 30px rgba(184, 61, 90, 0.12);
  --shadow-key: 0 6px 16px rgba(140, 90, 103, 0.12), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  --font-script: 'Great Vibes', cursive;
  --font-cursive: 'Dancing Script', cursive;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-roman: 'Cinzel', serif;
  --font-rounded: 'Quicksand', sans-serif;
  --font-casual: 'Caveat', cursive;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #f4ece4;
  font-family: var(--font-rounded);
  color: var(--text-dark);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Global Canvas for Confetti & Particles */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ========================================================
   Floating Controls (Music & Photo Manager)
   ======================================================== */
.audio-control {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
  box-shadow: 0 4px 18px rgba(184, 61, 90, 0.18);
  cursor: pointer;
  border: 1px solid rgba(223, 96, 125, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.audio-control:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 61, 90, 0.22);
}

.disc-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff85a1, #e05275);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(224, 82, 117, 0.4);
  transition: transform 0.5s linear;
}

.audio-control.playing .disc-icon {
  animation: spin 3s linear infinite;
}

.audio-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-rose-dark);
  letter-spacing: 0.5px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================================
   Main Viewport Container
   Full Screen Responsive across all devices (Phones, Tablets & Desktops)
   ======================================================== */
.app-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  max-height: 100%;
  background: var(--bg-parchment);
  overflow: hidden;
  box-shadow: none;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
}

/* ========================================================
   100s of Individually Controlled HD Rotating Flowers Stage
   ======================================================== */
.multi-flower-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  pointer-events: none;
  overflow: hidden;
}

.flower-slot {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}

.flower-slot.part-left {
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1) !important;
  transform: translate(-150vw, var(--drift-y, 0px)) !important;
}

.flower-slot.part-right {
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1) !important;
  transform: translate(150vw, var(--drift-y, 0px)) !important;
}

.flower-slot.fade-out {
  transition: opacity 0.8s ease, transform 0.8s ease !important;
  opacity: 0 !important;
  transform: scale(0.6) !important;
}

.flower-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Individually controlled rotating directions (both clockwise and counter-clockwise) */
.flower-img.spin-cw {
  animation: spin-cw linear infinite;
}

.flower-img.spin-ccw {
  animation: spin-ccw linear infinite;
}

@keyframes spin-cw {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-ccw {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

/* ========================================================
   3. Fire Shockwave Burst Animation
   ======================================================== */
.fire-burst-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 120;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fire-burst-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.fire-ring {
  width: 100%;
  height: 100%;
  background-image: url('assets/reel_fire_38.jpg');
  background-size: cover;
  background-position: center;
  clip-path: circle(0% at 50% 50%);
  transform: scale(0.95);
  transition: clip-path 1.4s cubic-bezier(0.22, 1, 0.36, 1), transform 1.4s ease;
  will-change: clip-path, transform;
}

.fire-burst-overlay.bursting .fire-ring {
  clip-path: circle(160% at 50% 50%);
  transform: scale(1.05);
}

/* ========================================================
   Standalone Screens (Screen 1 & Screen 2)
   ======================================================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  padding: 30px 24px;
  z-index: 10;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 20;
}

.screen-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Navigation Buttons (Prev & Next) - Slightly highlighted for clear contrast */
.nav-btn {
  position: absolute;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(223, 96, 125, 0.45);
  box-shadow: 0 4px 16px rgba(184, 61, 90, 0.18), 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #b83d5a;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(184, 61, 90, 0.2));
}

.nav-btn:hover {
  transform: scale(1.1);
  background: #fff;
  border-color: var(--primary-rose);
  box-shadow: 0 6px 22px rgba(223, 96, 125, 0.32);
}

.prev-btn {
  top: 24px;
  left: 24px;
}

.next-btn {
  bottom: 30px;
  right: 28px;
  animation: floatBounce 2.5s ease-in-out infinite;
}

.next-btn.hidden {
  display: none !important;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ========================================================
   Screen 1: Cover ("Touch the blossom")
   ======================================================== */
#screen1 {
  background: linear-gradient(135deg, var(--bg-blush-start) 0%, var(--bg-blush-mid) 45%, var(--bg-blush-end) 100%);
}

.blossom-prompt {
  font-family: var(--font-script);
  font-size: clamp(38px, 9vw, 54px);
  color: #a86475;
  font-weight: 400;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.corner-blossom {
  position: absolute;
  top: 36px;
  right: 36px;
  width: 72px;
  height: 72px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.corner-blossom:hover {
  transform: scale(1.15) rotate(15deg);
}

/* Cherry blossom graphic */
.blossom-graphic {
  width: 64px;
  height: 64px;
  background-image: url('assets/blossom_clean.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(223, 96, 125, 0.35));
  animation: blossomFloat 4s ease-in-out infinite;
}

.blossom-graphic.small {
  width: 52px;
  height: 52px;
}

.blossom-graphic.large {
  width: 90px;
  height: 90px;
}

.blossom-glow {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 182, 193, 0.6) 0%, rgba(255, 182, 193, 0) 70%);
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes blossomFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

/* Blossom glide trajectory down to bottom-left corner */
.corner-blossom.gliding {
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  transform: translate(-300px, 600px) scale(1.3) rotate(180deg);
}

/* ========================================================
   Screen 2: Passcode Entry Screen
   ======================================================== */
.passcode-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.top-blossom {
  margin-bottom: 8px;
}

.passcode-title {
  font-family: var(--font-script);
  font-size: clamp(34px, 8vw, 46px);
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 2px;
}

.passcode-subtitle {
  font-family: var(--font-cursive);
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* PIN Dots */
.pin-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #d4a5b0;
  background: transparent;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dot.filled {
  background: var(--primary-rose);
  border-color: var(--primary-rose);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(223, 96, 125, 0.5);
}

/* Keypad */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
  width: 250px;
  max-width: 80%;
}

.key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 500;
  box-shadow: var(--shadow-key);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.key:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(140, 90, 103, 0.2), inset 0 2px 4px rgba(0,0,0,0.06);
  background: #fdf5f6;
}

.key-spacer {
  visibility: hidden;
}

.key-backspace {
  font-size: 20px;
  color: var(--text-secondary);
}

/* Unlocked Central Blossom */
.unlocked-blossom-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.6s ease forwards;
}

.unlocked-blossom-container.visible {
  display: flex;
}

.center-blossom {
  position: relative;
  cursor: pointer;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.center-blossom:hover {
  transform: scale(1.1);
}

.blossom-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(223, 96, 125, 0.3);
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.touch-prompt {
  font-family: var(--font-rounded);
  font-size: 13px;
  letter-spacing: 4px;
  color: #a8727d;
  font-weight: 600;
  text-transform: uppercase;
}

/* ========================================================
   Horizontal Carousel Book Slider (Screens 3 to 8)
   Allows the reel's authentic side-by-side sliding transitions
   ======================================================== */
.book-slider-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  z-index: 30;
  transition: opacity 0.5s ease;
}

.book-slider-container.active {
  opacity: 1;
  visibility: visible;
}

.book-slider-track {
  display: flex;
  width: 600%; /* 6 slides: Card, Flame, Cake, Memories, Lamp, Envelope */
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.book-slide {
  width: 16.6666%; /* 1/6th */
  height: 100%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 24px;
  background: var(--bg-parchment);
}

/* ========================================================
   Slide 0 (Screen 3): Greeting Card ("Hey Ishi,")
   ======================================================== */
.card-content {
  max-width: min(520px, 92vw);
  max-height: 84vh;
  max-height: 84dvh;
  overflow-y: auto;
  padding: 12px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.card-content::-webkit-scrollbar {
  width: 5px;
}

.card-content::-webkit-scrollbar-track {
  background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
  background: rgba(223, 96, 125, 0.25);
  border-radius: 4px;
}

.cake-illustration {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.cake-illustration img {
  width: 82px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(184, 61, 90, 0.15));
  animation: gentleBounce 3s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.card-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
}

.card-greeting {
  font-family: var(--font-rounded);
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.card-paragraph {
  font-family: var(--font-rounded);
  font-size: clamp(15px, 3.8vw, 17px);
  color: var(--text-dark);
  line-height: 1.58;
  font-weight: 400;
  margin: 0;
}

.card-signoff {
  font-family: var(--font-rounded);
  font-size: clamp(18px, 4.4vw, 21px);
  font-weight: 700;
  color: #b83d5a;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ========================================================
   Slide 1 (Screen 4): Flame / Light the Candle
   ======================================================== */
.flame-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flame-dish-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 40%, #f7ece8 100%);
  box-shadow: 0 14px 35px rgba(212, 107, 75, 0.18), inset 0 3px 6px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flame-dish-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 18px 45px rgba(212, 107, 75, 0.28);
}

.flame-element {
  font-size: 46px;
  filter: drop-shadow(0 0 12px rgba(255, 120, 40, 0.6));
  animation: flameFlicker 1.8s ease-in-out infinite alternate;
}

.flame-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 50, 0.25) 0%, transparent 70%);
  animation: flamePulse 2s infinite ease-in-out;
}

.flame-hint {
  margin-top: 30px;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(0.96) rotate(-1deg); }
}

@keyframes flamePulse {
  0%, 100% { transform: scale(0.9); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ========================================================
   Slide 2 (Screen 5): Cake Cutting Screen
   ======================================================== */
.cake-screen-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cake-header {
  margin-bottom: 24px;
}

.cake-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 6.5vw, 36px);
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.cake-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.cake-interactive-area {
  position: relative;
  width: 320px;
  height: 320px;
  max-width: 90vw;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
}

.pixel-cake-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cake-half {
  position: absolute;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cake-half-left {
  left: 0;
}

.cake-half-right {
  right: 0;
}

.cake-half-left .cake-img {
  width: 260px;
  max-width: none;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.cake-half-right .cake-img {
  width: 260px;
  max-width: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Cut animation states: splits left & right */
.pixel-cake-wrapper.cut .cake-half-left {
  transform: translateX(-18px) rotate(-3deg);
}

.pixel-cake-wrapper.cut .cake-half-right {
  transform: translateX(18px) rotate(3deg);
}

.slice-laser-line {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4070, #ffb3c6, #ff4070, transparent);
  box-shadow: 0 0 12px #ff4070;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s;
}

#cakeSliceCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 20;
}

/* ========================================================
   Slide 3 (Screen 6): Beautiful Memories (Swipeable Photo Deck)
   ======================================================== */
.memories-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.memories-header {
  margin-bottom: 24px;
}

.memories-title {
  font-family: var(--font-roman);
  font-size: clamp(22px, 6vw, 30px);
  color: var(--text-primary);
  letter-spacing: 3px;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.memories-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--primary-rose), transparent);
}

.memories-subtitle {
  font-family: var(--font-cursive);
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.card-deck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.card-deck {
  position: relative;
  width: min(340px, 86vw);
  height: min(440px, 58vh);
  perspective: 1000px;
}

.memory-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(92, 39, 52, 0.16), 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1.5px solid rgba(223, 96, 125, 0.22);
  cursor: grab;
  touch-action: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  transform-origin: 50% 100%;
  display: flex;
  flex-direction: column;
}

.memory-card:active {
  cursor: grabbing;
}

/* Dedicated Photo Wrap: 100% visible, zero crop, with rich ambient back-glow */
.card-media-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #180e13;
}

.card-ambient-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.65) saturate(1.25);
  opacity: 0.75;
  transform: scale(1.15);
  pointer-events: none;
}

.card-photo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Absolutely guaranteed ZERO cutting of any photo! */
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3));
}

/* Dedicated Caption Bar: Positioned below photo, NEVER covers or cuts any part of the image */
.memory-card .card-caption {
  position: relative;
  z-index: 3;
  width: 100%;
  background: #ffffff;
  padding: 12px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  border-top: 1px solid rgba(223, 96, 125, 0.14);
  flex-shrink: 0;
  max-height: 85px;
  overflow-y: auto;
}

.caption-text {
  font-family: var(--font-cursive);
  font-size: 16px;
  color: #4a2c35;
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
}

.card-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.deck-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(223, 96, 125, 0.45);
  background: #ffffff;
  color: #b83d5a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(184, 61, 90, 0.16);
  transition: all 0.2s;
}

.deck-nav-btn:hover {
  background: var(--primary-rose);
  color: #fff;
  transform: scale(1.08);
}

.card-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ========================================================
   Slide 4 (Screen 7): Hanging Lamp / Pull Cord Screen
   ======================================================== */
.lamp-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 40px;
}

.hanging-lantern-assembly {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 0;
}

.ceiling-mount {
  width: 40px;
  height: 8px;
  background: #b58d98;
  border-radius: 0 0 4px 4px;
}

.ceiling-wire {
  width: 2px;
  height: 60px;
  background: #b58d98;
}

.lantern-sphere {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffdbe4 60%, #fbaabf 100%);
  box-shadow: 0 10px 30px rgba(223, 96, 125, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.lantern-sphere.lit {
  box-shadow: 0 0 60px rgba(255, 200, 100, 0.9), 0 0 100px rgba(255, 180, 200, 0.7);
  background: radial-gradient(circle at 35% 35%, #fffdf0 0%, #ffe3a8 60%, #ffb6c1 100%);
}

.lantern-face {
  position: relative;
  width: 70px;
  height: 40px;
}

.lantern-face .eye {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #5c2734;
  border-radius: 50%;
  top: 10px;
}

.lantern-face .eye.left { left: 14px; }
.lantern-face .eye.right { right: 14px; }

.lantern-face .cheek {
  position: absolute;
  width: 14px;
  height: 7px;
  background: rgba(255, 105, 135, 0.4);
  border-radius: 50%;
  top: 18px;
}

.lantern-face .cheek.left { left: 8px; }
.lantern-face .cheek.right { right: 8px; }

.lantern-face .smile {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  border-bottom: 2.5px solid #5c2734;
  border-radius: 0 0 10px 10px;
}

/* Pull cord */
.pull-cord-chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  touch-action: none;
  padding: 6px 20px;
  transition: transform 0.1s ease-out;
}

.pull-cord-chain:active {
  cursor: grabbing;
}

.cord-beads {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bead {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b58d98;
}

.cord-handle-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a86b77;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  animation: knobSwing 3s ease-in-out infinite;
}

.knob-ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #faf6f0;
}

@keyframes knobSwing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(4deg); }
  75% { transform: rotate(-4deg); }
}

.lamp-prompt {
  font-family: var(--font-rounded);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

/* ========================================================
   Slide 5 (Screen 8): Envelope & Wax Seal
   ======================================================== */
.envelope-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.envelope-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 7vw, 36px);
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.envelope-subtitle {
  font-family: var(--font-cursive);
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.interactive-envelope {
  position: relative;
  width: 290px;
  cursor: pointer;
  perspective: 800px;
  transition: transform 0.3s ease;
}

.interactive-envelope:hover {
  transform: scale(1.04);
}

.envelope-wrapper {
  position: relative;
  width: 280px;
  height: 180px;
  background: #fce4ec;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(184, 61, 90, 0.2);
  margin: 0 auto;
}

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

.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 8px;
  z-index: 3;
}

.envelope-pocket::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f48fb1;
  clip-path: polygon(0 100%, 50% 45%, 100% 100%);
}

.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f8bbd0;
  clip-path: polygon(0 0, 100% 0, 50% 55%);
  border-radius: 8px 8px 0 0;
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
}

.envelope-letter-paper {
  position: absolute;
  top: 15px;
  left: 20px;
  width: 240px;
  height: 150px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paper-line {
  height: 6px;
  background: #f3d7de;
  border-radius: 3px;
  width: 80%;
}

.paper-line.short {
  width: 50%;
}

/* Wax Seal */
.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -15%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e91e63, #c2185b);
  box-shadow: 0 4px 12px rgba(194, 24, 91, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 5;
  transition: all 0.3s;
}

.seal-sparkle {
  font-size: 20px;
  filter: drop-shadow(0 0 4px #fff);
}

/* Opened state */
.interactive-envelope.opened .envelope-top-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.interactive-envelope.opened .wax-seal {
  opacity: 0;
  transform: translate(-50%, -15%) scale(0);
}

.interactive-envelope.opened .envelope-letter-paper {
  transform: translateY(-70px);
}

.envelope-divider {
  margin-top: 36px;
  color: var(--primary-rose-light);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.envelope-divider::before, .envelope-divider::after {
  content: '';
  width: 50px;
  height: 1px;
  background: var(--primary-rose-light);
}

/* ========================================================
   Birthday Letter Modal (Screen 10)
   ======================================================== */
.letter-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(45, 20, 28, 0.45);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  padding: 20px;
}

.letter-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.letter-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
  padding: 36px 30px 28px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(223, 96, 125, 0.15);
}

.letter-modal-backdrop.open .letter-modal-card {
  transform: translateY(0) scale(1);
}

/* Decorative Corner Brackets */
.corner {
  position: absolute;
  font-size: 20px;
  color: #d8b4bc;
  line-height: 1;
  pointer-events: none;
}

.corner.top-left { top: 12px; left: 14px; }
.corner.top-right { top: 12px; right: 14px; }
.corner.bottom-left { bottom: 12px; left: 14px; }
.corner.bottom-right { bottom: 12px; right: 14px; }

.close-letter-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: #b08993;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.close-letter-btn:hover {
  color: var(--primary-rose-dark);
}

.letter-header {
  text-align: center;
  margin-bottom: 20px;
}

.letter-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6vw, 32px);
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.letter-subtitle {
  font-family: var(--font-cursive);
  font-size: 16px;
  color: var(--text-secondary);
}

.letter-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 14px 4px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 450;
  text-align: left;
  border-radius: 6px;
}

.letter-scroll-body::-webkit-scrollbar {
  width: 6px;
}

.letter-scroll-body::-webkit-scrollbar-track {
  background: #f7eded;
  border-radius: 3px;
}

.letter-scroll-body::-webkit-scrollbar-thumb {
  background: #d49da8;
  border-radius: 3px;
}

.typewriter-cursor {
  display: inline-block;
  color: var(--primary-rose);
  font-weight: bold;
  animation: blink 0.8s infinite;
}

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

.letter-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.action-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-rounded);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn:hover {
  transform: translateY(-2px);
}

.replay-btn {
  background: #f4ecee;
  color: var(--text-primary);
}

.heart-btn {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 117, 140, 0.4);
}

/* ========================================================
   Fullscreen Photo Lightbox Modal (Zero-crop high-res viewer)
   ======================================================== */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 16px;
  box-sizing: border-box;
}

.photo-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 10, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox-container {
  position: relative;
  z-index: 2;
  max-width: 94vw;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-lightbox.active .lightbox-container {
  transform: scale(1);
}

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

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

.lightbox-media {
  max-width: 92vw;
  max-height: 76vh;
  max-height: 76dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lightbox-media img {
  max-width: 100%;
  max-height: 76vh;
  max-height: 76dvh;
  width: auto;
  height: auto;
  object-fit: contain; /* Absolutely zero pixels cut */
  display: block;
}

.lightbox-caption {
  margin-top: 14px;
  color: #ffffff;
  font-family: var(--font-cursive);
  font-size: clamp(16px, 4vw, 20px);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  max-width: 80vw;
}
