:root {
  color-scheme: dark;
  --page-bg: #04070d;
  --card-bg: rgba(8, 14, 25, 0.82);
  --card-border: rgba(151, 178, 220, 0.18);
  --text: #f5f8ff;
  --muted: #9ba9be;
  --blue: #4c8dff;
  --blue-bright: #78aaff;
  --discord: #5865f2;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(27, 55, 95, 0.34), transparent 38%),
    linear-gradient(145deg, #060b14 0%, #020409 58%, #080b12 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  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: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at center, transparent 35%, rgba(0, 0, 0, 0.66) 100%);
}

.ambient {
  position: fixed;
  top: 19%;
  z-index: 0;
  width: 30vw;
  height: 30vw;
  min-width: 280px;
  min-height: 280px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.14;
  filter: blur(100px);
  animation: breathe 6s ease-in-out infinite alternate;
}

.ambient-blue {
  left: -12vw;
  background: #1677ff;
}

.ambient-red {
  right: -12vw;
  background: #ef3340;
  animation-delay: -3s;
}

.maintenance-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: 42px 20px 24px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.maintenance-card {
  position: relative;
  width: min(100%, 720px);
  padding: 42px 64px 38px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--card-bg);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.maintenance-card::before {
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(120, 170, 255, 0.9), transparent);
}

.status-line {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 8px 13px;
  align-items: center;
  gap: 8px;
  color: #bdc9dc;
  border: 1px solid rgba(127, 162, 214, 0.17);
  border-radius: 999px;
  background: rgba(74, 115, 178, 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4c8dff;
  box-shadow: 0 0 0 5px rgba(76, 141, 255, 0.12), 0 0 16px rgba(76, 141, 255, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}

.badge-frame {
  position: relative;
  display: grid;
  width: 216px;
  height: 216px;
  margin: 0 auto 31px;
  place-items: center;
}

.badge-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.badge-orbit-outer {
  inset: 0;
  border: 1px solid rgba(116, 157, 220, 0.18);
  box-shadow: 0 0 55px rgba(37, 111, 231, 0.12);
}

.badge-orbit-inner {
  inset: 12px;
  border: 1px dashed rgba(138, 171, 220, 0.24);
  animation: rotate 28s linear infinite;
}

.department-mark {
  position: relative;
  z-index: 1;
  display: block;
  width: 178px;
  height: 178px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.58),
    0 0 0 7px rgba(255, 255, 255, 0.035),
    0 0 34px rgba(80, 136, 224, 0.2);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 70px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.lead {
  max-width: 540px;
  margin: 20px auto 29px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.discord-link {
  display: inline-flex;
  min-height: 56px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #6673f5, var(--discord));
  box-shadow: 0 14px 34px rgba(57, 67, 194, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.discord-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #7480ff, #626ff5);
  box-shadow: 0 18px 42px rgba(57, 67, 194, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.discord-link:focus-visible {
  outline: 3px solid rgba(140, 177, 255, 0.68);
  outline-offset: 4px;
}

.discord-link svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
}

.link-arrow {
  margin-left: 3px;
  font-size: 20px;
  transition: transform 180ms ease;
}

.discord-link:hover .link-arrow {
  transform: translateX(3px);
}

.progress {
  width: min(100%, 310px);
  height: 3px;
  margin: 34px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  width: 67%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #316ed8, #77a9ff);
  box-shadow: 0 0 16px rgba(76, 141, 255, 0.7);
}

.progress-label {
  margin: 10px 0 0;
  color: #6f7e94;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

footer {
  display: flex;
  margin-top: 25px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #59677a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #59677a;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes breathe {
  from { opacity: 0.1; transform: scale(0.9); }
  to { opacity: 0.18; transform: scale(1.1); }
}

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

@media (max-width: 640px) {
  .maintenance-shell {
    padding: 20px 14px 18px;
  }

  .maintenance-card {
    padding: 30px 21px 28px;
    border-radius: 24px;
  }

  .status-line {
    margin-bottom: 23px;
  }

  .badge-frame {
    width: 176px;
    height: 176px;
    margin-bottom: 27px;
  }

  .department-mark {
    width: 144px;
    height: 144px;
  }

  .lead {
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.65;
  }

  .discord-link {
    width: 100%;
  }

  footer {
    flex-wrap: wrap;
    font-size: 9px;
  }
}

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