/* ========================================================
   LUXURY ROMANTIC MOBILE-FIRST STYLESHEET
   Project: Happy 23rd Birthday Toty ❤️
   Theme: Midnight Velvet & Rose Champagne Glow
   ======================================================== */

:root {
  --bg-gradient: radial-gradient(circle at 50% 20%, #260c38 0%, #11051c 60%, #08020d 100%);
  --primary-rose: #ff2a6d;
  --primary-glow: rgba(255, 42, 109, 0.45);
  --soft-pink: #ff758f;
  --accent-gold: #ffbe0b;
  --gold-glow: rgba(255, 190, 11, 0.35);
  --velvet-card: rgba(26, 11, 40, 0.72);
  --card-border: rgba(255, 117, 143, 0.22);
  --card-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 42, 109, 0.12);
  --text-main: #fff5f8;
  --text-sub: #f3c5d6;
  --text-muted: #c99fb1;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: 'Alexandria', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
}

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

html, body {
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #09020e;
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Canvas background layers */
#ambient-canvas,
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

#confetti-canvas {
  z-index: 99;
}

/* Floating Music Control Button */
.floating-music-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(30, 10, 45, 0.85);
  border: 1px solid rgba(255, 117, 143, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
}

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

.floating-music-btn.playing {
  background: rgba(255, 42, 109, 0.35);
  border-color: var(--primary-rose);
  box-shadow: 0 0 16px var(--primary-glow);
}

.floating-music-btn.playing .music-icon {
  animation: rotateMusic 2.5s linear infinite;
}

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

/* Main App Wrapper */
.app-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px; /* Optimal Mobile Max Width */
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px 16px var(--safe-bottom) 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Stage Sections Transitions */
.stage-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100dvh - 40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stage-section.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.stage-section.active {
  display: flex;
  opacity: 1;
}

/* Glassmorphism Cards */
.glass-card {
  width: 100%;
  background: var(--velvet-card);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* Decorative Badges & Tags */
.avatar-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 42, 109, 0.35) 0%, rgba(255, 42, 109, 0.05) 70%);
  border: 2px solid rgba(255, 117, 143, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 0 25px var(--primary-glow);
}

.heart-pulse {
  animation: heartPulseAnim 1.4s ease infinite;
}

@keyframes heartPulseAnim {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.ring-pulse {
  animation: ringFloat 2s ease-in-out infinite alternate;
}

@keyframes ringFloat {
  0% { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-6px) rotate(5deg); }
}

.tag-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 117, 143, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.3);
  font-size: 13px;
  font-weight: 700;
  color: var(--soft-pink);
  margin-bottom: 14px;
  letter-spacing: normal;
}

/* Typography */
.question-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 12px;
}

.highlight-text {
  background: linear-gradient(135deg, #ff758f, #ff2a6d, #ffd166);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.question-subtitle {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Buttons Playground (Stage 1) */
.buttons-playground {
  position: relative;
  width: 100%;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  border: none;
  background: linear-gradient(135deg, #ff2a6d 0%, #d81159 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}

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

.glow-pulse {
  animation: glowPulseAnim 2s infinite alternate;
}

@keyframes glowPulseAnim {
  0% { box-shadow: 0 6px 20px rgba(255, 42, 109, 0.4); }
  100% { box-shadow: 0 10px 32px rgba(255, 42, 109, 0.7), 0 0 15px #ffd166; }
}

/* Runaway "No" Button (Stage 1) */
.runaway-btn {
  min-height: 50px;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, opacity 0.2s ease;
  will-change: transform;
  z-index: 50;
}

.runaway-btn.escaped {
  position: fixed !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 42, 109, 0.4);
  background: rgba(45, 15, 60, 0.95);
  border-color: var(--primary-rose);
  color: #fff;
  z-index: 9999;
}

.playful-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ================= STAGE 2: DATE SELECTORS ================= */
.date-card .section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.date-card .sub-q {
  font-size: 16px;
  color: var(--soft-pink);
}

.date-card .big-q {
  font-size: 23px;
  margin-bottom: 8px;
}

.date-pickers-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 20px 0 10px 0;
}

.picker-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.picker-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  padding-right: 4px;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  width: 100%;
  min-height: 52px;
  padding: 12px 10px;
  padding-left: 24px;
  border-radius: var(--radius-md);
  background: rgba(40, 15, 60, 0.85);
  border: 1px solid rgba(255, 117, 143, 0.3);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

.custom-select:focus {
  border-color: var(--primary-rose);
  box-shadow: 0 0 12px var(--primary-glow);
}

.custom-select option {
  background: #190827;
  color: #fff;
  padding: 10px;
}

.select-arrow {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--soft-pink);
  pointer-events: none;
}

.feedback-box {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  animation: shake 0.45s ease;
}

.feedback-box.error {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.feedback-box.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ================= STAGE 3: CELEBRATION ================= */
.celebration-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 16px;
}

.celebration-header {
  padding: 30px 18px 24px 18px;
  text-align: center;
}

.crown-badge {
  font-size: 46px;
  margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(255, 190, 11, 0.5));
}

.age-badge-pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 190, 11, 0.25), rgba(255, 42, 109, 0.35));
  border: 1px solid var(--accent-gold);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 0 16px var(--gold-glow);
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  from { box-shadow: 0 0 10px rgba(255, 190, 11, 0.3); }
  to { box-shadow: 0 0 20px rgba(255, 190, 11, 0.7); }
}

