:root {
  color-scheme: dark;
  --bg-1: #0a0e27;
  --bg-2: #1a1f3a;
  --accent: #7c83ff;
  --accent-2: #ff6ec7;
  --text: #e8ecff;
  --muted: rgba(232, 236, 255, 0.65);
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid rgba(124, 131, 255, 0.42);
  outline-offset: 3px;
}

.maintenance-page,
.not-found-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.backdrop,
.maintenance-page::before,
.not-found-page::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 131, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 84% 88%, rgba(255, 110, 199, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(80, 200, 255, 0.18), transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  animation: drift 18s ease-in-out infinite alternate;
  content: "";
}

.grid-overlay,
.not-found-page::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  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: 40px 40px;
  content: "";
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

@keyframes drift {
  0% {
    filter: hue-rotate(0deg) saturate(1);
  }
  100% {
    filter: hue-rotate(25deg) saturate(1.15);
  }
}

.container,
.site-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.maintenance-card,
.not-found-panel {
  width: 100%;
  max-width: 620px;
  padding: 56px 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  backdrop-filter: blur(24px) saturate(140%);
  animation: rise 0.9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon {
  position: relative;
  display: flex;
  width: 96px;
  height: 96px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 32px rgba(124, 131, 255, 0.4);
}

.icon svg {
  width: 52px;
  height: 52px;
  color: #fff;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(124, 131, 255, 0.3);
  border-radius: 999px;
  color: #b8bdff;
  background: rgba(124, 131, 255, 0.15);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 131, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(124, 131, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 131, 255, 0);
  }
}

h1 {
  margin: 0 0 14px;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.18;
  background: linear-gradient(135deg, #ffffff, #b8bdff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle,
.lead {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.progress {
  height: 6px;
  margin-bottom: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress .bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: load 3.5s ease-in-out infinite;
}

@keyframes load {
  0% {
    width: 0;
    margin-left: 0;
  }
  50% {
    width: 75%;
    margin-left: 12%;
  }
  100% {
    width: 0;
    margin-left: 100%;
  }
}

.info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.info-item {
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.info-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.info-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.footer {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  padding-bottom: 1px;
  border-bottom: 1px dashed rgba(184, 189, 255, 0.4);
  color: #b8bdff;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer a:hover {
  color: var(--accent-2);
}

.copyright {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(232, 236, 255, 0.45);
  font-size: 12px;
  letter-spacing: 0.3px;
}

.copyright a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.copyright a:hover {
  color: #b8bdff;
}

.status-list {
  display: grid;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.status-list div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.status-list dt {
  color: var(--muted);
  font-size: 12px;
}

.status-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 520px) {
  .container,
  .site-shell {
    padding: 18px;
  }

  .maintenance-card,
  .not-found-panel {
    padding: 40px 28px;
  }

  h1 {
    font-size: 28px;
  }

  .info {
    grid-template-columns: 1fr;
  }
}

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