:root {
  --pink: #ffd6e0;
  --lavender: #e6ccff;
  --cream: #fff5f7;
  --peach: #ffe5cc;
  --rose: #ff86b6;
  --violet: #7d62a8;
  --text: #6b587f;
  --title: #6f4c98;
  --shadow: 0 16px 35px rgba(113, 91, 150, 0.16);
  --soft-glow: 0 0 26px rgba(255, 134, 182, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  --parallax-x: 0px;
  --parallax-y: 0px;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: linear-gradient(140deg, var(--pink) 0%, var(--lavender) 52%, var(--peach) 100%);
  background-size: 220% 220%;
  animation: gradientShift 22s ease-in-out infinite;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

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

.bg-glow {
  position: fixed;
  inset: -25%;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.45), transparent 35%),
    radial-gradient(circle at 80% 18%, rgba(255, 170, 204, 0.35), transparent 40%),
    radial-gradient(circle at 66% 80%, rgba(230, 204, 255, 0.48), transparent 42%),
    radial-gradient(circle at 20% 80%, rgba(255, 229, 204, 0.42), transparent 42%);
  filter: blur(24px);
  z-index: -3;
  animation: pulseGlow 9s ease-in-out infinite alternate;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0);
}

.virtual-hug-active {
  animation: hugZoom 900ms ease;
}

#heartContainer,
#sparkleContainer,
#loveWhisperContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.daily-surprise {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  color: #7a538f;
  animation: fadeInUpSoft 450ms ease;
}

.heart,
.sparkle,
.cursor-sparkle,
.love-whisper,
.click-heart,
.moment-heart {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}

.heart {
  color: rgba(255, 124, 179, 0.75);
  text-shadow: var(--soft-glow);
  animation: floatUp linear forwards;
}

.sparkle,
.cursor-sparkle {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
  animation: twinkle linear forwards;
}

.love-whisper {
  font-family: "Dancing Script", cursive;
  color: rgba(208, 88, 153, 0.85);
  text-shadow: 0 0 16px rgba(255, 190, 218, 0.7);
  white-space: nowrap;
  animation: whisperFloat linear forwards;
}

.click-heart {
  font-size: 14px;
  text-shadow: var(--soft-glow);
  animation: clickBurst 950ms ease-out forwards;
  z-index: 5;
  pointer-events: none;
}

.moment-heart {
  color: rgba(255, 174, 209, 0.95);
  text-shadow: var(--soft-glow);
  animation: momentHeartRise linear forwards;
  pointer-events: none;
  z-index: 1;
}

main {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 2.1rem 0 4.2rem;
  overflow-x: clip;
}

