/* Importing aesthetic Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Caveat:wght@400;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Outfit:wght@300;400;600&display=swap');

:root {
  /* Soft Cozy Warm Palette */
  --bg-color: #FFF8F0;
  --panel-bg: rgba(250, 218, 221, 0.45); /* soft pink */
  --accent-pink: #FFD6E0;
  --accent-yellow: #FFF4B8;
  --text-color: #5D4037; /* Warm brown */
  --text-muted: #8D6E63;
  --heart-color: #FF6B81;
  --tape-color: rgba(255, 244, 184, 0.7);
  --border-style: 2px dashed #D7CCC8;
  --shadow-color: rgba(93, 64, 55, 0.15);
  
  /* Font Families */
  --font-title: 'Playfair Display', serif;
  --font-handwritten: 'Caveat', cursive;
  --font-body: 'Outfit', sans-serif;
  
  --transition-speed: 0.3s;
}

/* Dark Romantic Mode Theme override */
[data-theme="dark"] {
  --bg-color: #2D1B22;
  --panel-bg: rgba(74, 35, 51, 0.55);
  --accent-pink: #632C3E;
  --accent-yellow: #4E3E26;
  --text-color: #F8BBD0;
  --text-muted: #E29CA4;
  --heart-color: #FF2E56;
  --tape-color: rgba(99, 44, 62, 0.7);
  --border-style: 2px dashed #880E4F;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important; /* Hide real cursor for custom heart trail cursor */
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-pink);
  border-radius: 10px;
  border: 2px solid var(--bg-color);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  position: relative;
  min-height: 100vh;
}

/* Custom Cursor */
.heart-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--heart-color);
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
  z-index: 99999;
  border-radius: 50% 0 0 50%;
  box-shadow: 0 0 10px var(--heart-color);
  display: block;
}
.heart-cursor::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--heart-color);
  border-radius: 50%;
  left: 0;
  top: -10px;
}
.heart-cursor::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--heart-color);
  border-radius: 50%;
  left: 10px;
  top: 0;
}

/* Click Sparkles */
.click-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 24px;
  z-index: 99998;
  animation: clickSparkle 0.8s ease-out forwards;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  transition: opacity 0.8s ease;
}

.loader-heart {
  font-size: 60px;
  animation: heartPulse 1.2s infinite ease-in-out;
  margin-bottom: 20px;
}

.loader-text {
  font-family: var(--font-handwritten);
  font-size: 28px;
  color: var(--text-color);
  text-align: center;
  padding: 0 20px;
}

/* Floating Music/Stars Background items */
.cloud-particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50px;
  pointer-events: none;
  z-index: 1;
}

.floating-particle {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  user-select: none;
  animation: floatUp 15s linear infinite;
}

/* Control Hub Overlay (Persistent Floating controls) */
.floating-hub {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 9999;
  background: var(--panel-bg);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px var(--shadow-color);
  border: 1px solid var(--accent-pink);
  align-items: center;
}

.hub-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: none !important;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-btn:hover {
  transform: scale(1.2) rotate(5deg);
}

.love-meter-indicator {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--text-muted);
  padding-left: 10px;
  color: var(--text-color);
}

/* Quick Page Navigation (Scrapbook Tabs) */
.page-tabs {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: var(--panel-bg);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px var(--shadow-color);
  z-index: 9999;
  border: 1px solid var(--accent-pink);
  max-width: 90%;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: var(--bg-color);
  border: 1px solid var(--accent-pink);
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.tab-btn.active {
  background: var(--heart-color);
  color: #fff;
  border-color: var(--heart-color);
  transform: scale(1.05) translateY(-2px);
}

/* Scrapbook Pages Container */
.scrapbook-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  padding: 80px 20px;
}

