:root {
  color-scheme: dark;
  --bg: #0b0713;
  --text: #ffffff;
  --pink: #ff4fb8;
  --cyan: #57d8ff;
  --violet: #9d7cff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 54%, rgba(255, 79, 184, 0.18), transparent 31%),
    radial-gradient(ellipse at 50% 43%, rgba(87, 216, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #110816 0%, #0b0713 36%, #07131a 68%, #130a1b 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.stage {
  position: relative;
  display: grid;
  width: 100vw;
  min-height: 100vh;
  place-items: center;
  isolation: isolate;
}

.stage::before {
  position: absolute;
  inset: -10%;
  z-index: -4;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 96px);
  content: "";
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 72%);
}

.stage::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 36%, rgba(255, 255, 255, 0.055) 46%, transparent 56%),
    linear-gradient(245deg, transparent 0 42%, rgba(87, 216, 255, 0.045) 50%, transparent 61%);
  content: "";
  opacity: 0.7;
  animation: lightSweep 11s ease-in-out infinite alternate;
}

.ambient {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.ambient-a {
  background:
    conic-gradient(from 120deg at 48% 54%, transparent 0deg, rgba(255, 79, 184, 0.2) 56deg, transparent 116deg, rgba(87, 216, 255, 0.18) 176deg, transparent 250deg, rgba(157, 124, 255, 0.14) 318deg, transparent 360deg);
  filter: blur(36px);
  opacity: 0.56;
  animation: drift 18s ease-in-out infinite alternate;
}

.ambient-b {
  background:
    linear-gradient(90deg, rgba(255, 79, 184, 0.08), transparent 32%, rgba(87, 216, 255, 0.08) 70%, transparent),
    linear-gradient(0deg, transparent 0%, rgba(255, 255, 255, 0.035) 46%, transparent 74%);
  filter: blur(18px);
  transform: skewY(-7deg);
  opacity: 0.8;
  animation: tide 14s ease-in-out infinite alternate;
}

.heart-scene {
  position: relative;
  width: min(72vw, 720px);
  aspect-ratio: 1.1;
  display: grid;
  place-items: center;
}

.heart-scene::before {
  position: absolute;
  width: 74%;
  height: 22%;
  bottom: 9%;
  left: 13%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255, 79, 184, 0.22), rgba(87, 216, 255, 0.08) 44%, transparent 72%);
  content: "";
  filter: blur(20px);
  transform: perspective(440px) rotateX(64deg);
}

.heart {
  width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: center;
  animation: breathe 5.8s ease-in-out infinite;
}

.heart-shadow,
.heart-line,
.heart-flow,
.heart-spark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heart-shadow {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 12;
  filter: blur(10px);
}

.heart-line {
  stroke: url("#heartGradient");
  stroke-width: 11;
  filter: url("#softGlow");
}

.heart-flow {
  stroke: url("#flowGradient");
  stroke-width: 16;
  stroke-dasharray: 260 740;
  stroke-dashoffset: 0;
  filter: url("#softGlow");
  animation: current 4.2s linear infinite;
}

.heart-spark {
  stroke: #ffffff;
  stroke-width: 8;
  stroke-dasharray: 28 972;
  filter: url("#softGlow");
  opacity: 0.78;
}

.heart-spark-a {
  animation: spark 3.6s linear infinite;
}

.heart-spark-b {
  animation: spark 3.6s linear infinite -1.8s;
}

.counter {
  position: fixed;
  right: 0;
  bottom: clamp(18px, 4vw, 42px);
  left: 0;
  display: grid;
  gap: 6px;
  width: auto;
  padding: 0 clamp(24px, 5vw, 64px);
  justify-items: end;
  color: #ffffff;
  text-align: right;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.86),
    0 0 18px rgba(255, 79, 184, 0.42),
    0 0 30px rgba(87, 216, 255, 0.34);
}

.counter-label {
  display: block;
  width: 100%;
  font-size: clamp(0.68rem, 1.3vw, 0.92rem);
  letter-spacing: 0.18em;
  opacity: 0.72;
  text-align: right;
  text-transform: uppercase;
}

.counter-value {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", "Lucida Handwriting", cursive;
  font-size: clamp(2rem, 5.6vw, 4.7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.92;
  overflow-wrap: anywhere;
  text-align: right;
}

@keyframes current {
  to {
    stroke-dashoffset: -1000;
  }
}

@keyframes spark {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -1000;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.985);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes drift {
  0% {
    transform: translate3d(-2%, 1%, 0) rotate(0deg) scale(1);
  }

  100% {
    transform: translate3d(2%, -1%, 0) rotate(16deg) scale(1.08);
  }
}

@keyframes tide {
  0% {
    transform: translateX(-2%) skewY(-7deg);
  }

  100% {
    transform: translateX(2%) skewY(-7deg);
  }
}

@keyframes lightSweep {
  from {
    transform: translateX(-7%);
  }

  to {
    transform: translateX(7%);
  }
}

@media (max-width: 720px) {
  .heart-scene {
    width: min(94vw, 620px);
  }

  .counter {
    right: 0;
    bottom: 18px;
    width: auto;
    padding: 0 32px 0 16px;
  }

  .counter-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .counter-value {
    font-size: clamp(1rem, 5.4vw, 1.45rem);
    white-space: nowrap;
  }
}

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