
:root {
  --bg-top: #03011a;
  --bg-bottom: #120018;
  --glow-soft: rgba(255, 68, 102, 0.24);
  --glow-blue: rgba(74, 136, 255, 0.25);
  --fur-primary: #7d5a46;
  --fur-shadow: #5a3c2d;
  --fur-light: #c9997a;
  --fur-highlight: #e8c3aa;
  --heart-red: #ff4b6c;
  --heart-shadow: rgba(255, 75, 108, 0.45);
  --blue-accent: #7194ff;
  --text-soft: rgba(235, 228, 255, 0.88);
  --card: rgba(12, 14, 36, 0.82);
  --card-border: rgba(112, 136, 255, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", "Segoe UI", "Helvetica Neue", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(110% 120% at 18% 22%, var(--glow-soft), transparent 60%),
    radial-gradient(120% 125% at 80% 10%, var(--glow-blue), transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: #fff;
  overflow: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.sky__heart {
  position: absolute;
  color: var(--heart-red);
  opacity: 0;
  filter: drop-shadow(0 0 18px var(--heart-shadow));
  animation: floatHeart var(--duration, 18s) linear infinite;
}

.sky__heart--one { left: 12%; bottom: -10%; }
.sky__heart--two { left: 48%; bottom: -18%; }
.sky__heart--three { right: 12%; bottom: -14%; }
.sky__heart--four { left: 72%; bottom: -22%; }

.scene {

  width: min(90vw, 520px);

  min-height: 100vh;

  margin: 0 auto;

  padding: clamp(4rem, 10vh, 6rem) 1.5rem clamp(3.5rem, 8vh, 5rem);

  text-align: center;

  display: grid;

  grid-template-rows: minmax(0, 1fr) auto auto auto;

  gap: 2.6rem;

  justify-items: center;

  align-items: center;

  align-content: center;

  position: relative;

  z-index: 2;

}



.teddy {
  position: relative;
  width: clamp(200px, 36vw, 240px);
  height: clamp(230px, 42vw, 300px);
  display: grid;
  place-items: center;
  transform-origin: 50% 90%;
  animation: teddyFloat 6s ease-in-out infinite;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.teddy:focus {
  outline: none;
}

.teddy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(114, 148, 255, 0.35);
  border-radius: 32px;
}

.teddy__shadow {
  position: absolute;
  bottom: 12px;
  width: 70%;
  height: 18%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
  filter: blur(8px);
  opacity: 0.45;
  transform: translateY(10px);
}

.teddy__body {
  position: relative;
  width: 78%;
  height: 65%;
  background: radial-gradient(circle at 40% 30%, var(--fur-highlight) 0%, var(--fur-primary) 60%, var(--fur-shadow) 100%);
  border-radius: 48% 48% 38% 38% / 52% 52% 48% 48%;
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: teddyBreath 3.6s ease-in-out infinite;
}

.teddy__belly {
  position: absolute;
  bottom: 24%;
  width: 52%;
  height: 46%;
  background: radial-gradient(circle at 50% 40%, var(--fur-highlight) 0%, var(--fur-light) 65%, rgba(255, 255, 255, 0.35) 100%);
  border-radius: 50%;
}

.teddy__arm {
  position: absolute;
  top: 32%;
  width: 44%;
  height: 32%;
  background: radial-gradient(circle at 30% 30%, var(--fur-light) 0%, var(--fur-primary) 70%, var(--fur-shadow) 100%);
  border-radius: 48% 52% 58% 42%;
  transform-origin: top center;
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.22);
  z-index: 4;
}

.teddy__arm--left {
  left: -6%;
  transform: rotate(22deg);
  animation: teddyWaveLeft 4.2s ease-in-out infinite;
}

.teddy__arm--right {
  right: -6%;
  transform: scaleX(-1) rotate(22deg);
  animation: teddyWaveRight 4.2s ease-in-out infinite;
}
.teddy__paw {
  position: absolute;
  bottom: 10%;
  width: 42%;
  height: 30%;
  background: radial-gradient(circle at 48% 40%, var(--fur-light) 0%, var(--fur-primary) 70%);
  border-radius: 48% 52% 60% 40%;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.22);
  z-index: 5;
}

.teddy__paw::after {
  content: "";
  position: absolute;
  inset: 28% 30% 28% 30%;
  border-radius: 50%;
  background: rgba(255, 223, 210, 0.55);
}

.teddy__paw--left {
  left: 12%;
  transform: rotate(10deg);
}

.teddy__paw--right {
  right: 12%;
  transform: scaleX(-1) rotate(10deg);
}
.teddy__head {
  position: absolute;
  top: 0;
  width: 68%;
  height: 48%;
  transform: translateY(-42%);
  display: grid;
  place-items: center;
}

.teddy__ear {
  position: absolute;
  top: 6%;
  width: 36%;
  height: 36%;
  background: radial-gradient(circle at 40% 40%, var(--fur-light) 0%, var(--fur-primary) 75%, var(--fur-shadow) 100%);
  border-radius: 50%;
  box-shadow: inset 0 -8px 10px rgba(0, 0, 0, 0.18);
}

.teddy__ear span {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: rgba(255, 198, 198, 0.55);
}

.teddy__ear--left { left: -6%; }
.teddy__ear--right { right: -6%; }

.teddy__face {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, var(--fur-highlight) 0%, var(--fur-light) 55%, var(--fur-primary) 82%, var(--fur-shadow) 100%);
  border-radius: 50%;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.2);
}