.page {
  width: 100%;
  max-width: 850px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 2px solid var(--accent-pink);
  background-image: radial-gradient(var(--accent-pink) 0.5px, #ffffff 0.5px);
  background-size: 20px 20px;
  flex-direction: column;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.6s ease;
}

[data-theme="dark"] .page {
  background: #3a222c;
  background-image: radial-gradient(var(--accent-pink) 0.5px, #3a222c 0.5px);
}

/* Notebook style decoration overlay */
.notebook-holes {
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  pointer-events: none;
  z-index: 3;
}

.notebook-hole {
  width: 16px;
  height: 16px;
  background: var(--bg-color);
  border-radius: 50%;
  border: 1px solid var(--text-muted);
}

/* Tape sticker effect */
.tape-sticker {
  position: absolute;
  background: var(--tape-color);
  width: 100px;
  height: 30px;
  transform: rotate(-5deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  backdrop-filter: blur(2px);
  z-index: 5;
  border-left: 2px dashed rgba(255,255,255,0.5);
  border-right: 2px dashed rgba(255,255,255,0.5);
}

.tape-top-left { top: 10px; left: 10px; transform: rotate(-30deg); }
.tape-top-right { top: 10px; right: 10px; transform: rotate(30deg); }

/* --- 1. LANDING PAGE --- */
#landing-page {
  max-width: 100%;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: var(--bg-color);
  justify-content: center;
  align-items: center;
  text-align: center;
  border: none;
  background-image: radial-gradient(var(--accent-pink) 1px, var(--bg-color) 1px);
  background-size: 30px 30px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(32px, 8vw, 64px);
  margin-bottom: 20px;
  color: var(--text-color);
  animation: heartPulse 4s infinite;
}

.hero-subtitle {
  font-family: var(--font-handwritten);
  font-size: clamp(20px, 4vw, 32px);
  margin-bottom: 40px;
  color: var(--text-muted);
}

/* Envelope Container & Animation */
.envelope-wrapper {
  position: relative;
  width: 280px;
  height: 180px;
  background: var(--accent-pink);
  margin: 0 auto 40px auto;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 20px var(--shadow-color);
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 100px solid var(--heart-color);
  transform-origin: top;
  z-index: 4;
  transition: transform 0.6s ease;
}

.envelope-front {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-bottom: 90px solid rgba(250, 218, 221, 0.9);
  z-index: 3;
}

.envelope-letter {
  position: absolute;
  background: #fff;
  width: 250px;
  height: 140px;
  bottom: 10px;
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: all 0.6s ease;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.envelope-letter p {
  font-family: var(--font-handwritten);
  font-size: 20px;
  color: var(--text-color);
}

.envelope-btn {
  background: var(--heart-color);
  color: white;
  border: none;
  padding: 12px 28px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(255, 107, 129, 0.4);
  transition: all 0.3s;
}

.envelope-btn:hover {
  transform: translateY(-3px) scale(1.05);
}

/* Action when landing opened */
.envelope-wrapper.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrapper.open .envelope-letter {
  transform: translateY(-80px);
  z-index: 5;
}

/* --- 2. OUR STORY (TIMELINE) --- */
.story-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
  position: relative;
  padding-left: 20px;
  border-left: 3px dashed var(--accent-pink);
}

.timeline-card {
  position: relative;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--accent-pink);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.4s ease;
  opacity: 0.9;
}

.timeline-card:hover {
  transform: scale(1.02) rotate(var(--rot, 1deg));
  box-shadow: 0 8px 25px var(--shadow-color);
}

.timeline-card h3 {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Polaroid framing in Story */
.polaroid-frame {
  background: #fff;
  padding: 12px 12px 24px 12px;
  box-shadow: 0 6px 15px var(--shadow-color);
  border: 1px solid #eee;
  transform: rotate(var(--rot, -2deg));
  text-align: center;
  max-width: 220px;
  margin: 10px auto;
  display: inline-block;
}

.polaroid-frame img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.polaroid-caption {
  font-family: var(--font-handwritten);
  font-size: 18px;
  margin-top: 8px;
  color: var(--text-color);
}

/* Chat bubble styling for Story */
.chat-bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.bubble {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 15px;
}

.bubble.him {
  background: var(--accent-pink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.bubble.her {
  background: var(--accent-yellow);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  text-align: right;
}

/* --- 3. 100 REASONS WHY --- */
.reasons-search {
  width: 100%;
  padding: 12px 20px;
  border-radius: 30px;
  border: 2px solid var(--accent-pink);
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg-color);
  color: var(--text-color);
  outline: none;
}

.reasons-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  max-height: 450px;
  overflow-y: auto;
  padding: 10px;
}

.reason-card {
  perspective: 1000px;
  height: 150px;
  cursor: none !important;
}

.reason-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.reason-card.flipped .reason-inner {
  transform: rotateY(180deg);
}

.reason-front, .reason-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-shadow: 0 4px 10px var(--shadow-color);
}

.reason-front {
  background: var(--accent-pink);
  color: var(--text-color);
  font-family: var(--font-title);
  font-weight: bold;
}

.reason-back {
  background: var(--accent-yellow);
  color: var(--text-color);
  transform: rotateY(180deg);
  font-family: var(--font-handwritten);
  font-size: 20px;
}

/* --- 4. SONGS REMIND ME --- */
.music-layout {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.playlist-column {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.song-card {
  background: var(--bg-color);
  border: 1px solid var(--accent-pink);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  box-shadow: 0 4px 10px var(--shadow-color);
}

.song-card:hover {
  transform: scale(1.03) rotate(-1deg);
}

.song-card.active {
  border-color: var(--heart-color);
  background: rgba(255, 214, 224, 0.2);
}

.album-art {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.song-info h4 {
  font-family: var(--font-title);
  font-size: 16px;
}

.song-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.player-column {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vinyl-record {
  width: 180px;
  height: 180px;
  background: #111;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
  animation: spinVinyl 12s linear infinite;
  animation-play-state: paused;
}

.vinyl-record.playing {
  animation-play-state: running;
}

.vinyl-center {
  width: 60px;
  height: 60px;
  background: var(--accent-pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
}

.lyrics-popup {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  z-index: 10;
  display: none;
  padding: 20px;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  border: 2px dashed var(--heart-color);
  box-shadow: 0 5px 20px var(--shadow-color);
}

[data-theme="dark"] .lyrics-popup {
  background: rgba(45, 27, 34, 0.95);
}

.lyrics-popup p {
  font-family: var(--font-handwritten);
  font-size: 22px;
  line-height: 1.6;
}

.close-lyrics {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--heart-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}

/* --- 5. GALLERY --- */
.gallery-scrapbook {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
  padding: 20px;
  max-height: 480px;
  overflow-y: auto;
}

.gallery-item {
  background: #fff;
  padding: 12px 12px 30px 12px;
  box-shadow: 0 8px 20px var(--shadow-color);
  border-radius: 4px;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform: rotate(var(--rot, 1deg));
}

[data-theme="dark"] .gallery-item {
  background: #442a35;
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 2px;
}

.gallery-caption {
  font-family: var(--font-handwritten);
  font-size: 20px;
  margin-top: 12px;
  text-align: center;
}

.gallery-item:hover {
  transform: scale(1.08) rotate(0deg);
  box-shadow: 0 15px 30px var(--shadow-color);
  z-index: 10;
}

/* --- 6. LOVE LETTER --- */
.letter-paper {
  background: #FFFDF9;
  border: 1px solid #F3E5D8;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 40px;
  position: relative;
  min-height: 350px;
  background-image: linear-gradient(rgba(215, 204, 200, 0.4) 1px, transparent 1px);
  background-size: 100% 28px;
  line-height: 28px;
}

[data-theme="dark"] .letter-paper {
  background: #4A3E3D;
  border-color: #5D4037;
  background-image: linear-gradient(rgba(248, 187, 208, 0.15) 1px, transparent 1px);
}

.letter-text {
  font-family: var(--font-handwritten);
  font-size: 22px;
  color: var(--text-color);
  white-space: pre-line;
  min-height: 200px;
  margin-top: 20px;
}

.signature {
  font-family: var(--font-handwritten);
  font-size: 26px;
  font-weight: bold;
  text-align: right;
  margin-top: 30px;
  color: var(--heart-color);
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* --- 7. COUNTDOWN --- */
.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  width: 100%;
}

@media(min-width: 600px) {
  .timer-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.timer-segment {
  background: var(--panel-bg);
  border: 2px dashed var(--accent-pink);
  border-radius: 15px;
  padding: 15px 5px;
  text-align: center;
  box-shadow: 0 4px 10px var(--shadow-color);
}

.timer-val {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
}

.timer-lbl {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.pulse-heart-container {
  font-size: 80px;
  animation: heartPulse 1.5s infinite ease-in-out;
  color: var(--heart-color);
  margin: 15px 0;
}

/* --- 8. QUIZ --- */
.quiz-box {
  background: var(--bg-color);
  border: 1px solid var(--accent-pink);
  border-radius: 20px;
  padding: 25px;
  margin-top: 20px;
}

.quiz-question {
  font-family: var(--font-title);
  font-size: 22px;
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option-btn {
  background: #fff;
  border: 2px solid var(--accent-pink);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px;
  text-align: left;
  transition: all 0.3s;
  color: var(--text-color);
  font-family: var(--font-body);
}

[data-theme="dark"] .quiz-option-btn {
  background: #4A353F;
}

.quiz-option-btn:hover {
  background: var(--accent-pink);
  transform: translateY(-2px);
}

.quiz-feedback {
  margin-top: 15px;
  font-family: var(--font-handwritten);
  font-size: 22px;
  font-weight: bold;
  min-height: 30px;
  text-align: center;
}

/* --- 9. OPEN WHEN --- */
.envelopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.envelope-item {
  background: var(--accent-pink);
  border-radius: 10px;
  padding: 20px 10px;
  text-align: center;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.envelope-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.envelope-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.envelope-title {
  font-family: var(--font-handwritten);
  font-size: 20px;
  font-weight: bold;
}

/* Open When Modal Content style */
.open-when-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.open-when-paper {
  background: #FFFDF9;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  border: 3px solid var(--accent-pink);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
  animation: stickyPop 0.5s ease-out;
}

[data-theme="dark"] .open-when-paper {
  background: #3a222c;
  color: var(--text-color);
}

.open-when-paper h3 {
  font-family: var(--font-title);
  margin-bottom: 15px;
  font-size: 24px;
}

.open-when-paper p {
  font-family: var(--font-handwritten);
  font-size: 22px;
  line-height: 1.6;
}

/* --- 10. WISHES WALL --- */
.wishes-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(93, 64, 55, 0.05);
  border-radius: 12px;
  margin-top: 15px;
}

.wish-note {
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 10px var(--shadow-color);
  font-family: var(--font-handwritten);
  font-size: 18px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  animation: stickyPop 0.5s forwards;
}

.wishes-input-area {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.wish-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 30px;
  border: 2px solid var(--accent-pink);
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
}

.wish-submit-btn {
  background: var(--heart-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 107, 129, 0.3);
}

/* --- 11. THE BIG SURPRISE --- */
#surprise-page {
  max-width: 100%;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  background: var(--bg-color);
  color: var(--text-color);
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.starry-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.surprise-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 20px;
}

.final-quote {
  font-family: var(--font-title);
  font-size: clamp(28px, 6vw, 48px);
  margin-bottom: 20px;
  color: var(--text-color);
}

.final-sub {
  font-family: var(--font-handwritten);
  font-size: clamp(22px, 4vw, 32px);
  color: var(--text-muted);
  margin-bottom: 40px;
}

.surprise-collage {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.surprise-collage .polaroid-frame {
  max-width: 140px;
  background: #fff;
  color: #333;
  padding: 8px 8px 16px 8px;
}

.surprise-btn {
  background: var(--heart-color);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 18px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(255, 107, 129, 0.4);
}

/* Photo Lightbox Popup */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  z-index: 10001;
  display: none;
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border: 10px solid #fff;
  border-radius: 4px;
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  font-family: var(--font-handwritten);
  font-size: 24px;
  margin-top: 15px;
}

/* Responsive adjust */
@media (max-width: 768px) {
  .scrapbook-container {
    padding: 40px 8px;
  }
  .page {
    padding: 24px 12px;
    border-radius: 12px;
  }
  .notebook-holes {
    display: none;
  }
  
  /* 100 Reasons grid adjustments for mobile */
  .reasons-container {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 380px;
  }
  .reason-card {
    height: 120px;
  }
  .reason-front {
    font-size: 15px;
  }
  .reason-back {
    font-size: 16px;
    padding: 8px;
  }
  
  /* Gallery columns adjustment */
  .gallery-scrapbook {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 5px;
  }
  .gallery-item {
    padding: 6px 6px 16px 6px;
  }
  .gallery-item img {
    height: 130px;
  }
  .gallery-caption {
    font-size: 15px;
    margin-top: 6px;
  }
  
  /* Envelopes list adjustment */
  .envelopes-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }
  
  /* Countdown Timer text & size adjustment */
  .timer-grid {
    gap: 8px;
  }
  .timer-segment {
    padding: 8px 2px;
  }
  .timer-val {
    font-size: 20px;
  }
  .timer-lbl {
    font-size: 10px;
  }
  
  /* Wishes wall notes adjustment */
  .wishes-board {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 300px;
  }
  .wish-note {
    min-height: 90px;
    font-size: 15px;
    padding: 8px;
  }
  
  /* Letter paper padding */
  .letter-paper {
    padding: 20px;
    font-size: 18px;
    line-height: 24px;
    background-size: 100% 24px;
  }
  .letter-text {
    font-size: 18px;
    line-height: 24px;
  }
}

/* Touch screen adjustments - Hide custom cursor and restore standard cursor */
@media (hover: none) {
  .heart-cursor {
    display: none !important;
  }
  * {
    cursor: auto !important;
  }
}