.birthday-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
}

.name-highlight {
  font-size: 38px;
  background: linear-gradient(135deg, #ffd166 0%, #ff758f 50%, #ff2a6d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(255, 42, 109, 0.4));
}

.birthday-birthdate {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.birthday-subtitle {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ================= MUSIC PLAYER CARD ================= */
.music-player-card {
  padding: 22px 18px;
  background: linear-gradient(145deg, rgba(42, 14, 60, 0.85), rgba(22, 7, 34, 0.95));
  border: 1px solid rgba(255, 117, 143, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 18px var(--primary-glow);
}

.player-top {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  margin-bottom: 14px;
}

.music-note-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 42, 109, 0.25);
  border: 1px solid var(--primary-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.track-info {
  flex: 1;
  overflow: hidden;
}

.track-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
}

.track-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Soundwave Visualizer */
.soundwave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  margin-bottom: 16px;
}

.soundwave-container .bar {
  width: 4px;
  height: 6px;
  border-radius: 999px;
  background: var(--soft-pink);
  transition: height 0.2s ease;
}

.soundwave-container.playing .bar {
  animation: soundwaveAnim 1.2s infinite ease-in-out;
}

.soundwave-container.playing .bar:nth-child(1) { animation-delay: 0.1s; }
.soundwave-container.playing .bar:nth-child(2) { animation-delay: 0.3s; }
.soundwave-container.playing .bar:nth-child(3) { animation-delay: 0.5s; }
.soundwave-container.playing .bar:nth-child(4) { animation-delay: 0.2s; }
.soundwave-container.playing .bar:nth-child(5) { animation-delay: 0.4s; }
.soundwave-container.playing .bar:nth-child(6) { animation-delay: 0.6s; }
.soundwave-container.playing .bar:nth-child(7) { animation-delay: 0.3s; }
.soundwave-container.playing .bar:nth-child(8) { animation-delay: 0.15s; }

@keyframes soundwaveAnim {
  0%, 100% { height: 6px; }
  50% { height: 26px; background: var(--accent-gold); }
}

/* Audio Timeline & Seek Slider */
.audio-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  padding: 0 4px;
}

.time-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--soft-pink);
  min-width: 34px;
  text-align: center;
}

.seek-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.custom-seek-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  accent-color: var(--primary-rose);
  -webkit-appearance: none;
  appearance: none;
}

.custom-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary-rose);
  box-shadow: 0 0 10px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-seek-bar:active::-webkit-slider-thumb {
  transform: scale(1.2);
}

.custom-seek-bar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary-rose);
  box-shadow: 0 0 10px var(--primary-glow);
  cursor: pointer;
}

/* Player Controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.player-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 117, 143, 0.25);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.player-btn.seek-btn {
  width: auto;
  min-width: 50px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  background: rgba(45, 15, 60, 0.8);
  border-color: rgba(255, 117, 143, 0.4);
  color: var(--soft-pink);
}

.player-btn:active {
  transform: scale(0.92);
  background: rgba(255, 42, 109, 0.3);
}

.player-btn-main {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2a6d, #d81159);
  border: none;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}

.player-btn-main:active {
  transform: scale(0.92);
}

/* Playlist Quick Pills */
.playlist-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.playlist-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 117, 143, 0.2);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.playlist-pill:active {
  transform: scale(0.94);
}

.playlist-pill.active {
  background: rgba(255, 42, 109, 0.35);
  border-color: var(--primary-rose);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Relationship Live Counter Milestone */
.counter-card {
  padding: 22px 18px;
  background: linear-gradient(145deg, rgba(35, 12, 52, 0.8), rgba(20, 7, 32, 0.9));
  border: 1px solid rgba(255, 190, 11, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--gold-glow);
}

.counter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.counter-header h4 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent-gold);
}