.teddy__face::before,
.teddy__face::after {
  content: "";
  position: absolute;
  bottom: 32%;
  width: 18%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 152, 170, 0.4) 0%, transparent 75%);
  filter: blur(0.5px);
}

.teddy__face::before { left: 18%; }
.teddy__face::after { right: 18%; }

.teddy__eye {
  position: absolute;
  top: 38%;
  width: 18%;
  height: 24%;
  background: #ffffff;
  border-radius: 50%;
  border: 2px solid rgba(20, 12, 16, 0.15);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  transform-origin: center 60%;
  animation: blink 6s ease-in-out infinite;
}

.teddy__eye::before {
  content: "";
  width: 60%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a7c4ff 0%, #5d7ef5 55%, #1f2f74 100%);
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.3);
}

.teddy__eye::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 34%;
  width: 26%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.teddy__eye--left { left: 24%; }
.teddy__eye--right { right: 24%; }

.teddy__snout {
  position: absolute;
  bottom: 18%;
  left: 50%;
  width: 46%;
  height: 36%;
  background: radial-gradient(circle at 50% 45%, var(--fur-highlight) 0%, var(--fur-light) 65%);
  border-radius: 46% 46% 56% 56%;
  transform: translateX(-50%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.18);
}

.teddy__nose {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 34%;
  height: 36%;
  background: radial-gradient(circle at 50% 30%, #352229 0%, #140c10 100%);
  border-radius: 50% 50% 60% 60%;
  transform: translateX(-50%);
}

.teddy__mouth {
  position: absolute;
  bottom: 22%;
  left: 50%;
  width: 60%;
  height: 30%;
  border-bottom: 4px solid rgba(20, 12, 16, 0.65);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
}

.scene__header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-self: start;
}

.scene__note {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.scene__poem {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.7;
  color: var(--text-soft);
  font-style: italic;
  max-width: 34ch;
  align-self: start;
}

.love-card {
  width: min(100%, 420px);
  padding: 2.4rem clamp(1.6rem, 5vw, 2.6rem);
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 60px rgba(8, 6, 24, 0.58);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.love-card__title {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.love-card__since,
.love-card__duration,
.love-card__days {
  margin: 0;
  color: rgba(235, 228, 255, 0.82);
  font-size: 1.05rem;
}

.love-card__duration {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}

.love-card__days {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}


.floating-heart {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: calc(var(--size, 24) * 1px);
  color: var(--color, #ff4b6c);
  filter: drop-shadow(0 0 12px rgba(255, 75, 108, 0.55));
  animation: floatUp calc(var(--duration, 3000) * 1ms) ease-out forwards;
  z-index: 100;
}

.teddy.teddy--hug .teddy__head {
  animation: headTilt 0.9s ease-out;
}

.teddy.teddy--hug .teddy__body {
  animation: bodySnuggle 0.9s ease-in-out;
}

.teddy.teddy--hug .teddy__arm--left {
  animation: hugLeftActive 0.9s ease-out;
}

.teddy.teddy--hug .teddy__arm--right {
  animation: hugRightActive 0.9s ease-out;
}

@keyframes blink {
  0%, 4%, 8%, 12%, 100% {
    transform: scaleY(1);
  }
  5%, 6% {
    transform: scaleY(0.08);
  }
  7% {
    transform: scaleY(1.08);
  }
}

@keyframes floatHeart {
  0% {
    transform: translate3d(0, 0, 0) scale(0.85);
    opacity: 0;
  }
  12% {
    opacity: 0.7;
  }
  55% {
    opacity: 0.4;
  }
  100% {
    transform: translate3d(0, -118vh, 0) scale(1.08);
    opacity: 0;
  }
}

@keyframes teddyFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes teddyBreath {
  0%, 100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.025, 1.02);
  }
}

@keyframes teddyWaveLeft {
  0%, 100% {
    transform: rotate(22deg);
  }
  50% {
    transform: rotate(10deg) translateY(-4px);
  }
}

@keyframes teddyWaveRight {
  0%, 100% {
    transform: scaleX(-1) rotate(22deg);
  }
  50% {
    transform: scaleX(-1) rotate(10deg) translateY(-4px);
  }
}

@keyframes hugLeft {
  0%, 100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(12deg) translateX(4px);
  }
}

@keyframes hugRight {
  0%, 100% {
    transform: scaleX(-1) rotate(18deg);
  }
  50% {
    transform: scaleX(-1) rotate(12deg) translateX(4px);
  }
}
@keyframes hugLeftActive {
  0% {
    transform: rotate(18deg);
  }
  55% {
    transform: rotate(-6deg) translateX(12px);
  }
  100% {
    transform: rotate(18deg);
  }
}

@keyframes hugRightActive {
  0% {
    transform: scaleX(-1) rotate(18deg);
  }
  55% {
    transform: scaleX(-1) rotate(-6deg) translateX(12px);
  }
  100% {
    transform: scaleX(-1) rotate(18deg);
  }
}

@keyframes sparkle {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  45% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.4);
    opacity: 0;
  }
}

@media (max-width: 540px) {
  .scene {
    min-height: auto;
    padding: 2.8rem 1.2rem 2.4rem;
    gap: 1.8rem;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    align-items: center;
  }

  .scene__poem {
    font-size: 1.04rem;
    max-width: 90%;
    align-self: center;
  }

  .teddy {
    width: clamp(180px, 60vw, 208px);
    height: clamp(210px, 70vw, 255px);
  }

  .love-card {
    padding: 2.2rem 1.6rem;
  }
}
@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;
  }

  .teddy {
    animation: none !important;
  }

  .teddy__body,
  .teddy__arm,

