@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap");
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: #160d20;
}
body {
  margin: 0;
  min-height: 100vh;
  color: #fff0f5;
  font-family: "DM Sans", sans-serif;
  background: #160d20;
}
/* LOADING SCREEN */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(125, 62, 112, 0.3), transparent 60%),
    linear-gradient(160deg, #100b1b, #24132d 55%, #160d20);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1s ease,
    visibility 1s ease;
}
.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-screen::before {
  content: "✦       ·          ✧           ·       ✦";
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  color: rgba(255, 225, 240, 0.45);
  font-size: 19px;
  letter-spacing: 12px;
  text-align: center;
  animation: loadingTwinkle 3s ease-in-out infinite alternate;
}
.loading-screen::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(245, 166, 211, 0.08);
  filter: blur(75px);
  pointer-events: none;
}
.loading-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  text-align: center;
  animation: loadingAppear 1.2s ease both;
}
.loading-eyebrow {
  margin-bottom: 23px;
  color: #eab4d1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
}
.loading-title {
  margin: 0 auto;
  color: #fff0f7;
  font-family: "Playfair Display", serif;
  font-size: clamp(31px, 7vw, 43px);
  font-weight: 500;
  line-height: 1.35;
  text-shadow: 0 0 30px rgba(246, 173, 212, 0.25);
}
.loading-title span {
  color: #f5b4d5;
}
.loading-subtitle {
  margin: 17px 0 45px;
  color: #dcbfd2;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.loading-bar {
  position: relative;
  width: 100%;
  height: 5px;
  border: 1px solid rgba(255, 220, 240, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
}
.loading-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d78eb8, #ffe1f0);
  box-shadow: 0 0 13px rgba(245, 180, 213, 0.65);
  animation: loadingProgress 3.8s ease-in-out forwards;
}
.loading-heart {
  position: absolute;
  top: -16px;
  left: 0;
  color: #ffe1ef;
  font-size: 17px;
  text-shadow: 0 0 14px #ffcce3;
  animation: loadingHeart 3.8s ease-in-out forwards;
}
.loading-dots {
  margin-top: 24px;
  color: #cda8c1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
}
.loading-dots span::after {
  content: "";
  animation: loadingDots 1.5s steps(4, end) infinite;
}
/* THE UNIVERSE */
.world {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px 20px;
  opacity: 1;
  transition: opacity 1s ease;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(113, 55, 105, 0.34), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(105, 44, 93, 0.22), transparent 45%),
    linear-gradient(160deg, #100b1b 0%, #24132d 48%, #160d20 100%);
}
body.is-loading .world {
  opacity: 0;
}
/* DISTANT STARS */
.world::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 18%, #fff4fa 50%, transparent 100%),
    radial-gradient(1px 1px at 22% 72%, #f8cce5 50%, transparent 100%),
    radial-gradient(2px 2px at 35% 27%, #fff 50%, transparent 100%),
    radial-gradient(1px 1px at 48% 83%, #fff0f7 50%, transparent 100%),
    radial-gradient(2px 2px at 64% 15%, #fbd8ee 50%, transparent 100%),
    radial-gradient(1px 1px at 78% 66%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 91% 34%, #fbd8ee 50%, transparent 100%),
    radial-gradient(1px 1px at 84% 90%, #fff 50%, transparent 100%);
  background-size: 100% 100%;
  animation: starTwinkle 5s ease-in-out infinite alternate;
}
.world::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 260px;
  height: 260px;
  top: 5%;
  right: 5%;
  border-radius: 50%;
  background: rgba(245, 166, 211, 0.08);
  filter: blur(75px);
  pointer-events: none;
}
/* STAR DECORATION */
.stars {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 9vh 5vw;
  color: #ffe1f0;
  font-size: 17px;
  letter-spacing: 8px;
  opacity: 0.55;
  pointer-events: none;
}
.footer {
  display: none !important;
}
/* METEOR SYSTEM */
.meteor-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.meteor {
  position: absolute;
  display: block;
  width: 145px;
  height: 2px;
  border-radius: 50%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 205, 232, 0.45), #fff, #f5b4d5);
  box-shadow:
    0 0 7px #fff,
    0 0 16px #f5b4d5,
    0 0 28px rgba(245, 180, 213, 0.55);
  animation: meteorTravel 6s linear infinite;
}
.meteor-1 {
  top: 5%;
  left: -160px;
  animation-delay: 0s;
}
.meteor-2 {
  top: 20%;
  left: -160px;
  animation-delay: 1.5s;
}
.meteor-3 {
  top: 35%;
  left: -160px;
  animation-delay: 3s;
}
.meteor-4 {
  top: 50%;
  left: -160px;
  animation-delay: 4.5s;
}
/* THE MOON */
.moon {
  position: absolute;
  z-index: 1;
  top: 10%;
  right: 13%;
  width: 120px;
  height: 120px;
  pointer-events: none;
  animation: moonFloat 8s ease-in-out infinite;
}
.moon::after {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 222, 239, 0.18) 0%,
    rgba(246, 183, 215, 0.09) 40%,
    transparent 72%
  );
  filter: blur(8px);
}
.moon::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  border-radius: 50%;
  background-color: #f5d9e6;
  background-image:
    radial-gradient(ellipse at 28% 30%, rgba(155, 112, 139, 0.38) 0 5%, transparent 6%),
    radial-gradient(ellipse at 67% 22%, rgba(166, 119, 147, 0.28) 0 8%, transparent 9%),
    radial-gradient(ellipse at 72% 65%, rgba(166, 119, 147, 0.3) 0 7%, transparent 8%),
    radial-gradient(ellipse at 36% 72%, rgba(166, 119, 147, 0.25) 0 10%, transparent 11%),
    radial-gradient(ellipse at 49% 47%, rgba(177, 129, 155, 0.25) 0 5%, transparent 6%),
    radial-gradient(circle at 32% 25%, #fff9fc 0%, #f9e8ef 32%, #e7c4d6 72%, #bd91ac 100%);
  box-shadow:
    inset -10px -8px 20px rgba(99, 54, 91, 0.22),
    inset 5px 5px 15px rgba(255, 255, 255, 0.8),
    0 0 25px rgba(255, 215, 237, 0.3),
    0 0 55px rgba(245, 178, 213, 0.17);
}
/* OPENING CONTENT */
.welcome {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  text-align: center;
  padding: 35px 20px;
  animation: welcomeAppear 1.4s ease both;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    filter 0.28s ease;
}
.welcome.is-transitioning {
  opacity: 0;
  transform: translateY(13px) scale(0.985);
  filter: blur(5px);
}
.eyebrow {
  margin-bottom: 22px;
  color: #f4b9d8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.8;
}
h1 {
  margin: 0;
  color: #fff0f7;
  font-family: "Playfair Display", serif;
  font-size: clamp(58px, 12vw, 92px);
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 0 35px rgba(246, 173, 212, 0.3);
}
.subtitle {
  max-width: 390px;
  margin: 20px auto 32px;
  color: #e8ccdc;
  font-size: 16px;
  line-height: 1.9;
}
/* PART ONE — LEONID */
.chapter-one {
  position: relative;
  padding: 10px 0;
  animation: welcomeAppear 0.8s ease both;
}
.welcome:has(.chapter-one) {
  max-width: 590px;
  padding: 48px 35px;
  border: 1px solid rgba(255, 211, 234, 0.25);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(246, 183, 215, 0.13), transparent 65%),
    linear-gradient(145deg, rgba(255, 228, 243, 0.09), rgba(112, 67, 112, 0.09));
  box-shadow:
    0 20px 65px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 45px rgba(221, 145, 190, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.welcome:has(.chapter-one)::before {
  content: "✧";
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffd8ec;
  font-size: 27px;
  text-shadow: 0 0 18px rgba(255, 190, 222, 0.8);
}
.chapter-one .eyebrow {
  margin-bottom: 19px;
  color: #f6bfdc;
  font-size: 10px;
  letter-spacing: 3.5px;
}
.chapter-one h2 {
  margin: 0 auto;
  color: #fff0f7;
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 500;
  line-height: 1.25;
  text-shadow: 0 0 25px rgba(246, 173, 212, 0.25);
}
.chapter-one-text {
  max-width: 440px;
  margin: 25px auto 20px;
  color: #f0dce9;
  font-size: 15px;
  line-height: 2;
}
.chapter-one-question {
  max-width: 410px;
  margin: 22px auto 30px;
  color: #f5bcd9;
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-style: italic;
  line-height: 1.7;
}
.chapter-one > button {
  padding: 16px 30px;
  border-color: rgba(255, 237, 247, 0.85);
  background: linear-gradient(135deg, #ffe4f1, #f4b6d5);
  box-shadow:
    0 7px 28px rgba(238, 139, 192, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* BUTTONS */
button {
  position: relative;
  z-index: 3;
  padding: 15px 28px;
  border: 1px solid rgba(255, 224, 240, 0.65);
  border-radius: 50px;
  color: #381b31;
  background: linear-gradient(135deg, #ffd5e9, #f2a9ce);
  box-shadow: 0 5px 25px rgba(238, 139, 192, 0.2);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
button:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 32px rgba(238, 139, 192, 0.38);
}
button:active {
  transform: scale(0.97);
}
/* CHAPTER LAYOUTS */
.garden,
.story,
.mystery,
.finale {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  margin: auto;
  text-align: center;
  padding: 30px 15px;
  animation: welcomeAppear 0.8s ease both;
}
.garden h2,
.story h2,
.mystery h2,
.finale h2 {
  color: #ffe1ef;
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 500;
}
.flowers,
.choices {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px auto;
}
.flower,
.choice {
  min-width: 100px;
  padding: 17px 15px;
  border: 1px solid rgba(255, 210, 233, 0.3);
  border-radius: 18px;
  color: #ffe7f3;
  background: rgba(255, 224, 241, 0.08);
  cursor: pointer;
  transition: 0.25s ease;
}
.flower:hover,
.choice:hover {
  background: rgba(255, 195, 224, 0.18);
  transform: translateY(-4px);
}
.flower.unlocked {
  border-color: #f6b8d7;
  background: rgba(246, 184, 215, 0.2);
}
.flower-message,
.choice-result,
.mystery-result {
  margin: 22px auto;
  color: #f7d7e8;
  line-height: 1.9;
  animation: welcomeAppear 0.5s ease both;
}
.progress,
.story-progress {
  color: #e8b6d3;
  font-size: 13px;
  letter-spacing: 1px;
}
.riddle {
  margin: 25px auto;
  color: #f5ddeb;
  line-height: 2;
}
.answer-input {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 18px auto;
  padding: 14px 17px;
  border: 1px solid rgba(255, 210, 233, 0.4);
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  text-align: center;
}
.answer-input:focus {
  border-color: #f5b4d5;
}
.treasure {
  margin: 25px auto;
  color: #ffd8ed;
  font-size: 42px;
}
/* BIRTHDAY FINALE */
.envelope {
  position: relative;
  width: 150px;
  height: 105px;
  margin: 35px auto;
  border: 1px solid #f7c5df;
  border-radius: 8px;
  color: #6d3154;
  background: linear-gradient(145deg, #ffe5f1, #f3b4d3);
  font-size: 38px;
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  animation: envelopeFloat 3s ease-in-out infinite;
}
.envelope-seal {
  position: absolute;
  top: 37%;
  left: 42%;
  font-size: 25px;
}
.letter {
  max-width: 480px;
  margin: 25px auto;
  padding: 28px 23px;
  border: 1px solid #f5c6dd;
  border-radius: 18px;
  color: #53364a;
  background: #fff0f6;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  line-height: 1.9;
  text-align: left;
  animation: letterReveal 0.8s ease both;
}
.letter-signature {
  margin-top: 25px;
  color: #b34f86;
  font-family: "Playfair Display", serif;
  font-size: 21px;
}
/* ANIMATIONS */
@keyframes loadingAppear {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes loadingTwinkle {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 0.8;
  }
}
@keyframes loadingProgress {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}
@keyframes loadingHeart {
  0% {
    left: 0;
  }
  100% {
    left: calc(100% - 13px);
  }
}
@keyframes loadingDots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}
@keyframes starTwinkle {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 0.8;
  }
}
@keyframes moonFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
/* STRAIGHT-LINE DIAGONAL METEOR MOVEMENT */
@keyframes meteorTravel {
  0% {
    transform: translate(0, 0) rotate(35deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  38% {
    transform: translate(120vw, 84vw) rotate(35deg);
    opacity: 0;
  }
  100% {
    transform: translate(120vw, 84vw) rotate(35deg);
    opacity: 0;
  }
}
@keyframes welcomeAppear {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes envelopeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}
@keyframes letterReveal {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* PHONE AND TABLET */
@media (max-width: 600px) {
  .world {
    padding: 25px 16px;
  }
  .moon {
    top: 6%;
    right: 5%;
    width: 90px;
    height: 90px;
  }
  .moon::before {
    inset: 10px;
  }
  .welcome {
    padding: 25px 10px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .subtitle {
    font-size: 14px;
  }
  .welcome:has(.chapter-one) {
    padding: 42px 22px;
    border-radius: 25px;
  }
  .chapter-one .eyebrow {
    font-size: 9px;
    letter-spacing: 2.5px;
  }
  .chapter-one-text {
    font-size: 14px;
    line-height: 1.9;
  }
  .chapter-one-question {
    font-size: 17px;
  }
  .flowers,
  .choices {
    gap: 9px;
  }
  .flower,
  .choice {
    min-width: 85px;
    padding: 14px 10px;
  }
  .letter {
    padding: 22px 18px;
  }
}
/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
/* FORCE LOADING HEART TO BABY PINK */
.loading-heart {
  font-size: 0 !important;
  color: transparent !important;
  text-shadow: none !important;
}

.loading-heart::after {
  content: "♥︎";
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 19px;
  color: #ffe1ef !important;
  text-shadow:
    0 0 5px #ffe1ef,
    0 0 12px #ffcce3,
    0 0 20px #ffcce3;
}
