/* ==========================================================================
   SOMEWHERE BETWEEN US — A Private Romantic Universe
   Minimal Pink & Light Blue Theme with Sun (Him) & Moon (Her) Celestial Effects
   Stylesheet: css/style.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Minimal Palette: Deep Celestial Canvas with Soft Pink & Light Blue */
  --bg-midnight: #090e1a;
  --bg-deep-space: #0c1426;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-surface-elevated: rgba(21, 32, 56, 0.82);
  --bg-paper: #faf8f5;
  --bg-paper-dark: #f2eee8;

  /* The Sun (His Nickname — Soft Radiant Pink / Sunset Rose) */
  --color-sun-pink: #f7b2c9;
  --color-sun-soft: #fce4ec;
  --color-sun-glow: rgba(247, 178, 201, 0.35);
  --color-sun-warmth: #fef08a;

  /* The Moon (Her Nickname — Luminous Powder Blue / Moonbeam) */
  --color-moon-blue: #a8d5e5;
  --color-moon-soft: #cbe6f2;
  --color-moon-glow: rgba(168, 213, 229, 0.35);
  --color-moon-light: #e0f2fe;

  /* Minimal Core Colors */
  --color-pastel-pink: #f7b2c9;
  --color-light-blue: #a8d5e5;
  --color-blush: #fdf2f8;
  --color-sky-mist: #f0f9ff;
  --color-cream: #faf5ee;
  --color-warm-white: #f8fafc;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dark: #1e293b;
  --text-dark-muted: #475569;

  /* Minimal Hairline Borders */
  --border-subtle: rgba(168, 213, 229, 0.15);
  --border-pink: rgba(247, 178, 201, 0.28);
  --border-blue: rgba(168, 213, 229, 0.28);
  --border-glow: rgba(203, 230, 242, 0.35);

  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px rgba(168, 213, 229, 0.18);
  --shadow-romantic: 0 20px 45px -15px rgba(6, 11, 26, 0.85);

  /* Minimal & Classic Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-handwriting: 'Cormorant Garamond', Georgia, serif;

  /* Layout */
  --header-height: 72px;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-midnight);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 70% 50% at 15% 5%, rgba(247, 178, 201, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(168, 213, 229, 0.18), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(24, 34, 60, 0.35), transparent 70%);
  background-attachment: fixed;
}

/* Classic Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: var(--font-body);
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Background Canvas (Stars + Sun/Moon Celestial Particles) */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Ambient Sun & Moon Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* Sun Glow (Soft Pink & Golden Rose) */
.ambient-glow-sun,
.ambient-glow-1 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(247, 178, 201, 0.22) 0%, rgba(254, 240, 138, 0.08) 50%, transparent 75%);
  top: 8%;
  left: 5%;
  animation: sunGlowFloat 20s ease-in-out infinite alternate;
}

/* Moon Glow (Luminous Powder Blue & Moonbeam) */
.ambient-glow-moon,
.ambient-glow-2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(168, 213, 229, 0.22) 0%, rgba(224, 242, 254, 0.08) 50%, transparent 75%);
  top: 15%;
  right: 6%;
  animation: moonGlowFloat 24s ease-in-out infinite alternate-reverse;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: rgba(9, 14, 26, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

/* Sun & Moon Brand Zone */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-warm-white);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-celestial-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(168, 213, 229, 0.5));
  animation: celestialBreathe 4s ease-in-out infinite;
}

.brand-celestial-icon svg {
  width: 100%;
  height: 100%;
}

.brand-tag {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-moon-blue);
  opacity: 0.85;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  position: relative;
  padding: 0.35rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-pastel-pink);
}

.nav-link.active {
  color: var(--color-warm-white);
  font-weight: 500;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-pastel-pink), var(--color-light-blue));
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(168, 213, 229, 0.6);
}

/* Action Zone */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-ambient-sound {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-moon-blue);
  background: rgba(168, 213, 229, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.btn-ambient-sound:hover {
  background: rgba(168, 213, 229, 0.16);
  border-color: var(--border-blue);
  color: var(--color-warm-white);
  box-shadow: var(--shadow-glow);
}

.btn-ambient-sound.playing {
  background: rgba(247, 178, 201, 0.15);
  border-color: var(--color-pastel-pink);
  color: var(--color-pastel-pink);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(168, 213, 229, 0.08);
  border: 1px solid var(--border-subtle);
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--color-warm-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transform: translateY(-110%);
  transition: transform var(--transition-normal);
  z-index: 99;
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer .nav-link {
  font-size: 1.05rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(168, 213, 229, 0.08);
}

/* ==========================================================================
   BUTTONS & CONTROLS (Minimal Pink & Light Blue)
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #f7b2c9 0%, #a8d5e5 100%);
  color: #0c1426;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(168, 213, 229, 0.32);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(247, 178, 201, 0.45);
  filter: brightness(1.04);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  background: rgba(168, 213, 229, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--color-warm-white);
  font-weight: 400;
  font-size: 0.92rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(168, 213, 229, 0.16);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   PAGE HERO & SECTION HEADERS
   ========================================================================== */
.page-hero {
  text-align: center;
  padding: 4.5rem 0 3rem 0;
  position: relative;
}

.hero-subtitle-tag {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-moon-blue);
  margin-bottom: 0.85rem;
  display: block;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-warm-white);
  margin-bottom: 1rem;
}

