/* ═══════════════════════════════════════════════════
   #TOFOREVER — Pink girly aesthetic
   Palette: blush pinks, rose, cream, soft
   ═══════════════════════════════════════════════════ */

:root {
  --rose:        #e91e63;
  --rose-deep:   #c2185b;
  --blush:       #f8bbd9;
  --blush-light: #fce4ec;
  --pink-light:  #fdf2f8;
  --cream:       #fff5f8;
  --warm-white:  #fffafc;
  --text-dark:   #4a1942;
  --text-soft:   #8e5a7b;
  --gold:        #e8b4b8;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Outfit', sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS (single active at a time) ─────────── */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-smooth);
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── FLOATING HEARTS ───────────────────────────── */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  font-size: 18px;
  opacity: 0;
  animation: floatUp linear forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-105vh) rotate(45deg) scale(1.1); opacity: 0; }
}

/* ── MUTE BUTTON ───────────────────────────────── */
.mute-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 248, 252, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--blush);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: 0 2px 16px rgba(233, 30, 99, 0.15);
  font-size: 14px;
  line-height: 1;
}

.mute-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 24px rgba(233, 30, 99, 0.25);
}

.mute-btn .mute-icon { pointer-events: none; }

/* ── LOCK SCREEN ───────────────────────────────── */
.lock-screen {
  background: linear-gradient(160deg, var(--pink-light) 0%, var(--blush-light) 50%, var(--cream) 100%);
}

.lock-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--blush);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(233, 30, 99, 0.12);
  max-width: 360px;
  width: 90%;
}

.lock-heart {
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
}

.lock-prompt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.lock-input {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  border: 2px solid var(--blush);
  border-radius: 12px;
  background: var(--warm-white);
  color: var(--text-dark);
  text-align: center;
  letter-spacing: 0.2em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.lock-input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.15);
}

.lock-error {
  margin-top: 12px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--rose-deep);
  min-height: 20px;
}

.lock-input.shake {
  animation: shake 0.6s ease-in-out;
}

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

/* ── HERO SCREEN ──────────────────────────────── */
.hero-screen {
  flex-direction: column;
  background: var(--cream);
  padding: 24px;
}

.hero-photo-wrap {
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(233, 30, 99, 0.2);
  margin-bottom: 24px;
  border: 3px solid var(--blush);
}

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

.hero-text {
  text-align: center;
  max-width: 520px;
}

.hero-pre {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--text-soft);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.2;
  color: var(--rose);
  margin-bottom: 16px;
}

.hero-feedback {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--rose);
  margin-bottom: 20px;
  min-height: 24px;
}

/* ── MEMORY SCREEN ────────────────────────────── */
.memory-screen {
  align-items: stretch;
  padding: 0;
}

.memory-photo-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.memory-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 24px 80px;
  background: linear-gradient(to top, rgba(74, 25, 66, 0.85) 0%, rgba(74, 25, 66, 0.4) 40%, transparent 70%);
  min-height: 100%;
}

.memory-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-style: italic;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 28px;
  line-height: 1.4;
  max-width: 560px;
}

/* ── LAST CHANCE SCREEN ───────────────────────── */
.last-chance-screen {
  background: linear-gradient(160deg, var(--rose-deep) 0%, var(--rose) 50%, var(--blush) 100%);
}

.last-chance-content {
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
}

.last-chance-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-style: italic;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 36px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.buttons-row--last {
  gap: 20px;
  flex-wrap: wrap;
}

.btn-yessss {
  min-width: 180px;
}

/* ── CELEBRATION SCREEN ──────────────────────── */
.celebration-screen {
  padding: 0;
}

.celebration-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.celebration-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(74, 25, 66, 0.35);
  z-index: 1;
}

.celebration-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}

.celebration-heart {
  font-size: 64px;
  margin-bottom: 20px;
  animation: heartPulse 1.5s ease-in-out infinite;
}

