.not-found {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 30%),
    linear-gradient(180deg, #fff9ff 0%, #f7efff 28%, #efe4ff 58%, #fdeef6 100%);
  color: #483768;
}

.not-found__sky {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(146, 115, 232, 0.22) 0 1.1px, transparent 1.9px),
    radial-gradient(circle, rgba(255, 194, 210, 0.26) 0 1.3px, transparent 2.1px),
    radial-gradient(circle, rgba(255, 235, 178, 0.4) 0 1.5px, transparent 2.4px);
  background-size: 150px 150px, 220px 220px, 280px 280px;
  animation: starScroll 32s linear infinite;
}

.not-found__glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(62px);
  opacity: 0.8;
  mix-blend-mode: multiply;
  animation: floatGlow 14s ease-in-out infinite;
}

.not-found__glow--violet {
  top: -6%;
  left: -4%;
  width: 28rem;
  height: 28rem;
  background: rgba(183, 153, 255, 0.56);
}

.not-found__glow--peach {
  bottom: -12%;
  right: 8%;
  width: 30rem;
  height: 24rem;
  background: rgba(255, 222, 183, 0.62);
  animation-delay: -4s;
}

.not-found__glow--pink {
  top: 30%;
  right: -8%;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 194, 224, 0.58);
  animation-delay: -8s;
}

.not-found__star {
  position: absolute;
  color: #9b72f0;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.85);
  animation: twinklePastel 3.8s ease-in-out infinite;
}

.not-found__star--1 { top: 18%; left: 19%; font-size: 1.4rem; }
.not-found__star--2 { top: 24%; right: 18%; font-size: 1.9rem; animation-delay: .7s; }
.not-found__star--3 { bottom: 24%; left: 16%; font-size: 1.2rem; animation-delay: 1.4s; }
.not-found__star--4 { bottom: 18%; right: 20%; font-size: 1.5rem; animation-delay: 2s; }
.not-found__star--5 { top: 40%; left: 10%; font-size: 1rem; animation-delay: 2.7s; }

.not-found__content {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100% - 2rem));
  text-align: center;
}

.not-found__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(179, 147, 246, 0.28);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(177, 149, 224, 0.16);
  color: #8b67db;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.not-found__pillow-wrap {
  position: relative;
  width: 21rem;
  height: 17.5rem;
  margin: 1.6rem auto 1.4rem;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.not-found__pillow-shadow {
  position: absolute;
  bottom: 1.8rem;
  width: 12.5rem;
  height: 2.4rem;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(119, 87, 180, 0.22) 0%, rgba(119, 87, 180, 0.08) 48%, transparent 72%);
  filter: blur(2px);
  animation: pillowShadow 4.8s ease-in-out infinite;
}

.not-found__mobile {
  position: relative;
  width: 19rem;
  height: 15.75rem;
  animation: mobileFloat 6s ease-in-out infinite;
}

.not-found__mobile-bar {
  position: absolute;
  top: 0.95rem;
  left: 50%;
  width: 11rem;
  height: 0.34rem;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(212, 188, 255, 0.9), rgba(255, 236, 193, 0.55));
  box-shadow: 0 8px 18px rgba(153, 119, 219, 0.18);
}

.not-found__mobile-hanger {
  --hanger-translate: 0px;
  position: absolute;
  top: 1rem;
  width: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: mobileSwing 4.8s ease-in-out infinite;
  transform-origin: top center;
}

.not-found__mobile-hanger--left {
  left: 2.6rem;
  animation-delay: -0.45s;
}

.not-found__mobile-hanger--center {
  left: 50%;
  width: 4.8rem;
  --hanger-translate: -50%;
  animation-delay: -0.1s;
}

.not-found__mobile-hanger--right {
  right: 2.6rem;
  animation-delay: -0.95s;
}

.not-found__mobile-thread {
  position: absolute;
  top: 0;
  width: 1px;
  height: 4.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(210, 188, 255, 0.82) 100%);
}

.not-found__mobile-thread--long {
  height: 6.2rem;
}

.not-found__mobile-number {
  position: absolute;
  top: 4rem;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 248, 224, 0.92) 19%, transparent 36%),
    linear-gradient(145deg, #fff5cf 0%, #ffe0eb 34%, #dec5ff 70%, #b392f3 100%);
  box-shadow:
    inset 10px 10px 18px rgba(255, 255, 255, 0.46),
    inset -10px -12px 18px rgba(124, 89, 198, 0.16),
    0 0 18px rgba(255, 233, 195, 0.3),
    0 14px 28px rgba(95, 65, 157, 0.14);
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fffdfd;
  text-shadow:
    0 5px 18px rgba(105, 71, 162, 0.22),
    0 0 18px rgba(182, 149, 246, 0.28);
}

.not-found__mobile-number--left {
  top: 4.1rem;
}

.not-found__mobile-number--center {
  top: 5.45rem;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  font-size: 2rem;
}

.not-found__mobile-number--right {
  top: 4.1rem;
}

