/* =========================================================
   Static Noir Mint Dark — Error (No-scroll, fixed video)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0f14;
  --surface: #10151d;
  --surface-2: #0e131a;

  --text: #e6eef5;
  --muted: #9fb2c3;
  --border: rgba(230,238,245,.12);

  --grad-primary: linear-gradient(135deg, #0f1a1f 0%, #0b272a 45%, #0a3a33 100%);

  --alpha-80: .8;
  --surface-rgb: 16,21,29;
  --glass: rgba(var(--surface-rgb), var(--alpha-80));

  --radius: 18px;
  --radius-inner: 14px;
  --glow: 0 0 0 3px rgba(56,189,148,.08);

  /* Card sizing */
  --card-min: 320px;          /* reasonable minimum width */
  --card-max: 720px;          /* cap so it never feels huge */
}

/* ---------- Base & No-scroll ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100dvh;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--text);
  font: 400 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  overflow: hidden;                 /* prevent page scrolling */
}

/* ---------- Fixed background video ---------- */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(800px 400px at 20% 10%, rgba(56,189,148,.08), transparent 60%);
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05) brightness(.9);
}

/* ---------- Centering layer ---------- */
.error-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* ---------- Stylized background word (OVER the card) ---------- */
.bg-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;

  z-index: 2;                          /* ABOVE the card */
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: clamp(80px, 20vw, 260px);
  line-height: 1;

  /* Soft, visible on top of card */
  background: linear-gradient(135deg, rgba(185,239,225,.28), rgba(56,189,148,.36));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .28;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

/* ---------- Error card ---------- */
.error-card {
  position: relative;
  z-index: 1;                          /* under bg-text so text stays visible */
  width: auto;                         /* grow with content */
  min-width: var(--card-min);          /* reasonable minimum */
  max-width: min(92vw, var(--card-max));
  background: var(--glass);            /* ~80% opacity */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  backdrop-filter: saturate(1.1) blur(2px);
}

/* Title bar (full gradient, centered) */
.error-titlebar {
  background: var(--grad-primary);
  padding: 16px 18px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.error-title {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 2.2rem, 36px);
  line-height: 1.1;
  color: var(--text);
}

/* Body */
.error-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.error-message {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  text-align: center;
}

/* Button (scoped to error card to avoid overriding global .btn) */
.error-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5ch;
  background: var(--grad-primary);
  color: var(--text);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow .25s ease, transform .12s ease;
}

.error-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

.error-card .btn:focus-visible {
  outline: 2px solid rgba(56,189,148,.55);
  outline-offset: 2px;
}

/* Small screens */
@media (max-width: 480px) {
  .error-body {
    padding: 16px;
    gap: 14px;
  }

  .error-card .btn {
    width: 100%;
    text-align: center;
  }
}

/* === Added: error page hook (error-page) === */
body.error-page {
  background: var(--bg);
}
