:root {
  --pink: #ff6f91;
  --pink-deep: #d63e6c;
  --cream: #fff5f7;
  --text: #4a2e35;
  --gold: #e8b4bc;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(180deg, #fff5f7 0%, #ffe9ee 100%);
  color: var(--text);
  overflow-x: hidden;
}

#hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -10%;
  font-size: 20px;
  color: var(--pink);
  opacity: 0.6;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  100% { transform: translateY(-110vh) translateX(20px) rotate(360deg); opacity: 0; }
}

section {
  position: relative;
  z-index: 1;
  padding: 80px 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
  background-image: url('photos/hero.jpg');
  background-size: cover;
  background-position: center 25%;
  max-width: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(74,20,35,0.35) 0%, rgba(74,20,35,0.55) 55%, rgba(255,245,247,1) 100%);
}

#hero > *:not(.hero-overlay) {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

#egg-heart {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.15s;
  user-select: none;
}
#egg-heart:active { transform: scale(1.4); }

.hero-sub {
  margin-top: 14px;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  opacity: 0.95;
  font-style: italic;
}

.counter {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.counter-box {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 16px 22px;
  min-width: 90px;
  box-shadow: 0 8px 24px rgba(214,62,108,0.15);
}

.counter-num {
  font-size: 2rem;
  font-weight: bold;
  color: var(--pink-deep);
  display: block;
}

.counter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.scroll-hint {
  margin-top: 60px;
  font-size: 1.6rem;
  color: var(--pink);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* SECTION TITLES */
h2.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--pink-deep);
  margin-bottom: 50px;
}

/* TIMELINE */
.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: translateX(-50%);
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 40px 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tl-item.visible { opacity: 1; transform: translateY(0); }

.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }

.tl-dot {
  position: absolute;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--pink);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--gold);
}

.tl-item:nth-child(odd) .tl-dot { right: -8px; }
.tl-item:nth-child(even) .tl-dot { left: -8px; }

.tl-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(214,62,108,0.12);
  display: inline-block;
  max-width: 360px;
  text-align: left;
}

.tl-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.tl-card .tl-body { padding: 16px 18px; }

.tl-card .tl-caption { font-size: 0.98rem; line-height: 1.4; }

.tl-placeholder {
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: repeating-linear-gradient(45deg, #ffeef2, #ffeef2 10px, #fff5f7 10px, #fff5f7 20px);
  border: 2px dashed var(--gold);
  color: var(--pink-deep);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
}

.tl-placeholder .big-heart { font-size: 1.8rem; opacity: 0.5; }

@media (max-width: 700px) {
  .timeline::before { left: 20px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) {
    width: 100%; left: 0; text-align: left; padding-left: 50px; padding-right: 10px;
  }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 12px; }
  .tl-card { max-width: 100%; }
}

/* GAMES */
.game-box {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(214,62,108,0.12);
  text-align: center;
  margin-bottom: 60px;
}

.game-box h3 { color: var(--pink-deep); margin-bottom: 8px; font-size: 1.4rem; }
.game-box p.desc { opacity: 0.75; margin-bottom: 18px; }

button.game-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(214,62,108,0.3);
  transition: transform 0.15s;
}
button.game-btn:hover { transform: translateY(-2px); }

#catch-area {
  position: relative;
  width: 100%;
  height: 360px;
  background: linear-gradient(180deg, #fff0f4, #ffe0e8);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 10px;
}

.falling-heart {
  position: absolute;
  top: -30px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  animation: fall linear forwards;
}

@keyframes fall {
  to { top: 100%; }
}

#catch-score, #catch-time {
  font-weight: bold;
  color: var(--pink-deep);
}

.catch-stats { display: flex; justify-content: center; gap: 30px; margin: 12px 0; font-size: 1.1rem; }

/* PUZZLE */
#puzzle-wrap {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

#puzzle-target {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(214,62,108,0.2);
  background: #ffe0e8;
}

.puzzle-slot {
  position: relative;
  border: 1px dashed rgba(214, 62, 108, 0.35);
}
.puzzle-slot.filled { border: 1px solid transparent; }
.puzzle-slot.correct { outline: 2px solid #6fbf73; outline-offset: -2px; }

#puzzle-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
  min-height: 70px;
}

.puzzle-piece {
  background-image: url('photos/puzzle.jpg');
  background-size: 300% 300%;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(214,62,108,0.25);
  cursor: grab;
  touch-action: none;
  flex: 0 0 auto;
}
.puzzle-piece.dragging {
  cursor: grabbing;
  z-index: 300;
  pointer-events: none;
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

#puzzle-msg {
  margin-top: 16px;
  font-weight: bold;
  color: var(--pink-deep);
  min-height: 1.4em;
}

/* LETTER EASTER EGG */
#letter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 46, 53, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
#letter-overlay.open { display: flex; }

.letter-card {
  background: #fffaf7;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}

.letter-close {
  position: absolute;
  top: 14px;
  right: 18px;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--pink-deep);
}

#letter-text {
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* FINAL */
#final {
  text-align: center;
  padding-bottom: 120px;
}

#love-btn {
  font-size: 4rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 8px 20px rgba(214,62,108,0.4));
}
#love-btn:hover { transform: scale(1.15); }

#final-message {
  margin-top: 24px;
  font-size: 1.3rem;
  color: var(--pink-deep);
  min-height: 2em;
  font-style: italic;
}

.burst-heart {
  position: fixed;
  font-size: 24px;
  pointer-events: none;
  z-index: 200;
  animation: burst 1.2s ease-out forwards;
}

@keyframes burst {
  to { transform: translate(var(--dx), var(--dy)) rotate(360deg) scale(0.3); opacity: 0; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 10px; }
