@font-face {
  font-family: "Pixellari";
  src: url("./assets/Pixellari.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --background-dark-teal: #031f2d;
  --background-overlay-top: rgba(6, 171, 207, 0.28);
  --background-overlay-bottom: rgba(2, 21, 31, 0.58);
  --card-bg: rgba(4, 45, 64, 0.72);
  --card-bg-deep: rgba(3, 22, 36, 0.58);
  --cyan-glow: #3af1ff;
  --cyan-border: rgba(70, 239, 255, 0.86);
  --white-headline: #f6fbff;
  --muted-cyan-text: #8bf8ff;
  --shadow-deep: rgba(0, 7, 15, 0.48);
  --card-width: min(49vw, 780px);
  --card-radius: 24px;
  --card-padding-y: 38px;
  --card-padding-x: 48px;
  --page-pad-x: clamp(18px, 5vw, 96px);
  --page-pad-y: clamp(28px, 14vh, 150px);
  --font-pixel: "Pixellari", "Courier New", monospace;
}

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

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

body {
  min-height: 100svh;
  overflow: hidden;
  color: white;
  font-family: var(--font-pixel);
  background: #062631;
}

.page-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: -3;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bg-overlay {
  display: none;
}

body,
.error-card,
.brand-title,
.status,
.message,
.caption {
  font-family: var(--font-pixel);
}

.page,
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 22vh 0 0 7vw;
  isolation: isolate;
}

.hero::before {
  display: none;
}

.error-card {
  position: relative;
  z-index: 1;
  width: var(--card-width);
  padding: 38px 48px 42px;
  border: 3px solid rgba(128, 247, 255, 0.9);
  border-radius: 24px;
  overflow: hidden;
  text-align: center;

  background:
    linear-gradient(
      135deg,
      rgba(39, 142, 160, 0.34),
      rgba(4, 42, 56, 0.54) 48%,
      rgba(1, 22, 34, 0.68)
    );

  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);

  box-shadow:
    0 0 22px rgba(65, 236, 255, 0.24),
    0 0 60px rgba(22, 160, 180, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(0, 255, 255, 0.12);

  animation: borderPulse 5.5s ease-in-out infinite;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.14),
      transparent 34%,
      rgba(68, 238, 255, 0.06)
    );
  opacity: 0.65;
}

.error-card::after {
  content: "";
  position: absolute;
  inset: -45% -18%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(127, 252, 255, 0.13) 48%,
    transparent 62%
  );
  transform: translateX(-36%);
  animation: shimmer 9s ease-in-out infinite;
}

.error-card > * {
  position: relative;
  z-index: 1;
}

.status-line,
.subheadline,
.hosting-caption {
  position: relative;
  z-index: 1;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 23px;
  color: var(--muted-cyan-text);
  font-size: clamp(1.3rem, 1.7vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 10px rgba(58, 241, 255, 0.72),
    0 2px 0 rgba(0, 0, 0, 0.35);
}

.warning-icon,
.divider-chip,
.server-stack-icon {
  display: inline-grid;
  place-items: center;
  color: var(--muted-cyan-text);
  filter: drop-shadow(0 0 6px rgba(58, 241, 255, 0.7));
}

.warning-icon img {
  width: clamp(24px, 2.1vw, 34px);
  height: clamp(24px, 2.1vw, 34px);
}

img {
  display: block;
}

.brand-title {
  position: relative;
  z-index: 1;
  margin: 20px 0 28px;
  font-family: var(--font-pixel);
  font-size: clamp(3.8rem, 5.2vw, 5.7rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: #f5fbff;
  text-shadow:
    0 6px 0 rgba(0, 0, 0, 0.55),
    0 0 18px rgba(104, 244, 255, 0.28);
  white-space: nowrap;
}

.divider {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  width: min(100%, 650px);
  max-width: 560px;
  margin: 26px auto 26px;
  color: var(--muted-cyan-text);
}

.divider > span:not(.divider-chip) {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 248, 255, 0.22) 4%,
    var(--cyan-glow) 100%
  );
  box-shadow: 0 0 10px rgba(58, 241, 255, 0.52);
}

.divider > span:last-child {
  transform: scaleX(-1);
}

.divider-chip {
  width: 31px;
  height: 31px;
}

.divider-chip img {
  width: 31px;
  height: 31px;
}

.subheadline {
  margin: 0;
  color: var(--muted-cyan-text);
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.035em;
  text-shadow: 0 0 12px rgba(58, 241, 255, 0.56);
}

.caption {
  position: relative;
  z-index: 1;
  width: var(--card-width);
  margin-top: 22px;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #9ffaff;
  font-family: var(--font-pixel);
  font-size: clamp(0.78rem, 0.85vw, 0.95rem);
  line-height: 1.18;
  letter-spacing: 0.03em;
  text-align: left;
  text-shadow:
    0 0 5px rgba(95, 242, 255, 0.75),
    0 0 12px rgba(95, 242, 255, 0.38);
}

.hosting-caption p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.message {
  font-family: "Courier New", monospace;
  font-size: clamp(1.2rem, 1.45vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9ffaff;
  text-shadow:
    0 0 6px rgba(95, 242, 255, 0.9),
    0 0 14px rgba(95, 242, 255, 0.55);
}

.server-stack-icon img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.caption img,
.caption-icon,
.server-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.is-loading .error-card,
.is-loading .hosting-caption {
  opacity: 0;
  transform: translateY(8px);
}

.error-card,
.hosting-caption {
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

@keyframes borderPulse {
  0%,
  100% {
    border-color: rgba(70, 239, 255, 0.8);
    box-shadow:
      0 0 0 1px rgba(180, 255, 255, 0.08) inset,
      0 0 28px rgba(58, 241, 255, 0.24),
      0 22px 65px var(--shadow-deep);
  }
  50% {
    border-color: rgba(139, 248, 255, 0.98);
    box-shadow:
      0 0 0 1px rgba(180, 255, 255, 0.13) inset,
      0 0 46px rgba(58, 241, 255, 0.36),
      0 22px 65px var(--shadow-deep);
  }
}

@keyframes shimmer {
  0%,
  34% {
    transform: translateX(-46%);
    opacity: 0;
  }
  50% {
    opacity: 0.72;
  }
  70%,
  100% {
    transform: translateX(46%);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --card-width: min(100%, 680px);
  }

  .hero {
    align-items: center;
    padding: 16vh 16px 0;
  }

  .error-card {
    width: var(--card-width);
    padding: 32px 28px 36px;
  }

  .brand-title {
    font-size: clamp(3rem, 13vw, 5rem);
    white-space: normal;
    text-align: center;
  }

  .caption {
    width: var(--card-width);
    justify-content: center;
    font-size: clamp(0.72rem, 2.4vw, 0.9rem);
  }
}

@media (max-width: 768px) {
  .divider {
    gap: 13px;
    margin: 28px auto 21px;
  }
}

@media (max-width: 430px) {
  :root {
    --card-padding-y: 29px;
    --card-padding-x: 18px;
    --card-radius: 18px;
  }

  .status-line {
    gap: 10px;
    margin-bottom: 18px;
  }

  .brand-title {
    font-size: clamp(1.8rem, 11.2vw, 3rem);
  }

  .subheadline {
    font-size: clamp(0.82rem, 4vw, 1rem);
  }

}

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