/* ===== Variables & Reset ===== */
:root {
  --pink-50: #fff5f8;
  --pink-100: #ffe4ec;
  --pink-200: #ffc8dd;
  --pink-300: #ffafcc;
  --pink-400: #ff85a8;
  --pink-500: #ff6b9d;
  --pink-600: #e84d7f;
  --rose-gold: #e8a0bf;
  --white-glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow-soft: 0 8px 32px rgba(255, 107, 157, 0.15);
  --shadow-glow: 0 0 40px rgba(255, 175, 204, 0.4);
  --font-main: 'Nunito', sans-serif;
  --font-script: 'Pacifico', cursive;
  --radius: 20px;
  --transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--pink-50) 0%, var(--pink-100) 40%, #fff0f5 100%);
  color: #5c3d4a;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: default;
}

/* ===== Glass morphism ===== */
.glass {
  background: var(--white-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

/* ===== Floating background ===== */
.floating-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 175, 204, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 200, 221, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 240, 245, 0.5) 0%, transparent 70%);
  animation: bgShift 12s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.05) rotate(1deg); }
}

/* ===== Particles ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 14px;
  opacity: 0.4;
  animation: floatParticle linear infinite;
  user-select: none;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ===== Cursor trail ===== */
#cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.trail-heart {
  position: absolute;
  font-size: 12px;
  pointer-events: none;
  animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.3) translateY(-20px); }
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  border-radius: 50px;
  animation: slideDown 0.8s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--pink-600);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: #7a5060;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--pink-500);
  transition: width 0.3s;
  border-radius: 2px;
}

.nav-links a:hover { color: var(--pink-600); }
.nav-links a:hover::after { width: 100%; }

.music-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.music-toggle:hover { transform: scale(1.1); box-shadow: var(--shadow-glow); }
.music-toggle.playing { animation: pulse 1s ease infinite; }

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-bow {
  font-size: 3rem;
  animation: bounce 2s ease infinite;
  margin-bottom: 8px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-kitty {
  margin-bottom: 24px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.kitty-face {
  position: relative;
  width: 100px;
  height: 90px;
  background: white;
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.2);
}

.kitty-ear {
  position: absolute;
  top: -18px;
  width: 28px;
  height: 28px;
  background: white;
  border-radius: 50% 50% 0 0;
  box-shadow: inset 0 -4px 0 var(--pink-200);
}

.kitty-ear.left { left: 8px; transform: rotate(-15deg); }
.kitty-ear.right { right: 8px; transform: rotate(15deg); }

.kitty-bow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  z-index: 2;
}

.kitty-eyes {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-top: 28px;
}

.kitty-eyes span {
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  animation: blink 4s ease infinite;
}

@keyframes blink {
  0%, 48%, 52%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.1); }
}

.kitty-nose {
  display: block;
  width: 10px;
  height: 8px;
  background: var(--pink-400);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  margin: 6px auto 0;
}

.hero-tag {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--pink-500);
  margin-bottom: 12px;
}

.shimmer {
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600), var(--pink-400));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title .line {
  display: block;
}

.gradient-text {
  font-family: var(--font-script);
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600), var(--rose-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: #8a6070;
  max-width: 520px;
  min-height: 2em;
  margin-bottom: 40px;
}

.hero-counter {
  padding: 28px 36px;
  border-radius: var(--radius);
  margin-bottom: 36px;
  max-width: 520px;
  width: 100%;
}

.counter-label {
  font-size: 0.9rem;
  color: #8a6070;
  margin-bottom: 20px;
}

.counter-label strong { color: var(--pink-600); }

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.counter-unit { text-align: center; }

.counter-num {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  color: var(--pink-600);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.counter-name {
  font-size: 0.65rem;
  color: #9a7080;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 50px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255, 107, 157, 0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 32px rgba(255, 107, 157, 0.45);
}

.btn-secondary {
  padding: 10px 24px;
  background: transparent;
  border: 2px solid var(--pink-300);
  color: var(--pink-600);
  border-radius: 50px;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--pink-100);
  transform: scale(1.05);
}

.pulse { animation: pulse 2s ease infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(255, 107, 157, 0.35); }
  50% { box-shadow: 0 6px 40px rgba(255, 107, 157, 0.55); }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 2;
  padding: 100px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink-600);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #5c3d4a;
  margin-bottom: 12px;
}

