:root {
  --accent: #e74c3c;
  --grid-alpha: 0.25;
  --glow-alpha: 0.1;
  --sweep-alpha: 0.1;
  --bg: #0d0d0d;
  --txt: #eaeaea;
  --muted: #aeb4b9;
}

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

.header-logo {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 100;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  opacity: 1;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-logo:hover {
  opacity: 0.8;
}

html,
body {
  height: 100%;
  background: #111418;
  color: #eef;
  font:
    500 17px/1.6 Inter,
    system-ui,
    sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 404 Page Specifics */
.huge-404 {
  font-size: clamp(100px, 20vw, 200px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(
    135deg,
    var(--txt) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin: 0;
  letter-spacing: -0.05em;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}

.not-found-msg {
  font-size: clamp(18px, 3vw, 24px);
  color: #aeb4b9;
  margin: 20px 0 40px;
  max-width: 600px;
}

.redirect-timer {
  font-size: 0.9rem;
  color: var(--accent);
  padding: 8px 16px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 50px;
  display: inline-block;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.error-center {
  flex-direction: column;
  z-index: 10;
}

.scene {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, #111418 0%, #0f1318 55%, #0c0f13 100%);
}

.scene > .grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(38, 48, 58, var(--grid-alpha)) 1px, transparent 1px),
    linear-gradient(
      90deg,
      rgba(38, 48, 58, var(--grid-alpha)) 1px,
      transparent 1px
    );
  background-size: 24px 24px;
  animation: gridpan 80s linear infinite;
}

@keyframes gridpan {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 12px 12px;
  }

  100% {
    background-position: 0 0;
  }
}

.aurora {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(
      46% 46% at 18% 28%,
      rgba(0, 210, 255, var(--glow-alpha)),
      transparent 62%
    ),
    radial-gradient(
      44% 44% at 82% 72%,
      rgba(255, 90, 70, var(--glow-alpha)),
      transparent 62%
    ),
    radial-gradient(
      38% 38% at 52% 55%,
      rgba(150, 90, 255, calc(var(--glow-alpha) * 0.75)),
      transparent 65%
    );
  filter: blur(80px);
  animation: drift 60s ease-in-out infinite alternate;
}

@keyframes drift {
  0% {
    transform: translate(-3%, -2%);
  }

  100% {
    transform: translate(3%, 2%);
  }
}

.sweep {
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 0deg,
    transparent 0 70deg,
    rgba(0, 200, 255, var(--sweep-alpha)) 105deg,
    rgba(255, 90, 70, var(--sweep-alpha)) 150deg,
    transparent 360deg
  );
  filter: blur(90px);
  animation: spin 120s linear infinite;
  animation-delay: 5s;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  5% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.main {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  position: relative;
  z-index: 2;
}

.hero {
  max-width: 980px;
  width: 100%;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #aeb4b9;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

h1 {
  font-size: clamp(34px, 6.2vw, 58px);
  margin: 18px 0 12px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 .hl {
  color: var(--accent);
}

.sub {
  font-size: clamp(16px, 2vw, 19px);
  color: #d6dde0;
  margin-bottom: 36px;
}

.services-title {
  font-size: clamp(22px, 3.5vw, 28px);
  margin: 40px 0 24px;
  text-align: center;
  color: var(--txt);
  font-weight: 600;
  display: block;
}

.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto 40px;
  text-align: left;
}

@media (min-width: 1000px) {
  .services {
    grid-template-columns: repeat(3, 1fr);
  }
}

.box {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.01);
  transition: 0.25s;
}

.box:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.box h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 650;
  text-align: left;
}

.box p {
  font-size: 0.95rem;
  color: #aeb4b9;
  text-align: left;
}

.box p a {
  color: var(--accent);
  text-decoration: none;
}

.footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 18px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 35%,
    rgba(0, 0, 0, 0.85) 100%
  );
  backdrop-filter: blur(6px);
}

.iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  transition: 0.25s;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.12)
  );
}

.iconbtn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px -10px #000,
    0 0 0 3px rgba(255, 255, 255, 0.15);
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
  color: #eef;
}

.wrap {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.card {
  width: min(900px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.08)
  );
  position: relative;
  overflow: hidden;
  color: var(--txt);
}

.card .grid {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 34px;
  background: none;
  animation: none;
  inset: unset;
}

.card .grid > div {
  min-width: 0;
  width: 100%;
}

.card h1 {
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: -0.02em;
  color: var(--txt);
}

.card .hl {
  color: var(--accent);
}

.card p {
  color: var(--muted);
}

.btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  text-decoration: none;
  color: var(--txt);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.12)
  );
  transition: 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px -12px #000,
    0 0 0 3px rgba(231, 76, 60, 0.3);
}

.meta {
  font-size: 0.95rem;
}

.timer {
  color: var(--accent);
}

.type {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(15px, 2.4vw, 18px);
  color: #d8e6e8;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--accent);
  display: inline-block;
  width: 0;
  --text-width: 100%;
  animation:
    typing 2.6s steps(40, end) forwards,
    blink 0.8s step-end infinite;
}

@keyframes typing {
  to {
    width: var(--text-width, 100%);
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@media (min-width: 900px) {
  .card .grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
  .scene > .grid,
  .aurora,
  .sweep {
    animation: none;
  }
}
