/* ── 404 PAGE ───────────────────────────────── */
.page-404 {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

.page-404__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-404__pulse-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.1);
  animation: pulseSoft 2s ease-in-out infinite;
}

.page-404__pulse-circle--1 {
  top: 33%;
  left: 25%;
  width: 384px;
  height: 384px;
}

.page-404__pulse-circle--2 {
  top: 33%;
  left: 25%;
  width: 384px;
  height: 384px;
  animation-delay: -1s;
}

.page-404__pulse-circle--3 {
  bottom: 25%;
  right: 25%;
  width: 256px;
  height: 256px;
  border-color: rgba(0, 212, 255, 0.05);
  animation-delay: -0.5s;
}

.page-404__radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
}

.page-404__scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
}

.page-404__content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

.page-404__bomb-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.page-404__bomb {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: glowPulse 2s ease-in-out infinite;
}

.page-404__bomb svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
}

.page-404__spark {
  position: absolute;
  border-radius: 50%;
  animation: pulseSoft 2s ease-in-out infinite;
}

.page-404__spark--1 {
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
}

.page-404__spark--2 {
  bottom: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--color-action);
  animation-delay: -0.5s;
}

.page-404__code {
  font-family: var(--font-mono);
  font-size: clamp(72px, 15vw, 120px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--color-primary) 0%, rgba(0, 212, 255, 0.2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

/* Glitch effect */
.page-404__code::before,
.page-404__code::after {
  content: '404';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary) 0%, rgba(0, 212, 255, 0.2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  pointer-events: none;
}

.page-404__code::before {
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.page-404__code::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); }
  91% { transform: translate(-3px, 1px); }
  92% { transform: translate(2px, -1px); }
  93% { transform: translate(0); }
  94% { transform: translate(-2px, 0); }
  95% { transform: translate(0); }
}

@keyframes glitch-2 {
  0%, 85%, 100% { transform: translate(0); }
  86% { transform: translate(3px, -1px); }
  87% { transform: translate(-2px, 1px); }
  88% { transform: translate(0); }
  89% { transform: translate(2px, 0); }
  90% { transform: translate(0); }
}

.page-404__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.page-404__title span {
  color: var(--color-text-secondary);
}

.page-404__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.page-404__search {
  position: relative;
  max-width: 360px;
  margin: 0 auto 32px;
}

.page-404__search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.page-404__search input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  outline: none;
  transition: all var(--transition-fast);
}

.page-404__search input::placeholder {
  color: var(--color-text-muted);
}

.page-404__search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.page-404__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.page-404__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.page-404__link:hover {
  color: var(--color-text-primary);
  border-color: rgba(0, 212, 255, 0.2);
  background: var(--color-bg-card);
}

.page-404__link svg {
  width: 16px;
  height: 16px;
}

.page-404__counter {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.page-404__counter .mono-cyan {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.page-404__counter .mono-red {
  font-family: var(--font-mono);
  color: var(--color-error);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
  50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.3); }
}

@keyframes pulseSoft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

.error-sep {
  margin: 0 6px;
}