.section {
  margin-top: 2.15rem;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.card-glass {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  padding: clamp(1.2rem, 2.8vw, 2.2rem);
}

.hero {
  min-height: 64vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.75rem;
}

.tag {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #8c6eb0;
}

.hero-title,
.section-title {
  margin: 0;
  font-family: "Dancing Script", cursive;
  color: var(--title);
  line-height: 1.14;
  text-shadow: 0 7px 20px rgba(255, 134, 182, 0.38);
}

.hero-title {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  background: linear-gradient(120deg, #ff77ad, #9f77df, #ff9f96);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textFloat 3.2s ease-in-out infinite;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.section-title {
  font-size: clamp(2rem, 6vw, 3.1rem);
  text-align: center;
  letter-spacing: 0.02em;
}

.floating-love-note {
  margin: 0.35rem 0 0;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: #d05899;
  text-shadow: var(--soft-glow);
  animation: gentleFloat 4.6s ease-in-out infinite;
}

.mode-toggle-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.mode-btn {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.76);
  color: #6f4a90;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mode-btn.active {
  background: linear-gradient(120deg, #ffbdd6, #eedaff);
  box-shadow: 0 10px 18px rgba(139, 105, 174, 0.24);
}

.mode-btn:hover {
  transform: translateY(-2px);
}

.cute-divider {
  text-align: center;
  margin: 1.2rem 0 0.2rem;
  color: #c074ac;
  letter-spacing: 0.22rem;
  opacity: 0.9;
  user-select: none;
}

.btn {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.btn::after {
  content: "✨";
  position: absolute;
  top: -12px;
  left: -18px;
  opacity: 0;
  transform: rotate(-20deg);
  transition: transform 320ms ease, opacity 320ms ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  filter: saturate(1.08);
  animation: hoverBounce 380ms ease;
}

.btn:hover::after {
  opacity: 1;
  transform: translateX(125px) rotate(20deg);
}

.btn:active {
  animation: bounceTap 220ms ease;
}

.btn-primary {
  background: linear-gradient(120deg, #ffb6cf, #ffc6ef, #ffd8e7);
  color: #71365c;
  box-shadow: 0 10px 26px rgba(255, 138, 182, 0.38);
}

.btn-secondary {
  background: linear-gradient(120deg, #e4d4ff, #ffcde0, #ffd6cc);
  color: #5a387b;
  box-shadow: 0 10px 26px rgba(174, 131, 236, 0.3);
}

.btn-primary:hover,
.btn-secondary:hover {
  box-shadow: 0 14px 30px rgba(255, 135, 181, 0.42);
}

.hidden {
  display: none;
}

.typed-message {
  margin-top: 1rem;
  min-height: 150px;
  line-height: 1.83;
  font-size: 1.04rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.typed-message.typing::after {
  content: "|";
  color: #d45e9f;
  margin-left: 2px;
  animation: cursorBlink 850ms steps(1) infinite;
}

.reasons-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.reason-card {
  position: relative;
  padding: 1.1rem;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 228, 240, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 22px rgba(151, 121, 181, 0.16);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.reason-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 75%);
  opacity: 0;
  transform: translateX(-35%);
  transition: transform 340ms ease, opacity 340ms ease;
}

.reason-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 28px rgba(151, 121, 181, 0.26);
}

.reason-card:hover::before {
  opacity: 1;
  transform: translateX(35%);
}

.reason-card:active {
  transform: translateY(-3px);
}

.counter-value {
  font-size: clamp(1.2rem, 3.8vw, 1.8rem);
  text-align: center;
  font-weight: 700;
  color: #694e8d;
  margin: 1rem 0 0.4rem;
}

#daysCount {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  color: #ff4f98;
  text-shadow: var(--soft-glow);
}

.counter-note {
  margin: 0;
  text-align: center;
  opacity: 0.85;
}

#surpriseSection {
  text-align: center;
}

.surprise-message {
  margin-top: 1rem;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: #d63d87;
  text-shadow: var(--soft-glow);
  animation: popIn 500ms ease forwards;
}

.miss-me-btn {
  margin-top: 0.9rem;
}

.hug-message {
  margin: 0.5rem 0 0.95rem;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.2rem, 3.6vw, 1.9rem);
  color: #df5ea4;
  text-shadow: var(--soft-glow);
  animation: fadeInUpSoft 580ms ease;
}

.love-moment-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(82, 44, 99, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayFade 420ms ease;
}

.love-moment-card {
  width: min(620px, 90vw);
  text-align: center;
  box-shadow: 0 18px 44px rgba(113, 91, 150, 0.3);
  position: relative;
  z-index: 2;
}

.letters-modal {
  position: fixed;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  background: rgba(76, 45, 94, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.letters-modal-card {
  width: min(640px, 92vw);
  text-align: center;
}

.letters-modal-text {
  min-height: 130px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 0.8rem 0 1rem;
}

.letters-modal-text.typing::after {
  content: "|";
  color: #d45e9f;
  margin-left: 2px;
  animation: cursorBlink 850ms steps(1) infinite;
}

.open-when-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.universe-section {
  border-radius: 28px;
  padding: 1.4rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), transparent 38%),
    radial-gradient(circle at 80% 12%, rgba(190, 153, 255, 0.15), transparent 36%),
    linear-gradient(160deg, #2d2348, #3f2f5f, #4a345f);
  color: #f3e7ff;
  box-shadow: 0 14px 34px rgba(49, 28, 70, 0.32);
}

.universe-section .section-title {
  color: #ffd9f1;
  text-shadow: 0 0 20px rgba(255, 183, 222, 0.35);
}

.universe-subtitle {
  text-align: center;
  margin: 0.4rem 0 0.85rem;
  color: #e9d6ff;
}

.universe-stars {
  position: relative;
  min-height: 240px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 10, 28, 0.22);
  overflow: hidden;
}

.star-node {
  position: absolute;
  border: 0;
  background: transparent;
  color: #ffe8b0;
  text-shadow: 0 0 10px rgba(255, 241, 183, 0.9);
  cursor: pointer;
  animation: twinkleStar 3.2s ease-in-out infinite;
}

.star-node:hover {
  transform: scale(1.15);
}

.universe-message {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #ffe4f3;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.collector-meta {
  text-align: center;
  margin: 0.4rem 0 0.8rem;
}

.heart-game-area {
  position: relative;
  min-height: 220px;
  border-radius: 22px;
  border: 1px dashed rgba(132, 86, 165, 0.35);
  background: rgba(255, 255, 255, 0.36);
  overflow: hidden;
}

.collector-heart {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: driftHeart 4.4s ease-in-out infinite alternate;
}

.collector-heart:active {
  transform: scale(0.9);
}

.heart-game-message {
  margin: 0.8rem 0 0;
  text-align: center;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.2rem, 3.6vw, 1.85rem);
  color: #d44f97;
}