.not-found__mobile-cloud {
  position: absolute;
  bottom: 1.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 236, 255, 0.96) 72%, rgba(232, 214, 255, 0.92) 100%);
  box-shadow:
    inset 0 -10px 14px rgba(190, 166, 237, 0.18),
    0 18px 34px rgba(121, 86, 193, 0.12);
}

.not-found__mobile-cloud::before,
.not-found__mobile-cloud::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.not-found__mobile-cloud--left {
  left: 1.5rem;
  width: 5.6rem;
}

.not-found__mobile-cloud--left::before {
  width: 2.5rem;
  height: 2.5rem;
  left: 0.85rem;
  top: -0.8rem;
}

.not-found__mobile-cloud--left::after {
  width: 3rem;
  height: 3rem;
  right: 0.45rem;
  top: -1.15rem;
}

.not-found__mobile-cloud--center {
  left: 50%;
  bottom: 0.55rem;
  width: 7rem;
  transform: translateX(-50%);
}

.not-found__mobile-cloud--center::before {
  width: 3.4rem;
  height: 3.4rem;
  left: 0.9rem;
  top: -1.35rem;
}

.not-found__mobile-cloud--center::after {
  width: 2.9rem;
  height: 2.9rem;
  right: 0.9rem;
  top: -0.9rem;
}

.not-found__mobile-cloud--right {
  right: 1.35rem;
  width: 5rem;
}

.not-found__mobile-cloud--right::before {
  width: 2.2rem;
  height: 2.2rem;
  left: 0.7rem;
  top: -0.7rem;
}

.not-found__mobile-cloud--right::after {
  width: 2rem;
  height: 2rem;
  right: 0.6rem;
  top: -0.45rem;
}

.not-found__pillow-spark {
  position: absolute;
  z-index: 2;
  color: #fffdf6;
  text-shadow: 0 0 16px rgba(169, 126, 245, 0.55);
  animation: twinklePastel 3.4s ease-in-out infinite;
}

.not-found__pillow-spark--one {
  top: 2.2rem;
  left: 2.6rem;
  font-size: 1.2rem;
}

.not-found__pillow-spark--two {
  top: 3.6rem;
  right: 1.6rem;
  color: #b892ff;
  font-size: 1rem;
  animation-delay: 0.8s;
}

.not-found__pillow-spark--three {
  bottom: 4.2rem;
  left: 1.4rem;
  color: #ffd6eb;
  font-size: 0.9rem;
  animation-delay: 1.6s;
}

.not-found__eyebrow {
  margin: 0 0 0.8rem;
  color: #9c78e8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.not-found__title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.94;
  color: #4d386f;
}

.not-found__text {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: #7c6a99;
  font-size: 1.05rem;
  line-height: 1.8;
}

.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.not-found__primary,
.not-found__secondary {
  min-height: 3rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.not-found__primary {
  border: none;
  background: linear-gradient(135deg, #9f79f3 0%, #f0a6d5 100%);
  color: white;
  box-shadow: 0 18px 40px rgba(181, 143, 234, 0.24);
}

.not-found__secondary {
  border: 1px solid rgba(184, 156, 240, 0.34);
  background: rgba(255, 255, 255, 0.82);
  color: #6e55a5;
}

.not-found__primary:hover,
.not-found__secondary:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .not-found__sky,
  .not-found__glow,
  .not-found__star,
  .not-found__mobile,
  .not-found__mobile-hanger,
  .not-found__pillow-shadow,
  .not-found__pillow-spark {
    animation: none;
  }
}

@keyframes starScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-4rem, 5rem, 0); }
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0.8rem, -1rem, 0) scale(1.06); }
}

@keyframes twinklePastel {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.28); }
}

@keyframes pillowFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-12px) rotate(2deg) scale(1.03); }
}

@keyframes pillowShadow {
  0%, 100% { opacity: 0.68; transform: scaleX(1); }
  50% { opacity: 0.42; transform: scaleX(0.82); }
}

@keyframes mobileFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes mobileSwing {
  0%, 100% { transform: translateX(var(--hanger-translate)) rotate(-3deg); }
  50% { transform: translateX(var(--hanger-translate)) rotate(3deg); }
}

@media (max-width: 640px) {
  .not-found__pillow-wrap {
    width: 17rem;
    height: 14.5rem;
  }

  .not-found__mobile {
    width: 15.75rem;
    height: 13.75rem;
  }

  .not-found__mobile-bar {
    width: 9rem;
  }

  .not-found__mobile-hanger--left {
    left: 1.75rem;
  }

  .not-found__mobile-hanger--right {
    right: 1.75rem;
  }

  .not-found__mobile-number {
    width: 2.85rem;
    height: 2.85rem;
    font-size: 1.55rem;
  }

  .not-found__mobile-number--center {
    width: 3.55rem;
    height: 3.55rem;
    font-size: 1.75rem;
  }

  .not-found__text {
    font-size: 0.98rem;
  }
}