.hero-desc {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.02rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Glass Card */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   PAGE 1: INDEX / WELCOME HERO (SUN & MOON CELESTIAL EFFECT)
   ========================================================================== */
.welcome-hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
}

/* Celestial Sun & Moon Emblem */
.celestial-union-emblem {
  position: relative;
  width: 140px;
  height: 90px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The Sun (Left - Soft Warm Pink Glow) */
.celestial-sun-orb {
  position: absolute;
  left: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff0f5, #f7b2c9 50%, #f472b6);
  box-shadow: 0 0 25px rgba(247, 178, 201, 0.7), 0 0 50px rgba(254, 240, 138, 0.25);
  animation: sunRadiance 6s ease-in-out infinite alternate;
  z-index: 1;
}

/* The Moon (Right - Luminous Powder Blue Crescent) */
.celestial-moon-orb {
  position: absolute;
  right: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 12px 10px 0 0 #a8d5e5;
  filter: drop-shadow(0 0 16px rgba(168, 213, 229, 0.8));
  animation: moonFloat 6s ease-in-out infinite alternate-reverse;
  z-index: 2;
}

/* Connecting Light Ribbon */
.celestial-orbit-track {
  position: absolute;
  width: 120px;
  height: 50px;
  border: 1px dashed rgba(203, 230, 242, 0.35);
  border-radius: 50%;
  transform: rotate(-15deg);
  pointer-events: none;
}

.celestial-nickname-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 1.25rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--color-warm-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.celestial-nickname-pill .tag-sun {
  color: var(--color-sun-pink);
  font-weight: 500;
}

.celestial-nickname-pill .tag-divider {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.celestial-nickname-pill .tag-moon {
  color: var(--color-moon-blue);
  font-weight: 500;
}

.welcome-title {
  font-size: clamp(3rem, 7.5vw, 5.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-warm-white);
  margin-bottom: 1.25rem;
}

.welcome-title span {
  background: linear-gradient(135deg, #f7b2c9 0%, #cbe6f2 60%, #a8d5e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.welcome-subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  color: var(--color-moon-soft);
  margin-bottom: 2rem;
  max-width: 620px;
  font-weight: 300;
}

.welcome-note-card {
  max-width: 580px;
  padding: 1.75rem 2.25rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.welcome-note-text {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Universe Grid */
.universe-map-section {
  padding: 4rem 0 6rem 0;
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.universe-tile {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.universe-tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.universe-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(168, 213, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pastel-pink);
  font-size: 1.3rem;
}

.universe-tile-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--color-warm-white);
}

.universe-tile-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE 2: LETTER / ENVELOPE INTERACTIVE
   ========================================================================== */
.letter-page-wrapper {
  padding: 2rem 0 5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
}

.envelope-stage {
  perspective: 1200px;
  width: 100%;
  max-width: 680px;
  margin: 2rem auto;
  position: relative;
  min-height: 480px;
}

/* The Envelope Container */
.envelope-box {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.envelope-box:hover {
  transform: translateY(-4px);
}

.envelope-outer {
  position: relative;
  width: 100%;
  height: 360px;
  background: linear-gradient(145deg, #151e36, #0e1628);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 213, 229, 0.12);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Envelope Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: linear-gradient(180deg, #1e2b4d, #151e36);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  border-top: 1px solid rgba(247, 178, 201, 0.35);
}

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

/* Wax Seal with Sun & Moon Motif */
.wax-seal {
  position: absolute;
  top: 145px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  background: radial-gradient(circle at 35% 35%, #f7b2c9, #e07a9a, #993356);
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.wax-seal svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  opacity: 0.95;
}

.envelope-box.is-open .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.6);
  pointer-events: none;
}

.envelope-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.88rem;
  color: var(--color-moon-soft);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
}

/* Classic Letter Paper Sheet */
.letter-sheet {
  background: var(--bg-paper);
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 3.5rem 3rem;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.55), inset 0 0 60px rgba(168, 213, 229, 0.08);
  position: relative;
  display: none;
  animation: letterUnfold 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background-image: url('../assets/images/IMG20261018154421.jpg');
  background-image: linear-gradient(rgba(255, 255, 255, 0.491), rgba(255, 255, 255, 0.85)), url('../assets/images/IMG20261018154421.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.letter-sheet.visible {
  display: block;
}

.letter-postage-stamp {
  position: absolute;
  top: 2rem;
  right: 2rem;
  border: 1.5px dashed #a8b8c8;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #556980;
  transform: rotate(3deg);
  font-weight: 600;
}

.letter-header-date {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-dark-muted);
  margin-bottom: 2rem;
}

.letter-salutation {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 1.5rem;
}

.letter-body {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.8;
  color: #273142;
}

.letter-body p {
  color: #273142;
  font-size: 1.25rem;
  font-family: var(--font-heading);
  margin-bottom: 1.4rem;
  font-weight: 400;
}

.letter-signoff {
  margin-top: 2.5rem;
  text-align: right;
}

.letter-signoff-phrase {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--text-dark-muted);
  font-size: 1.2rem;
}

.letter-signature {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2.4rem;
  color: #be185d;
  line-height: 1.2;
  font-weight: 600;
}

.letter-postscript {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(168, 213, 229, 0.35);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: #4b5563;
}

/* ==========================================================================
   PAGE 3: MEMORIES / POLAROID GALLERY & LIGHTBOX
   ========================================================================== */
.memories-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0 5rem 0;
}

.polaroid-card {
  background: var(--bg-paper);
  padding: 1.1rem 1.1rem 1.75rem 1.1rem;
  border-radius: 4px;
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}

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

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

.polaroid-card:hover {
  transform: rotate(0deg) scale(1.03) translateY(-6px);
  box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.75), 0 0 25px rgba(168, 213, 229, 0.28);
  z-index: 10;
}