.particle-petal {
  color: rgba(255, 183, 210, 0.88);
  animation-name: petalDrift;
}

.particle-sparkle {
  color: rgba(255, 244, 181, 0.95);
  animation-name: sparkleRise;
}

.particle-heart {
  color: rgba(255, 124, 179, 0.75);
  animation-name: floatUp;
}

.love-moment-message {
  margin: 0.9rem 0 1.1rem;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.5rem, 4.8vw, 2.35rem);
  color: #d5589b;
  text-shadow: var(--soft-glow);
  animation: fadeInUpSoft 900ms ease;
}

.music-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 15;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #ffd5e8, #e9d7ff);
  color: #6c4a93;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.music-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 28px rgba(117, 94, 152, 0.28);
}

.music-toggle.playing {
  animation: heartbeat 1.2s ease-in-out infinite;
}

.footer {
  text-align: center;
  padding: 1.2rem 1rem 2.4rem;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: #7a5f96;
}

.heartbeat {
  animation: heartbeat 1.45s ease-in-out infinite;
}

.heartbeat-soft {
  display: inline-block;
  animation: heartbeat 1.95s ease-in-out infinite;
}

@keyframes textFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 40%;
  }

  50% {
    background-position: 100% 60%;
  }

  100% {
    background-position: 0% 40%;
  }
}

@keyframes hugZoom {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.07);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.08);
  }

  52% {
    transform: scale(1.03);
  }
}

@keyframes hoverBounce {
  0% {
    transform: translateY(-3px) scale(1.02);
  }

  55% {
    transform: translateY(-5px) scale(1.07);
  }

  100% {
    transform: translateY(-3px) scale(1.05);
  }
}

@keyframes bounceTap {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(0.93);
  }

  100% {
    transform: scale(1.02);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }

  10%,
  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-120vh) scale(1.3);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }

  20%,
  80% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.2) translateY(-20vh);
  }
}

@keyframes cursorBlink {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes whisperFloat {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }

  10%,
  80% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translateY(-90px) scale(1.05);
  }
}