.celebration-fastest-msg {
  display: none;
  font-family: var(--font-body);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

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

.celebration-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.celebration-caption {
  font-family: var(--font-body);
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin-bottom: 32px;
}

.btn-journey {
  padding: 16px 40px;
  font-size: 1.1rem;
}

/* ── TIMELINE SCREEN ──────────────────────────── */
.timeline-screen {
  background: var(--cream);
  align-items: flex-start;
  overflow-y: auto;
  padding: 60px 24px 80px;
}

.timeline-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--rose);
  text-align: center;
  margin-bottom: 48px;
}

.timeline-years {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-year {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.timeline-year.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-year-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blush);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.timeline-photo-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.12);
  border: 2px solid var(--blush-light);
  aspect-ratio: 1;
}

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

.timeline-year--loading {
  text-align: center;
  padding: 32px 24px;
}

.timeline-2026-caption {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.6;
  margin-top: 12px;
}

/* ── BUTTONS ──────────────────────────────────── */
.buttons-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 500;
  padding: 18px 48px;
  border-radius: 60px;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
  min-width: 160px;
  letter-spacing: 0.01em;
}

.btn-yes {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.35);
}

.btn-yes:hover {
  background: var(--rose-deep);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(233, 30, 99, 0.4);
}

.btn-yes:active {
  transform: translateY(0) scale(0.98);
}

.btn-no {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.hero-screen .btn-no {
  background: var(--warm-white);
  color: var(--rose-deep);
  border: 2px solid var(--rose);
  box-shadow: 0 2px 12px rgba(233, 30, 99, 0.2);
}

.hero-screen .btn-no:hover {
  background: var(--blush-light);
  color: var(--rose-deep);
  border-color: var(--rose-deep);
}

.memory-screen .btn-no {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  border: 2px solid rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

.memory-screen .btn-no:hover {
  background: #fff;
  border-color: #fff;
}

.btn-no:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #fff;
}

.btn-no.shrinking {
  transform: scale(0.8);
  opacity: 0.8;
}

.btn-no.shifted {
  transform: translateX(20px) translateY(-8px);
}

.btn-no.tiny {
  transform: scale(0.55);
  opacity: 0.6;
}

/* ── CONFETTI ─────────────────────────────────── */
.confetti-heart {
  position: fixed;
  font-size: 24px;
  z-index: 950;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ── RESPONSIVE (mobile-first, desktop) ────────── */
html {
  min-height: 100%;
  min-height: -webkit-fill-available;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.btn {
  min-height: 48px;
  touch-action: manipulation;
}

@media (max-width: 600px) {
  .lock-screen {
    padding: 16px;
    align-items: center;
    justify-content: center;
  }

  .lock-card {
    padding: 32px 20px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .lock-input {
    padding: 16px;
    font-size: 1rem;
  }

  .hero-screen {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero-photo-wrap {
    max-width: 280px;
    flex-shrink: 0;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .buttons-row {
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .btn {
    padding: 16px 32px;
    font-size: 1.05rem;
    min-width: 130px;
    min-height: 48px;
  }

  .mute-btn {
    width: 44px;
    height: 44px;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
  }

  .memory-overlay {
    padding: 24px 16px 72px;
    justify-content: flex-end;
  }

  .memory-text {
    font-size: clamp(1.1rem, 4.5vw, 1.5rem);
    margin-bottom: 24px;
  }

  .timeline-screen {
    padding: 40px 16px 60px;
  }

  .timeline-heading {
    margin-bottom: 32px;
    font-size: 1.75rem;
  }

  .timeline-years {
    gap: 36px;
  }

  .timeline-year-title {
    font-size: 1.5rem;
  }

  .timeline-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .timeline-photo-wrap {
    min-height: 0;
  }

  .last-chance-content {
    padding: 32px 20px;
  }

  .last-chance-text {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .celebration-content {
    padding: 20px 16px;
  }

  .celebration-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }
}

@media (min-width: 601px) {
  .lock-card {
    max-width: 380px;
  }

  .hero-photo-wrap {
    max-width: 340px;
  }

  .buttons-row {
    max-width: 420px;
  }
}