.polaroid-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 24px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateX(-50%) rotate(-1deg);
  z-index: 2;
}

.polaroid-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #141c2e;
  border-radius: 2px;
  position: relative;
}

.polaroid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.polaroid-card:hover .polaroid-photo {
  transform: scale(1.05);
}

.polaroid-caption {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.polaroid-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
}

.polaroid-date {
  font-size: 0.82rem;
  color: var(--text-dark-muted);
  font-weight: 500;
}

.polaroid-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* Modal Lightbox */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 10, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.lightbox-content {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 840px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-romantic);
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.lightbox-image-box {
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: #000;
}

.lightbox-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-details {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.lightbox-date {
  font-size: 0.82rem;
  color: var(--color-moon-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--color-warm-white);
}

.lightbox-description {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  color: var(--color-warm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--color-pastel-pink);
  color: #0c1426;
}

/* ==========================================================================
   PAGE 4: OPEN WHEN ENVELOPES
   ========================================================================== */
.open-when-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0 5rem 0;
}

.open-when-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.open-when-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-pastel-pink), var(--color-light-blue));
  opacity: 0.9;
}

.open-when-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.open-when-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(168, 213, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-pastel-pink);
  font-size: 1.7rem;
  transition: transform var(--transition-fast);
}

.open-when-card:hover .open-when-icon {
  transform: scale(1.1);
  background: rgba(247, 178, 201, 0.18);
}

.open-when-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--color-warm-white);
}

.open-when-action {
  font-size: 0.86rem;
  color: var(--color-moon-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* Modal for Open When */
.open-when-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 10, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.open-when-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.open-when-modal-body {
  background: var(--bg-paper);
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  padding: 3rem 2.5rem;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  animation: letterUnfold 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.open-when-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.open-when-modal-close:hover {
  background: #be185d;
  color: #fff;
}

.open-when-modal-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 1.25rem;
  text-align: center;
}

.open-when-modal-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  line-height: 1.8;
  color: #334155;
  white-space: pre-line;
}

.open-when-modal-footer {
  margin-top: 2rem;
  text-align: right;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: #be185d;
}

/* ==========================================================================
   PAGE 5: OUR MOMENTS / LITTLE THINGS
   ========================================================================== */
.compliment-box {
  background: linear-gradient(135deg, rgba(21, 32, 56, 0.7), rgba(30, 20, 44, 0.7));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem auto;
  box-shadow: var(--shadow-romantic);
}

.compliment-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 400;
  color: var(--color-warm-white);
  line-height: 1.45;
  margin-bottom: 2rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.reason-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reason-number {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-moon-blue);
  text-transform: uppercase;
}

.reason-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-warm-white);
}

.reason-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Inside Jokes */
.jokes-section {
  padding: 3rem 0 5rem 0;
}

