:root {
  --background: #02142f;
  --background-deep: #010b1b;
  --accent-light: #69c8ff;
  --text: #f5f9ff;
  --text-muted: #9fb3ca;
  --border: rgba(255, 255, 255, 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--background-deep);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 38%, rgba(18, 149, 243, 0.16), transparent 25rem),
    radial-gradient(circle at 85% 10%, rgba(21, 112, 212, 0.12), transparent 28rem),
    linear-gradient(145deg, #01112a 0%, var(--background) 48%, #010b1b 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}

.page {
  width: min(92%, 920px);
  display: grid;
  justify-items: center;
  padding: clamp(32px, 6vw, 72px) 0;
  text-align: center;
  animation: page-enter 1.1s var(--ease-out) both;
}

.logo-wrap {
  width: min(78vw, 480px);
  position: relative;
  margin-bottom: clamp(8px, 2vw, 20px);
}

.logo-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 20% 10%;
  border-radius: 50%;
  background: rgba(22, 144, 239, 0.2);
  filter: blur(65px);
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 55px rgba(0, 0, 0, 0.42));
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #c5d8ec;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 16px rgba(105, 200, 255, 0.9);
  animation: pulse 2.2s ease-in-out infinite;
}

h1 {
  max-width: 780px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff 18%, #b6c9dd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.description {
  max-width: 610px;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.65;
  text-wrap: balance;
}

.error-page {
  gap: 0;
}

.error-logo {
  width: min(48vw, 220px);
  height: auto;
  margin-bottom: clamp(20px, 4vh, 36px);
  filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.42));
}

.error-code {
  position: relative;
  font-size: clamp(110px, 27vw, 280px);
  font-weight: 750;
  line-height: 0.78;
  letter-spacing: -0.085em;
  background: linear-gradient(180deg, #fff 5%, #7dcaff 46%, #087ed3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 22px 52px rgba(0, 111, 207, 0.25));
}

.error-code::after {
  content: "404";
  position: absolute;
  z-index: -1;
  inset: 0;
  color: rgba(18, 149, 243, 0.18);
  filter: blur(28px);
}

.error-title {
  margin-top: clamp(28px, 5vh, 48px);
  color: var(--text);
  font-size: clamp(25px, 4.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.error-description {
  max-width: 560px;
  margin-top: 15px;
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  text-wrap: balance;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 12px 20px;
  border: 1px solid rgba(105, 200, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 149, 243, 0.13);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease;
}

.home-link:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 200, 255, 0.58);
  background: rgba(18, 149, 243, 0.23);
}

.home-link:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
}

footer {
  position: fixed;
  right: 20px;
  bottom: 18px;
  left: 20px;
  color: rgba(159, 179, 202, 0.68);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
  }

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

@keyframes pulse {
  0%, 100% {
    opacity: 0.65;
    transform: scale(0.9);
  }

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

@media (max-height: 760px) {
  .logo-wrap {
    width: min(58vh, 390px);
  }

  .page {
    padding-bottom: 60px;
  }

  .error-logo {
    width: min(28vh, 170px);
    margin-bottom: 20px;
  }

  .error-code {
    font-size: min(25vh, 190px);
  }

  .error-title {
    margin-top: 25px;
  }
}

@media (max-width: 520px) {
  .logo-wrap {
    width: min(88vw, 420px);
  }

  .status {
    margin-bottom: 20px;
  }

  .description {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .status-dot {
    animation: none;
  }
}
