:root {
  --npn-gold: #d7aa3f;
  --npn-gold-soft: rgba(215, 170, 63, 0.55);
  --npn-red: #ff263a;
  --npn-red-soft: rgba(255, 38, 58, 0.55);
  --npn-steel: #9eb0bf;
  --npn-bg: #030507;
}

html,
body {
  background: #030507 !important;
  min-height: 100% !important;
}

body {
  background-image:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.85)),
    url("/npn-assets/fort-knox-bg.svg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed !important;
  color: #dce6ef !important;
  overflow-x: hidden !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.018) 0px,
      rgba(255,255,255,0.018) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 50% 40%, rgba(255,38,58,0.10), transparent 42%);
  mix-blend-mode: screen;
}

body::after {
  content: "NORTH POLE NETWORKS  •  SECURE ACCESS GATEWAY  •  2FA REQUIRED";
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  padding: 10px 26px;
  border: 1px solid rgba(215,170,63,0.45);
  border-radius: 999px;
  background: rgba(3,5,7,0.72);
  box-shadow:
    0 0 28px rgba(215,170,63,0.18),
    inset 0 0 18px rgba(255,38,58,0.08);
  color: #f4d982;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.8px;
  text-align: center;
  white-space: nowrap;
}

#root {
  position: relative !important;
  z-index: 2 !important;
}

#root::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  width: 142px;
  height: 142px;
  z-index: 1;
  pointer-events: none;
  background-image: url("/npn-assets/npn-fort-knox-shield.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter:
    drop-shadow(0 0 22px rgba(215,170,63,0.42))
    drop-shadow(0 0 30px rgba(255,38,58,0.18));
  opacity: 0.98;
}

#root::after {
  content: "UNAUTHORIZED ACCESS PROHIBITED • ACTIVITY LOGGED";
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  color: rgba(255, 218, 126, 0.72);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* Hardened login card look - Authelia currently uses Material UI classes */
.MuiPaper-root,
.MuiCard-root,
[class*="MuiPaper"],
[class*="MuiCard"] {
  background: rgba(5, 9, 13, 0.86) !important;
  border: 1px solid rgba(215,170,63,0.42) !important;
  border-radius: 18px !important;
  box-shadow:
    0 0 0 1px rgba(255,38,58,0.08),
    0 0 45px rgba(0,0,0,0.85),
    0 0 38px rgba(215,170,63,0.12),
    inset 0 0 38px rgba(255,255,255,0.035) !important;
  backdrop-filter: blur(10px) saturate(120%) !important;
}

.MuiTypography-h4,
.MuiTypography-h5,
.MuiTypography-h6,
[class*="MuiTypography-h"] {
  color: #f7d675 !important;
  font-weight: 900 !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
}

.MuiTypography-body1,
.MuiTypography-body2,
.MuiFormLabel-root,
.MuiInputLabel-root,
label,
p,
span {
  color: #cfd9e3 !important;
}

.MuiOutlinedInput-root,
.MuiInputBase-root,
input {
  color: #ffffff !important;
}

.MuiOutlinedInput-notchedOutline,
fieldset {
  border-color: rgba(215,170,63,0.42) !important;
}

.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline,
.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: #ff263a !important;
  box-shadow: 0 0 18px rgba(255,38,58,0.18) !important;
}

.MuiButton-contained,
.MuiButton-containedPrimary,
button[type="submit"] {
  background: linear-gradient(135deg, #8a000d, #ff263a 48%, #d7aa3f) !important;
  color: #050505 !important;
  font-weight: 900 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  border-radius: 12px !important;
  box-shadow:
    0 0 22px rgba(255,38,58,0.22),
    0 0 28px rgba(215,170,63,0.12) !important;
}

.MuiButton-text,
a {
  color: #f4d982 !important;
}

.MuiAvatar-root,
img[alt*="Authelia"],
img[src*="logo"] {
  filter:
    drop-shadow(0 0 16px rgba(215,170,63,0.48))
    drop-shadow(0 0 20px rgba(255,38,58,0.18)) !important;
}

/* Subtle security scan animation */
@keyframes npn-scan {
  0% { transform: translateY(-120vh); opacity: 0; }
  12% { opacity: 0.65; }
  88% { opacity: 0.35; }
  100% { transform: translateY(120vh); opacity: 0; }
}

main::before,
.MuiContainer-root::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,38,58,0.85), rgba(215,170,63,0.75), transparent);
  box-shadow: 0 0 24px rgba(255,38,58,0.35);
  animation: npn-scan 7s linear infinite;
}

@media (max-width: 700px) {
  body::after {
    width: calc(100% - 32px);
    font-size: 10px;
    letter-spacing: 1.4px;
    white-space: normal;
  }

  #root::before {
    top: 92px;
    width: 110px;
    height: 110px;
  }

  #root::after {
    width: calc(100% - 32px);
    font-size: 10px;
    letter-spacing: 1.5px;
    white-space: normal;
  }
}