.jokes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.joke-card {
  padding: 1.5rem;
  border-left: 2px solid var(--color-pastel-pink);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ==========================================================================
   PAGE 6: VOICE MESSAGES & AUDIO PLAYER
   ========================================================================== */
.player-container {
  max-width: 780px;
  margin: 0 auto 4rem auto;
}

.waveform-canvas-box {
  width: 100%;
  height: 120px;
  background: rgba(9, 14, 26, 0.7);
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

#waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.player-main-card {
  padding: 2.5rem;
}

.player-header {
  text-align: center;
  margin-bottom: 2rem;
}

.now-playing-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-moon-blue);
  display: block;
  margin-bottom: 0.4rem;
}

.now-playing-title {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--color-warm-white);
}

.player-scrubber {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.scrubber-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
}

.scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-pastel-pink), var(--color-light-blue));
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(168, 213, 229, 0.5);
}

.scrubber-timestamps {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(168, 213, 229, 0.08);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-warm-white);
  transition: all var(--transition-fast);
}

.ctrl-btn:hover {
  background: rgba(168, 213, 229, 0.18);
  color: var(--color-pastel-pink);
  transform: scale(1.08);
}

.ctrl-play-btn {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #f7b2c9, #a8d5e5);
  color: #0c1426;
  border: none;
  box-shadow: 0 4px 20px rgba(168, 213, 229, 0.35);
}

.ctrl-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(247, 178, 201, 0.5);
  color: #0c1426;
}

.voice-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.voice-track-card {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voice-track-card.active {
  border-color: var(--color-pastel-pink);
  background: rgba(247, 178, 201, 0.08);
}

/* ==========================================================================
   PAGE 7: QUIZ
   ========================================================================== */
.quiz-wrapper {
  max-width: 680px;
  margin: 0 auto 5rem auto;
}

.quiz-card {
  padding: 3rem 2.5rem;
  position: relative;
}

.quiz-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-pastel-pink), var(--color-light-blue));
  transition: width 0.4s ease;
}

.quiz-question-counter {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-moon-blue);
  margin-bottom: 0.75rem;
  display: block;
}

.quiz-question-text {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--color-warm-white);
  margin-bottom: 2rem;
  line-height: 1.35;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option-btn {
  width: 100%;
  text-align: left;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option-btn:hover {
  background: rgba(168, 213, 229, 0.1);
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.quiz-option-btn.selected-correct {
  background: rgba(74, 222, 128, 0.16);
  border-color: rgba(74, 222, 128, 0.5);
  color: #86efac;
}

.quiz-option-btn.selected-wrong {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

.quiz-explanation {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(168, 213, 229, 0.06);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  color: var(--color-warm-white);
  display: none;
}

.quiz-explanation.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Quiz Result Card */
.quiz-result-box {
  text-align: center;
  padding: 3.5rem 2rem;
  display: none;
}

.quiz-result-score {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 8vw, 4.8rem);
  font-weight: 600;
  color: var(--color-pastel-pink);
  margin-bottom: 0.5rem;
}

.quiz-result-badge {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 500;
  color: var(--color-warm-white);
  margin-bottom: 1.25rem;
}

.quiz-result-message {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.7;
}

/* ==========================================================================
   PAGE 8: FUTURE DREAMS
   ========================================================================== */
.future-timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 860px;
  margin: 0 auto 5rem auto;
  position: relative;
}

.future-timeline::before {
  content: '';
  position: absolute;
  top: 2rem;
  bottom: 2rem;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--color-pastel-pink), var(--color-light-blue), transparent);
  transform: translateX(-50%);
  opacity: 0.3;
}

.future-dream-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}

.future-dream-item:nth-child(even) {
  direction: rtl;
}

.future-dream-item:nth-child(even) .future-dream-content {
  direction: ltr;
}

.future-dream-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-pastel-pink);
  box-shadow: 0 0 14px var(--color-pastel-pink);
  z-index: 2;
}

.future-dream-image-box {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.future-dream-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.future-dream-content {
  padding: 1.5rem;
}

.future-dream-number {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--color-moon-blue);
  text-transform: uppercase;
}

.future-dream-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-warm-white);
  margin: 0.5rem 0 0.75rem 0;
}

.future-dream-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.future-final-pledge {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, rgba(21, 32, 56, 0.5), rgba(30, 20, 44, 0.6));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
}

.future-final-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--color-warm-white);
  margin-bottom: 1rem;
}

.future-final-text {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.85rem;
  color: var(--color-pastel-pink);
  line-height: 1.45;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 10, 20, 0.92);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-moon-soft);
  margin-bottom: 0.85rem;
}

.footer-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-meta span {
  color: var(--color-pastel-pink);
}

/* Zero broken image fallback */
.img-fallback-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #131c30, #221a2c);
  color: var(--color-moon-soft);
  padding: 1.5rem;
  text-align: center;
  gap: 0.5rem;
}