.section-desc {
  color: #8a6070;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Timeline ===== */
.timeline {
  display: grid;
  gap: 24px;
  margin-bottom: 48px;
}

.timeline-card {
  padding: 28px 32px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  transition: transform 0.4s, box-shadow 0.4s;
}

.timeline-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-glow);
}

.timeline-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink-100);
  border-radius: 16px;
}

.timeline-card h3 {
  font-size: 1.2rem;
  color: var(--pink-600);
  margin-bottom: 8px;
}

.timeline-card p {
  color: #7a5060;
  line-height: 1.7;
  grid-column: 2;
}

.story-quote {
  text-align: center;
  padding: 32px;
  border-radius: var(--radius);
}

.story-quote p {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--pink-600);
  margin-bottom: 20px;
  min-height: 2em;
  transition: opacity 0.3s;
}

.story-quote p.fade { opacity: 0; }

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Love Note — Death Note Book ===== */
.love-note-section {
  background: linear-gradient(180deg, transparent, rgba(30, 10, 20, 0.08), transparent);
}

.love-note-container {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.death-note-book {
  position: relative;
  width: 100%;
  max-width: 720px;
  min-height: 440px;
}

.book-open {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 440px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.death-note-book.is-open .book-closed {
  display: none;
}

.death-note-book.is-open .book-open {
  display: grid;
  animation: bookOpenAnim 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-closed.opening {
  animation: coverFlipOpen 1s ease forwards;
  transform-origin: left center;
  pointer-events: none;
}

@keyframes coverFlipOpen {
  0% { transform: perspective(1200px) rotateY(0) scale(1); opacity: 1; }
  40% { transform: perspective(1200px) rotateY(-30deg) scale(1.05); opacity: 1; }
  100% { transform: perspective(1200px) rotateY(-90deg) scale(0.95); opacity: 0; }
}

.book-closed {
  cursor: pointer;
  position: relative;
  width: 280px;
  height: 400px;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.book-closed:hover {
  transform: scale(1.03) rotateY(-5deg);
}

.book-cover-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1a0a12 0%, #2d1525 40%, #1a0810 100%);
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 107, 157, 0.2),
    inset 0 -2px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 107, 157, 0.15);
  overflow: hidden;
}

.cover-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 107, 157, 0.08) 50%, transparent 60%);
  animation: coverShine 4s ease infinite;
}

@keyframes coverShine {
  0%, 100% { transform: translateX(-30%) rotate(25deg); }
  50% { transform: translateX(30%) rotate(25deg); }
}

.cover-symbol {
  font-size: 4rem;
  color: var(--pink-500);
  text-shadow: 0 0 30px rgba(255, 107, 157, 0.8);
  margin-bottom: 16px;
  position: relative;
  animation: symbolPulse 3s ease infinite;
}

@keyframes symbolPulse {
  0%, 100% { text-shadow: 0 0 30px rgba(255, 107, 157, 0.8); }
  50% { text-shadow: 0 0 50px rgba(255, 107, 157, 1); }
}

.cover-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: #f0c0d0;
  letter-spacing: 6px;
  position: relative;
}

.cover-author {
  font-size: 0.75rem;
  color: rgba(255, 175, 204, 0.6);
  margin-top: 8px;
  letter-spacing: 2px;
  position: relative;
}

.cover-hint {
  position: absolute;
  bottom: 24px;
  font-size: 0.75rem;
  color: rgba(255, 175, 204, 0.5);
  animation: bounce 2s ease infinite;
}

.book-spine {
  position: absolute;
  left: -12px;
  top: 4px;
  bottom: 4px;
  width: 16px;
  background: linear-gradient(90deg, #0d0508, #1a0810);
  border-radius: 2px 0 0 2px;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.3);
}

.book-pages-edge {
  position: absolute;
  right: -6px;
  top: 8px;
  bottom: 8px;
  width: 12px;
  background: repeating-linear-gradient(
    180deg,
    #f5f0e8 0px, #f5f0e8 2px,
    #e8e0d0 2px, #e8e0d0 4px
  );
  border-radius: 0 2px 2px 0;
}

