:root {
  --bg-main: #04060a; 
  --bg-card: rgba(10, 15, 26, 0.65); 
  --primary: #6366f1; 
  --primary-glow: rgba(99, 102, 241, 0.35); 
  --cyan-accent: #22d3ee; 
  --cyan-glow: rgba(34, 211, 238, 0.3); 
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border: rgba(99, 102, 241, 0.15); 
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  z-index: 2;
}

.glow-sphere-1, .glow-sphere-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  animation: pulseGlow 8s infinite alternate ease-in-out;
}

.glow-sphere-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-glow);
  top: 20%;
  left: 25%;
}

.glow-sphere-2 {
  width: 450px;
  height: 450px;
  background: var(--cyan-glow);
  bottom: 15%;
  right: 25%;
  animation-delay: -3s;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.15) translate(30px, -20px); opacity: 0.9; }
}

.error-container {
  max-width: 520px;
  width: 90%;
  padding: 50px 40px;
  background: var(--bg-card); 
  border: 1px solid var(--border);
  border-radius: 24px; 
  text-align: center;
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.05);
  z-index: 10; 
  position: relative;
  animation: containerAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes containerAppear {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.error-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-accent), var(--primary), transparent);
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5rem; 
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 20%, var(--cyan-accent) 60%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  letter-spacing: -6px;
  filter: drop-shadow(0 0 25px rgba(34, 211, 238, 0.35));
  animation: textPulse 4s infinite alternate ease-in-out;
}

@keyframes textPulse {
  0% { filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.2)); }
  100% { filter: drop-shadow(0 0 35px rgba(34, 211, 238, 0.5)); }
}

.error-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.error-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 35px;
  font-weight: 400;
}

.btn-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: 12px; 
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); 
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: #5053e3;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 0 15px var(--cyan-accent);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--cyan-accent);
  color: #fff;
}

.error-footer {
  margin-top: 35px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 20px;
}

.sys-trace {
  color: var(--cyan-accent);
  font-weight: 700;
}