.counter-caption {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.timer-box {
  background: rgba(15, 4, 25, 0.65);
  border: 1px solid rgba(255, 117, 143, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 10px var(--primary-glow);
}

.timer-label {
  font-size: 12px;
  color: var(--soft-pink);
  margin-top: 4px;
}

.timer-footer {
  font-size: 13px;
  color: var(--text-muted);
}

/* Photo Gallery Carousel (17 Photos) */
.gallery-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading {
  text-align: center;
}

.heading-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 42, 109, 0.15);
  border-radius: 999px;
  border: 1px solid rgba(255, 42, 109, 0.3);
  font-size: 12px;
  font-weight: 700;
  color: var(--soft-pink);
  margin-bottom: 6px;
}

.section-heading .section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Carousel Layout */
.carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 12px 10px;
  scrollbar-width: none;
  width: 100%;
}

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

/* Polaroid Card Item */
.polaroid-card {
  flex: 0 0 85%;
  max-width: 330px;
  scroll-snap-align: center;
  background: #ffffff;
  padding: 12px 12px 18px 12px;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 42, 109, 0.2);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  touch-action: pan-y pinch-zoom;
}

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

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #240f33;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.polaroid-card:hover .polaroid-img-wrapper img {
  transform: scale(1.04);
}

.polaroid-caption {
  margin-top: 12px;
  text-align: center;
  color: #1a0826;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.polaroid-caption .caption-heart {
  color: var(--primary-rose);
}

/* Carousel Nav Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 5, 28, 0.85);
  border: 1px solid rgba(255, 117, 143, 0.4);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  touch-action: manipulation;
}

.prev-btn { right: 8px; }
.next-btn { left: 8px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}

.dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--primary-rose);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ================= ROMANTIC LOVE LETTER ENVELOPE ================= */
.letter-card {
  padding: 26px 18px;
}

.letter-badge {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 18px;
}

.envelope-wrapper {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.envelope {
  position: relative;
  width: 100%;
  height: 160px;
  background: #c9184a;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4), 0 0 20px rgba(255, 42, 109, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 85px solid #ff4d6d;
  z-index: 2;
  transition: transform 0.5s ease;
  transform-origin: top;
}

.envelope-pocket {
  position: relative;
  z-index: 3;
  padding: 12px;
  text-align: center;
}

.tap-open-tag {
  background: rgba(255, 255, 255, 0.95);
  color: #800f2f;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: inline-block;
  animation: pulseTag 1.5s infinite alternate;
}

@keyframes pulseTag {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

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

/* Letter Content Reveal */
.letter-content {
  display: none;
  margin-top: 20px;
  background: #fffbf5;
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  color: #2b1123;
  text-align: right;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: slideUpLetter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpLetter {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.letter-content::before {
  content: '❤️';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  padding: 2px 6px;
}

.letter-header {
  border-bottom: 1px dashed #e5c5d0;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.letter-date {
  font-size: 12px;
  color: #ff2a6d;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.letter-header h3 {
  font-family: var(--font-display);
  font-size: 19px;
  color: #590d22;
}

.letter-text {
  font-size: 15px;
  line-height: 1.8;
  color: #381525;
  margin-bottom: 14px;
}

.letter-sign {
  margin-top: 20px;
  border-top: 1px dashed #e5c5d0;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
  color: #590d22;
}

.sign-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: #ff2a6d;
}

/* Fun Interactive Buttons */
.fun-actions-card {
  padding: 24px 18px;
}

.fun-actions-card h4 {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 16px;
  color: var(--accent-gold);
}

.action-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fun-action-btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(45, 16, 68, 0.7);
  border: 1px solid rgba(255, 117, 143, 0.25);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.fun-action-btn:active {
  transform: scale(0.96);
  background: rgba(255, 42, 109, 0.35);
}

.action-icon {
  font-size: 20px;
}

.action-toast-box {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 42, 109, 0.25);
  border: 1px solid var(--primary-rose);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Site Footer */
.site-footer {
  text-align: center;
  padding: 24px 10px 40px 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer strong {
  color: var(--soft-pink);
}

.copyright-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

/* ================= LIGHTBOX MODAL ================= */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.hidden {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 2, 10, 0.88);
  backdrop-filter: blur(14px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(20, 7, 30, 0.95);
  border: 1px solid rgba(255, 117, 143, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-rose);
  color: #fff;
  border: 2px solid #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--soft-pink);
  text-align: center;
}

/* Animations */
.animate-scale-in {
  animation: scaleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.animate-bounce {
  animation: bounceAnim 2s infinite;
}

@keyframes bounceAnim {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}
