:root {
  --orange: #f59e0b;
  --deep-orange: #c2410c;
  --yellow: #fde68a;
  --cream: #fff7ed;
  --rose: #fb7185;
  --ink: #251a17;
  --muted: #7c6258;
  --glass: rgba(255,255,255,.62);
  --border: rgba(255,255,255,.7);
  --shadow: 0 24px 80px rgba(92, 48, 20, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(253, 230, 138, .85), transparent 28%),
    radial-gradient(circle at 85% 35%, rgba(251, 113, 133, .35), transparent 25%),
    linear-gradient(145deg, #fff7ed 0%, #ffedd5 45%, #fef3c7 100%);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1;
  margin-top: 0;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1rem; }
h3 { font-size: 2rem; margin-bottom: .6rem; }
p { line-height: 1.75; }
button { font: inherit; }

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  text-align: center;
  background: #fff7ed;
  transition: opacity .7s, visibility .7s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-heart {
  font-size: 4rem;
  color: var(--rose);
  animation: beat 1s infinite;
}
@keyframes beat { 50% { transform: scale(1.25); } }

#rainCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .25;
}

#cursorGlow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(253,230,138,.35), transparent 68%);
  transform: translate(-50%, -50%);
}

.section {
  min-height: 100vh;
  padding: 7rem min(7vw, 90px);
  position: relative;
  display: grid;
  align-items: center;
}

.hero {
  text-align: center;
  overflow: hidden;
}
.hero-content {
  max-width: 1000px;
  margin: auto;
  position: relative;
  z-index: 2;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--deep-orange);
}
.intro {
  max-width: 650px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  animation: float 2s infinite;
}
@keyframes float { 50% { transform: translate(-50%, -8px); } }

.cloud {
  position: absolute;
  width: 320px;
  height: 110px;
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  filter: blur(1px);
  animation: drift 18s linear infinite alternate;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { width: 130px; height: 130px; left: 55px; top: -55px; }
.cloud::after { width: 170px; height: 170px; right: 45px; top: -75px; }
.cloud-one { top: 13%; left: -8%; }
.cloud-two { bottom: 14%; right: -10%; animation-duration: 24s; }
@keyframes drift { to { transform: translateX(120px); } }

.primary-btn, .secondary-btn, .floating-btn, .gallery-arrow {
  border: 0;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--deep-orange));
  padding: 1rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(194,65,12,.25);
  font-weight: 700;
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(194,65,12,.32); }
.secondary-btn {
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: var(--ink);
}

.floating-btn {
  position: fixed;
  right: 1.2rem;
  top: 1.2rem;
  z-index: 30;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  background: var(--deep-orange);
  box-shadow: var(--shadow);
}

.glass-card, .letter {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 32px;
  padding: clamp(1.5rem, 4vw, 4rem);
}
.centered { text-align: center; max-width: 800px; margin: auto; }
.mini-heart { font-size: 3rem; color: var(--rose); }
.button-zone {
  height: 140px;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}
#noButton { position: relative; }
.hidden-message {
  opacity: 0;
  transform: translateY(8px);
  transition: .45s;
  color: var(--deep-orange);
  font-weight: 700;
}
.hidden-message.show { opacity: 1; transform: none; }

.section-heading {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}
.section-heading > p:last-child { color: var(--muted); }

.memory-grid, .adore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  width: 100%;
}
.memory-card, .adore-card {
  min-height: 180px;
  border-radius: 25px;
  padding: 1.4rem;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 15px 45px rgba(95,55,25,.1);
  transition: .35s;
}
.memory-card {
  cursor: pointer;
  display: grid;
  place-content: center;
  text-align: center;
  transform-style: preserve-3d;
}
.memory-card:hover, .memory-card.flipped {
  transform: translateY(-8px) rotate(-1deg);
  background: rgba(255,255,255,.9);
}
.memory-card .icon { font-size: 2.2rem; }
.memory-card .detail { display: none; color: var(--deep-orange); font-weight: 600; }
.memory-card.flipped .short { display: none; }
.memory-card.flipped .detail { display: block; }
.adore-card h3 { font-size: 1.7rem; }

.gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.photo-frame {
  width: min(760px, 76vw);
  text-align: center;
  background: rgba(255,255,255,.65);
  border-radius: 30px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.photo-frame img {
  width: 100%;
  height: min(62vh, 620px);
  object-fit: cover;
  border-radius: 22px;
  display: block;
}
.photo-placeholder {
  min-height: 420px;
  display: none;
  place-content: center;
  border: 2px dashed rgba(194,65,12,.35);
  border-radius: 22px;
  color: var(--muted);
}
.gallery-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 2rem;
  background: rgba(255,255,255,.8);
  color: var(--deep-orange);
}

.quiz-card { max-width: 850px; margin: auto; width: 100%; }
.quiz-question { margin-bottom: 2rem; }
.quiz-options { display: grid; gap: .75rem; }
.quiz-option {
  text-align: left;
  padding: 1rem;
  border: 1px solid rgba(194,65,12,.16);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  cursor: pointer;
}
.quiz-option.correct { background: #dcfce7; }
.quiz-option.wrong { background: #ffe4e6; }
#quizResult { font-weight: 700; color: var(--deep-orange); }

.timeline {
  max-width: 900px;
  margin: auto;
  border-left: 2px solid rgba(194,65,12,.28);
  padding-left: 2rem;
}
.timeline article {
  position: relative;
  margin-bottom: 2.5rem;
  background: rgba(255,255,255,.55);
  border-radius: 22px;
  padding: 1.5rem;
}
.timeline article::before {
  content: "♥";
  position: absolute;
  left: -2.75rem;
  top: 1rem;
  color: var(--rose);
  background: var(--cream);
  padding: .2rem;
}
.timeline time { color: var(--deep-orange); font-weight: 700; }

.counter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.counter div {
  padding: 1.2rem .5rem;
  border-radius: 22px;
  background: rgba(255,255,255,.7);
}
.counter strong { display: block; font-size: clamp(2rem, 5vw, 4rem); font-family: "Cormorant Garamond"; }
.counter span { color: var(--muted); }

.todo-list {
  max-width: 780px;
  margin: auto;
  display: grid;
  gap: .8rem;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(255,255,255,.65);
  cursor: pointer;
  user-select: none;
}
.todo-item.done { opacity: .65; text-decoration: line-through; }
.todo-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  display: grid;
  place-content: center;
  color: white;
}
.todo-item.done .todo-check { background: var(--orange); }

.letter { max-width: 850px; margin: auto; }
.signature {
  margin-top: 2rem;
  font-family: "Cormorant Garamond";
  font-size: 2rem;
  color: var(--deep-orange);
}
.signature span { font-size: 1.3rem; }

.final-section {
  background: radial-gradient(circle at center, #4a1d0f, #160c09 70%);
  color: white;
  text-align: center;
  overflow: hidden;
}
.final-content { margin: auto; position: relative; z-index: 2; }
.final-content > p:first-child { font-size: 2rem; letter-spacing: .3em; }
.nickname { font-family: "Cormorant Garamond"; font-size: clamp(4rem, 12vw, 9rem); margin: 0; color: var(--yellow); }
.infinity { font-size: 6rem; color: var(--rose); }
#stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
}
@keyframes twinkle { to { opacity: .2; transform: scale(.4); } }

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity .9s, transform .9s;
}
.reveal.visible { opacity: 1; transform: none; }

.confetti {
  position: fixed;
  top: -20px;
  z-index: 100;
  pointer-events: none;
  animation: fall 3s linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .5; }
}

@media (max-width: 700px) {
  .section { padding: 5rem 1.2rem; }
  .counter { grid-template-columns: repeat(2, 1fr); }
  .gallery { gap: .3rem; }
  .gallery-arrow { width: 42px; height: 42px; }
  .photo-frame { width: 78vw; }
  #cursorGlow { display: none; }
}