.book-open {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 440px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

@keyframes bookOpenAnim {
  from { opacity: 0; transform: scale(0.88) rotateX(8deg); }
  to { opacity: 1; transform: scale(1) rotateX(0); }
}

.book-left-page {
  background: linear-gradient(135deg, #1a0a12, #2a1520);
  padding: 32px 28px;
  color: #d4a0b0;
  border-right: 1px solid rgba(255, 107, 157, 0.1);
}

.rules-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  color: var(--pink-300);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.death-rules {
  list-style: none;
  counter-reset: rules;
  font-size: 0.82rem;
  line-height: 1.9;
}

.death-rules li {
  counter-increment: rules;
  margin-bottom: 12px;
  padding-left: 28px;
  position: relative;
}

.death-rules li::before {
  content: counter(rules) ".";
  position: absolute;
  left: 0;
  color: var(--pink-500);
  font-weight: 700;
}

.rules-footer {
  margin-top: 32px;
  font-style: italic;
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: right;
}

.book-right-page {
  background: linear-gradient(#fffef5, #faf6ee);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.page-texture {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(200, 180, 160, 0.25) 27px,
    rgba(200, 180, 160, 0.25) 28px
  );
  pointer-events: none;
}

.page-instruction {
  position: relative;
  font-size: 0.9rem;
  color: #5c3d4a;
  margin-bottom: 20px;
  line-height: 1.6;
}

.death-note-input {
  position: relative;
  width: 100%;
  padding: 16px 12px;
  border: none;
  border-bottom: 2px solid rgba(255, 107, 157, 0.3);
  background: transparent;
  font-family: 'Permanent Marker', cursive;
  font-size: 2rem;
  color: #2a0818;
  text-align: center;
  margin-bottom: 24px;
  transition: border-color 0.3s, text-shadow 0.3s;
}

.death-note-input:focus {
  outline: none;
  border-bottom-color: var(--pink-500);
}

.death-note-input.writing {
  text-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
}

.btn-seal {
  position: relative;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2a0818, #4a1528);
  color: var(--pink-200);
  border: 1px solid rgba(255, 107, 157, 0.3);
  border-radius: 8px;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.btn-seal:hover {
  background: linear-gradient(135deg, #4a1528, #6a2040);
  box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
  transform: scale(1.02);
}

.written-names {
  position: relative;
  margin-top: 24px;
  min-height: 60px;
}

.written-name {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.8rem;
  color: #2a0818;
  text-align: center;
  padding: 12px 0;
  animation: nameSeal 1.2s ease;
  text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
}

@keyframes nameSeal {
  0% { opacity: 0; transform: scale(1.5); filter: blur(8px); color: var(--pink-600); }
  50% { color: #ff0040; text-shadow: 0 0 40px rgba(255, 0, 64, 0.8); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); color: #2a0818; }
}

.sealed-banner {
  position: relative;
  margin-top: 16px;
  padding: 12px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.15), transparent);
  text-align: center;
  animation: sealGlow 2s ease infinite;
}

.sealed-banner span {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.85rem;
  color: var(--pink-600);
  letter-spacing: 2px;
}

@keyframes sealGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.note-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.note-sparkle {
  position: absolute;
  font-size: 20px;
  animation: sparklePop 1s ease forwards;
}

@keyframes sparklePop {
  0% { opacity: 1; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  100% { opacity: 0; transform: scale(0.5) rotate(360deg) translateY(-40px); }
}

/* ===== Garden — SVG Rose ===== */
.garden-scene {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.garden-bg {
  height: 120px;
  background: linear-gradient(180deg, #ffd6e8 0%, #fff0f5 100%);
  position: relative;
}

.garden-sun {
  position: absolute;
  top: 20px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, #ffe066, #ffb347);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 200, 100, 0.5);
  animation: sunPulse 4s ease infinite;
}

.garden-cloud {
  position: absolute;
  top: 30px;
  left: 15%;
  width: 70px;
  height: 24px;
  background: white;
  border-radius: 50px;
  opacity: 0.85;
  animation: cloudDrift 30s linear infinite;
}

.garden-cloud::before,
.garden-cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.garden-cloud::before { width: 32px; height: 32px; top: -16px; left: 8px; }
.garden-cloud::after { width: 40px; height: 28px; top: -12px; left: 24px; }

@keyframes cloudDrift {
  0% { transform: translateX(-20px); }
  100% { transform: translateX(calc(100vw + 20px)); }
}

@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 200, 100, 0.5); }
  50% { box-shadow: 0 0 60px rgba(255, 200, 100, 0.7); }
}

.garden-stage {
  background: linear-gradient(180deg, #e8f5d0 0%, #c5e89a 100%);
  padding: 24px 24px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 300px;
  position: relative;
  flex: 1;
}

.plant-wrap {
  position: relative;
  width: 180px;
  height: 240px;
  margin: 0 auto;
  transform: translateY(-8px);
}

/* ===== CSS Rose ===== */
.rose-plant {
  position: relative;
  width: 100%;
  height: 100%;
}

.rp-pot {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 55px;
  background: linear-gradient(145deg, #e8a0bf, #c9758d);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.rp-pot-rim {
  position: absolute;
  top: -10px;
  left: -8px;
  right: -8px;
  height: 16px;
  background: linear-gradient(145deg, #f0b0c8, #d4849a);
  border-radius: 5px;
}

.rp-soil {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 14px;
  background: #5c3d2e;
  border-radius: 50%;
}

.rp-stem {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 0;
  background: linear-gradient(to top, #3d7a32, #6bc45a);
  border-radius: 3px;
  transition: height 1s ease;
  z-index: 3;
}

.rp-stem.grow { height: 110px; }

.rp-leaf {
  position: absolute;
  width: 28px;
  height: 14px;
  background: #4a9e4a;
  border-radius: 0 70% 0 70%;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 3;
}

.rp-leaf.visible { opacity: 1; }

.rp-leaf.leaf-a {
  bottom: 100px;
  left: calc(50% - 32px);
  transform: rotate(-35deg);
}

.rp-leaf.leaf-b {
  bottom: 130px;
  left: calc(50% + 4px);
  transform: rotate(30deg);
  background: #3d8b3d;
}

.rp-flower {
  position: absolute;
  bottom: 148px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 90px;
  height: 90px;
  z-index: 4;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.rp-flower.visible {
  transform: translateX(-50%) scale(0.55);
}

.rp-flower.bloom {
  transform: translateX(-50%) scale(1);
  animation: roseGlow 2s ease infinite alternate;
}

@keyframes roseGlow {
  from { filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.3)); }
  to { filter: drop-shadow(0 6px 20px rgba(255, 107, 157, 0.55)); }
}

.rp-petals {
  position: absolute;
  inset: 0;
}

.rp-petal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 44px;
  margin: -44px 0 0 -16px;
  transform-origin: 50% 100%;
  background: linear-gradient(160deg, #ffb3d0 0%, #ff6b9d 50%, #d63384 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -2px -3px 6px rgba(0,0,0,0.08);
}

.rp-petal:nth-child(1)  { transform: rotate(0deg); }
.rp-petal:nth-child(2)  { transform: rotate(45deg); }
.rp-petal:nth-child(3)  { transform: rotate(90deg); }
.rp-petal:nth-child(4)  { transform: rotate(135deg); }
.rp-petal:nth-child(5)  { transform: rotate(180deg); }
.rp-petal:nth-child(6)  { transform: rotate(225deg); }
.rp-petal:nth-child(7)  { transform: rotate(270deg); }
.rp-petal:nth-child(8)  { transform: rotate(315deg); }

.rp-petal.mid {
  width: 24px;
  height: 34px;
  margin: -34px 0 0 -12px;
  background: linear-gradient(160deg, #ff85a8, #e84d7f);
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
}

.rp-petal:nth-child(9)  { transform: rotate(22deg); }
.rp-petal:nth-child(10) { transform: rotate(72deg); }
.rp-petal:nth-child(11) { transform: rotate(122deg); }
.rp-petal:nth-child(12) { transform: rotate(172deg); }
.rp-petal:nth-child(13) { transform: rotate(222deg); }

.rp-petal.inner {
  width: 16px;
  height: 22px;
  margin: -22px 0 0 -8px;
  background: linear-gradient(160deg, #ff6b9d, #e84d7f);
}

.rp-petal:nth-child(14) { transform: rotate(10deg); }
.rp-petal:nth-child(15) { transform: rotate(70deg); }
.rp-petal:nth-child(16) { transform: rotate(130deg); }

.rp-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #ffafcc, #e84d7f);
  border-radius: 50%;
  z-index: 5;
  box-shadow: 0 0 8px rgba(255, 107, 157, 0.5);
}

.water-stream {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, transparent, #87ceeb, #5ba3d9);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
}

.water-stream.active {
  opacity: 0.8;
  height: 80px;
  animation: waterFlow 0.3s ease infinite;
}

@keyframes waterFlow {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  50% { transform: translateX(-50%) scaleY(1.05); }
}

.garden-controls {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  padding: 16px 20px 20px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 5;
  border-top: 1px solid rgba(255, 175, 204, 0.3);
}

.water-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink-600);
}

.meter-track {
  flex: 1;
  height: 12px;
  background: var(--pink-100);
  border-radius: 6px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #87ceeb, var(--pink-400), var(--pink-600));
  border-radius: 6px;
  transition: width 0.15s linear;
}

.water-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255, 107, 157, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.water-btn:active, .water-btn.active {
  transform: scale(0.96);
  box-shadow: 0 2px 12px rgba(255, 107, 157, 0.5);
}

.water-btn-icon { font-size: 1.4rem; }

.garden-hint {
  font-size: 0.8rem;
  color: #7a5060;
  text-align: center;
}

.bloom-message {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  animation: bloomReveal 0.8s ease;
}

.bloom-message p {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--pink-600);
}

@keyframes bloomReveal {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.plant-wrap.shake { animation: plantShake 0.4s ease; }

@keyframes plantShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

/* ===== Flip cards ===== */
.flip-hint {
  text-align: center;
  color: #8a6070;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.flip-card {
  height: 220px;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  padding: 28px;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #fff8fb 0%, #ffe8f0 100%);
  border: 1px solid rgba(255, 175, 204, 0.5);
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.12);
  transform-style: preserve-3d;
}

.flip-front {
  transform: rotateY(0deg) translateZ(1px);
}

.flip-back {
  transform: rotateY(180deg) translateZ(1px);
}

.card-deco {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.flip-label {
  font-size: 0.9rem;
  color: var(--pink-500);
  font-weight: 600;
}

.reason-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.flip-back h3 {
  color: var(--pink-600);
  margin-bottom: 8px;
}

.flip-back p {
  color: #7a5060;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===== Envelope letter ===== */
.letter-section {
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
}

.envelope-wrap {
  text-align: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.envelope-hint {
  font-size: 0.9rem;
  color: #8a6070;
  margin-bottom: 20px;
  padding: 0 16px;
  line-height: 1.5;
  animation: bounce 2s ease infinite;
}

.envelope-hint.hidden { display: none; }

.envelope {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto 8px;
  cursor: pointer;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.envelope:hover:not(.opened) {
  transform: scale(1.03);
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #ffc8dd, #ffafcc);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(255, 107, 157, 0.25);
}

.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, #ffb8d0, #ff9ec5);
  clip-path: polygon(0 100%, 50% 35%, 100% 100%);
  border-radius: 0 0 6px 6px;
  z-index: 3;
  transition: opacity 0.5s;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, #ffafcc, #ff85a8);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.7s ease;
}

.envelope.opened .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.opened .envelope-front {
  opacity: 0.4;
}

.envelope-seal {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.2rem;
  z-index: 5;
  transition: opacity 0.4s, transform 0.4s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.envelope.opened .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.letter-paper {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.6s ease,
              margin-top 0.6s ease;
}

.letter-paper.visible {
  max-height: 800px;
  opacity: 1;
  margin-top: 28px;
}

.letter-paper .letter-content {
  background: #fffef8;
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(255, 107, 157, 0.2);
  border: 1px solid rgba(255, 175, 204, 0.4);
  animation: letterSlideIn 0.8s ease;
}

@keyframes letterSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.letter-content h2 {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--pink-600);
  margin-bottom: 16px;
}

.letter-content p {
  color: #7a5060;
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.letter-sign {
  margin-top: 20px !important;
  font-style: italic;
}

.signature {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--pink-500);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px;
  margin: 0 24px 24px;
  border-radius: var(--radius);
}

.footer p { color: #7a5060; }
.footer strong { color: var(--pink-600); }

.footer-sub {
  font-size: 0.85rem;
  margin-top: 8px;
  opacity: 0.7;
}

.footer-hearts {
  margin-top: 12px;
  animation: bounce 2s ease infinite;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: white;
  border-radius: 50px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(255, 107, 157, 0.4);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 16px;
    gap: 12px;
    width: calc(100% - 32px);
  }

  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.8rem; }

  .hero-counter { padding: 20px; }
  .counter-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .book-open {
    grid-template-columns: 1fr;
  }

  .book-left-page { border-right: none; border-bottom: 1px solid rgba(255, 107, 157, 0.1); }

  .book-closed { width: 240px; height: 340px; }

  .envelope { width: 280px; height: 180px; }

  .timeline-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .timeline-icon { margin: 0 auto; }
  .timeline-card p { grid-column: 1; }
}
