/* ===== Error pages — glassmorphism, 3D, effects ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@600;700;800&display=swap');

:root {
  --err-bg-dark: #06070a;
  --err-bg-card: rgba(18, 20, 28, 0.5);
  --err-glass-border: rgba(255, 255, 255, 0.08);
  --err-glass-highlight: rgba(255, 255, 255, 0.06);
  --err-text-primary: #f0f1f5;
  --err-text-secondary: #a0a4b0;
  --err-text-muted: #6b7080;
  --err-accent: #e8a83c;
  --err-accent-hover: #f0b94d;
  --err-accent-soft: rgba(232, 168, 60, 0.2);
  --err-radius: 20px;
  --err-radius-sm: 12px;
  --err-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body.err-page {
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  background: var(--err-bg-dark);
  color: var(--err-text-primary);
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Main content container */
.err-wrap {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 520px;
  perspective: 1200px;
}

/* Glass card with 3D tilt on hover */
.err-card {
  background: var(--err-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--err-glass-border);
  border-radius: var(--err-radius);
  padding: 48px 40px;
  box-shadow: 
    var(--err-shadow),
    0 0 0 1px var(--err-glass-highlight) inset;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  transform-style: preserve-3d;
  min-height: 40vh;
}

.err-card:hover {
  box-shadow: 
    0 32px 64px -16px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--err-glass-highlight) inset,
    0 0 60px -10px rgba(232, 168, 60, 0.15);
}

/* Big error code — 3D depth + subtle glow */
.err-code-wrap {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.err-code {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 8.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--err-text-primary) 0%, var(--err-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  transform: translateZ(40px);
  text-shadow: 0 0 80px rgba(232, 168, 60, 0.2);
}

.err-code[data-code]::after {
  content: attr(data-code);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--err-text-primary) 0%, var(--err-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(20px);
  opacity: 0.5;
  transform: translateZ(-20px);
}

/* Title & description */
.err-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--err-text-primary);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.err-desc {
  font-size: 1rem;
  color: var(--err-text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA button — glass + accent */
.err-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.err-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--err-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.err-btn-primary {
  background: var(--err-accent);
  color: #0a0b0f;
  border-color: rgba(232, 168, 60, 0.5);
  box-shadow: 0 4px 20px rgba(232, 168, 60, 0.25);
}

.err-btn-primary:hover {
  background: var(--err-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 168, 60, 0.35);
}

.err-btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--err-text-primary);
  border-color: var(--err-glass-border);
  backdrop-filter: blur(10px);
}

.err-btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(232, 168, 60, 0.3);
  transform: translateY(-2px);
}

/* Small “return” link */
.err-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.875rem;
  color: var(--err-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.err-back:hover {
  color: var(--err-accent);
}

/* Optional decorative line under code */
.err-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--err-accent), transparent);
  border-radius: 2px;
  margin: 20px auto 0;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .err-card {
    padding: 36px 24px;
  }
  .err-code {
    font-size: 4rem;
  }
}
