.error-400-section,
.error-401-section,
.error-403-section,
.error-404-section,
.error-500-section,
.error-502-section,
.error-503-section {
  --error-accent: #83d8ff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.08), transparent 42%),
    radial-gradient(circle at 78% 80%, rgba(255, 255, 255, 0.06), transparent 36%),
    #555555;
  position: relative;
  overflow: hidden;
}

.error-400-section {
  --error-accent: #ffd27a;
}

.error-401-section {
  --error-accent: #83d8ff;
}

.error-403-section {
  --error-accent: #ff9a9a;
}

.error-404-section {
  --error-accent: #9fb7ff;
}

.error-500-section {
  --error-accent: #ff9f74;
}

.error-502-section {
  --error-accent: #99f1c6;
}

.error-503-section {
  --error-accent: #f8abff;
}

.error-400-content,
.error-401-content,
.error-403-content,
.error-404-content,
.error-500-content,
.error-502-content,
.error-503-content {
  text-align: center;
  color: #ffffff;
  z-index: 2;
  position: relative;
  width: min(92vw, 760px);
}

.error-code-block {
  position: relative;
  margin-bottom: 1.5rem;
  line-height: 1;
  display: inline-block;
}

.error-code-main,
.error-code-shadow {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(4.5rem, 17vw, 11rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  display: block;
  text-transform: uppercase;
}

.error-code-main {
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.35),
    0 0 22px color-mix(in srgb, var(--error-accent) 72%, white 28%);
  animation: error-code-float 2.8s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.error-code-shadow {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--error-accent);
  opacity: 0.35;
  transform: translate(12px, 8px);
  filter: blur(1.2px);
  animation: error-code-glitch 3.2s steps(3, end) infinite;
  z-index: 1;
}

.error-400-text,
.error-401-text,
.error-403-text,
.error-404-text,
.error-500-text,
.error-502-text,
.error-503-text {
  font-size: clamp(1.9rem, 2.8vw, 2.4rem);
  font-weight: 600;
  margin: 0.9rem 0;
  opacity: 0.95;
  color: #ffffff;
}

.error-400-description,
.error-401-description,
.error-403-description,
.error-404-description,
.error-500-description,
.error-502-description,
.error-503-description {
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  margin: 1.6rem auto 0;
  opacity: 0.86;
  max-width: 620px;
  color: #ffffff;
}

.error-400-buttons,
.error-401-buttons,
.error-403-buttons,
.error-404-buttons,
.error-500-buttons,
.error-502-buttons,
.error-503-buttons {
  margin-top: 2.4rem;
}

.btn-400,
.btn-401,
.btn-403,
.btn-404,
.btn-500,
.btn-502,
.btn-503 {
  display: inline-block;
  padding: 12px 30px;
  margin: 0 10px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary-400,
.btn-primary-401,
.btn-primary-403,
.btn-primary-404,
.btn-primary-500,
.btn-primary-502,
.btn-primary-503 {
  background: #ffffff;
  color: #1d6ea8;
  border: 2px solid #ffffff;
}

.btn-primary-400:hover,
.btn-primary-401:hover,
.btn-primary-403:hover,
.btn-primary-404:hover,
.btn-primary-500:hover,
.btn-primary-502:hover,
.btn-primary-503:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  background: #000000;
  color: #ffffff;
  text-decoration: none;
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float-shapes 6s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  background: rgba(0, 0, 0, 0.1);
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 70%;
  right: 10%;
  animation-delay: 2s;
  background: rgba(255, 255, 255, 0.1);
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  top: 40%;
  left: 80%;
  animation-delay: 4s;
  background: rgba(0, 0, 0, 0.1);
}

@keyframes float-shapes {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

@keyframes error-code-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes error-code-glitch {
  0%,
  100% {
    transform: translate(12px, 8px);
    opacity: 0.32;
  }

  35% {
    transform: translate(6px, 3px);
    opacity: 0.5;
  }

  62% {
    transform: translate(15px, 10px);
    opacity: 0.25;
  }
}

@media (max-width: 768px) {
  .btn-400,
  .btn-401,
  .btn-403,
  .btn-404,
  .btn-500,
  .btn-502,
  .btn-503 {
    display: block;
    margin: 10px auto;
    width: 220px;
  }

  .error-code-shadow {
    transform: translate(8px, 6px);
  }
}