@keyframes clickBurst {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.6);
  }

  100% {
    opacity: 0;
    transform: translateY(-42px) scale(1.5);
  }
}

@keyframes momentHeartRise {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }

  20%,
  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-70vh) scale(1.2);
  }
}

@keyframes overlayFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUpSoft {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.75) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes driftHeart {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-12px) scale(1.08);
  }
}

@keyframes twinkleStar {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.95);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes petalDrift {
  0% {
    opacity: 0;
    transform: translateY(30px) translateX(0) rotate(0deg) scale(0.8);
  }

  20%,
  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-105vh) translateX(30px) rotate(180deg) scale(1.1);
  }
}

@keyframes sparkleRise {
  0% {
    opacity: 0;
    transform: translateY(35px) scale(0.7);
  }

  15%,
  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-95vh) scale(1.15);
  }
}

@media (max-width: 768px) {
  main {
    width: 94vw;
    padding: 1.5rem 0 3.2rem;
  }

  .section {
    margin-top: 1.6rem;
  }

  .card-glass {
    border-radius: 28px;
    padding: 1.1rem;
  }

  .hero {
    min-height: 56vh;
  }

  .hero-title {
    font-size: clamp(2.4rem, 11vw, 4.2rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 7.2vw, 2.5rem);
  }

  .hero-subtitle,
  .typed-message,
  .counter-note {
    font-size: clamp(0.98rem, 2.8vw, 1.06rem);
  }

  .reasons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .cute-divider {
    letter-spacing: 0.16rem;
    margin: 0.95rem 0 0.1rem;
  }

  .btn {
    width: 100%;
    max-width: 360px;
  }

  .mode-toggle-wrap {
    width: 100%;
  }

  .mode-btn {
    flex: 1 1 30%;
  }

  .music-toggle {
    width: 52px;
    height: 52px;
    top: 10px;
    right: 10px;
    font-size: 1.08rem;
  }

  .love-moment-card {
    width: min(560px, 92vw);
  }

  .universe-stars,
  .heart-game-area {
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  main {
    width: 95vw;
    padding: 1rem 0 2.6rem;
  }

  .section {
    margin-top: 1.2rem;
  }

  .card-glass {
    border-radius: 22px;
    padding: 0.95rem;
  }

  .hero {
    min-height: 52vh;
    gap: 0.55rem;
  }

  .tag {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
  }

  .hero-title {
    font-size: clamp(2.15rem, 13vw, 3.1rem);
  }

  .section-title {
    font-size: clamp(1.7rem, 9vw, 2.2rem);
  }

  .floating-love-note {
    font-size: clamp(1.05rem, 5vw, 1.4rem);
  }

  .typed-message {
    min-height: 120px;
    line-height: 1.7;
  }

  .reasons-grid {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .reason-card {
    border-radius: 18px;
    padding: 0.95rem;
  }

  .btn {
    width: 100%;
    max-width: none;
    font-size: 0.98rem;
    margin-top: 0.3rem;
  }

  .music-toggle {
    width: 48px;
    height: 48px;
    top: 8px;
    right: 8px;
    font-size: 1rem;
  }

  .love-moment-message {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
  }

  .heart,
  .sparkle,
  .cursor-sparkle {
    transform: scale(0.8);
  }

  .daily-surprise {
    width: calc(100vw - 18px);
    max-width: 360px;
    font-size: 0.84rem;
    text-align: center;
    top: 8px;
  }

  .open-when-grid {
    grid-template-columns: 1fr;
  }

  .mode-btn {
    min-height: 44px;
  }

  .footer {
    font-size: 0.86rem;
    padding: 1rem 0.8rem 2rem;
  }

  .bg-glow {
    filter: blur(16px);
  }
}

@media (hover: none) {
  .btn:hover,
  .reason-card:hover {
    transform: none;
    filter: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .reason-card:active {
    transform: translateY(-2px);
  }

  .btn::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

