/* ============================================================
   NABU RETRO THEME — 80s CRT terminal in NABU blue + white
   Layered on top of MudBlazor. Loaded after MudBlazor.min.css.
   ============================================================ */

:root {
  --retro-blue: #00b4ff;          /* primary electric blue */
  --retro-blue-bright: #5cb8ff;   /* lighter accent */
  --retro-cyan: #00f0ff;          /* phosphor cyan */
  --retro-white: #f0f8ff;         /* bone / alice white */
  --retro-ice: #a8d8ff;            /* soft icy blue */
  --retro-navy: #0353a4;           /* mid navy */
  --retro-deep: #001233;           /* deep navy */
  --retro-deeper: #000814;         /* near-black blue */
  --retro-text: #f0f8ff;
  --retro-glow-blue: 0 0 4px #00b4ff, 0 0 12px rgba(0, 180, 255, 0.6);
  --retro-glow-cyan: 0 0 4px #00f0ff, 0 0 12px rgba(0, 240, 255, 0.6);
  --retro-glow-white: 0 0 4px #f0f8ff, 0 0 10px rgba(240, 248, 255, 0.55);
}

/* ----- Page background: deep blue gradient + horizon grid ----- */
html, body {
  background-color: var(--retro-deeper);
  color: var(--retro-text);
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 180, 255, 0.30), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(0, 240, 255, 0.20), transparent 60%),
    linear-gradient(180deg, #000508 0%, #000814 45%, #001233 75%, #002855 100%);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}

/* Scrolling neon grid floor — fixed-position pseudo element on body */
body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45vh;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(transparent 0%, transparent 60%, var(--retro-deep) 100%),
    repeating-linear-gradient(90deg, transparent 0 49px, rgba(0, 180, 255, 0.55) 49px 50px),
    repeating-linear-gradient(0deg, transparent 0 49px, rgba(0, 240, 255, 0.55) 49px 50px);
  transform: perspective(500px) rotateX(60deg);
  transform-origin: center bottom;
  opacity: 0.55;
  animation: retro-grid-scroll 6s linear infinite;
}

@keyframes retro-grid-scroll {
  0%   { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 0 0, 0 50px; }
}

/* CRT scanlines + flicker over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  animation: retro-flicker 4s infinite steps(60);
}

@keyframes retro-flicker {
  0%, 100% { opacity: 0.6; }
  45%      { opacity: 0.55; }
  47%      { opacity: 0.45; }
  48%      { opacity: 0.7; }
  50%      { opacity: 0.6; }
}

/* ----- App bar: chrome bevel with neon underline ----- */
.mud-appbar {
  background: linear-gradient(180deg, #002855 0%, #001233 100%) !important;
  border-bottom: 2px solid var(--retro-blue);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.4),
    0 4px 18px rgba(0, 180, 255, 0.45),
    inset 0 -1px 0 rgba(0, 240, 255, 0.5);
  backdrop-filter: blur(2px);
}

.mud-appbar .mud-typography-h6 {
  color: var(--retro-cyan);
  text-shadow: var(--retro-glow-cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ----- Drawer / nav ----- */
.mud-drawer {
  background: linear-gradient(180deg, #000814 0%, #001233 100%) !important;
  border-right: 2px solid var(--retro-blue);
  box-shadow: inset -1px 0 0 rgba(0, 240, 255, 0.35);
}

.mud-nav-link {
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.mud-nav-link:hover {
  background-color: rgba(0, 180, 255, 0.12) !important;
  border-left-color: var(--retro-cyan);
  text-shadow: var(--retro-glow-cyan);
}

.mud-nav-link.active {
  background-color: rgba(0, 180, 255, 0.20) !important;
  border-left-color: var(--retro-cyan);
  color: var(--retro-cyan) !important;
  text-shadow: var(--retro-glow-cyan);
}

/* ----- Headings get the neon glow ----- */
.mud-typography-h1,
.mud-typography-h2 {
  color: var(--retro-white);
  text-shadow: var(--retro-glow-white);
  text-transform: uppercase;
}

.mud-typography-h3,
.mud-typography-h4 {
  color: var(--retro-cyan);
  text-shadow: var(--retro-glow-cyan);
  text-transform: uppercase;
}

.mud-typography-h5,
.mud-typography-h6 {
  color: var(--retro-blue);
  text-shadow: var(--retro-glow-blue);
}

/* ----- Buttons: chunky arcade-style ----- */
/* Scoped to real buttons — icon buttons (used inside MudCheckBox, MudSwitch,
   MudRadio, etc.) must stay borderless or they render a second box around
   the control. */
.mud-button-root:not(.mud-icon-button) {
  border-radius: 2px !important;
  border: 1px solid currentColor !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(0, 180, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  transition: all 0.12s ease;
  text-shadow: 0 0 4px currentColor;
}

.mud-button-root:not(.mud-icon-button):hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 14px var(--retro-blue),
    0 0 22px rgba(0, 240, 255, 0.5),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}

.mud-button-root:not(.mud-icon-button):active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(0, 0, 0, 0.4);
}

.mud-button-filled.mud-button-filled-primary {
  background: linear-gradient(180deg, #5cd0ff 0%, #0080d0 100%) !important;
  color: var(--retro-deeper) !important;
  text-shadow: none;
}

.mud-button-filled.mud-button-filled-secondary {
  background: linear-gradient(180deg, #5cf0ff 0%, #00aabb 100%) !important;
  color: var(--retro-deeper) !important;
  text-shadow: none;
}

/* ----- Cards / paper ----- */
.mud-paper,
.mud-card {
  background-color: rgba(0, 18, 51, 0.72) !important;
  border: 1px solid rgba(0, 180, 255, 0.45) !important;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.2),
    0 0 18px rgba(0, 180, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  border-radius: 2px !important;
  backdrop-filter: blur(3px);
}

/* ----- Inputs ----- */
.mud-input-control .mud-input-slot,
.mud-input-control input,
.mud-input-control textarea {
  font-family: "VT323", "Share Tech Mono", monospace !important;
  font-size: 1.1rem !important;
  color: var(--retro-cyan) !important;
  caret-color: var(--retro-cyan);
}

.mud-input.mud-input-outlined fieldset {
  border-color: var(--retro-blue) !important;
  border-width: 2px !important;
  border-radius: 2px !important;
}

.mud-input.mud-input-outlined:hover fieldset {
  border-color: var(--retro-cyan) !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.mud-input.mud-input-outlined.mud-focused fieldset {
  border-color: var(--retro-cyan) !important;
  box-shadow: var(--retro-glow-cyan);
}

.mud-input-label,
.mud-input-label.mud-input-label-outlined {
  color: var(--retro-blue) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "Orbitron", "VT323", monospace !important;
}

.mud-input-label.mud-input-label-animated.mud-focused {
  color: var(--retro-cyan) !important;
  text-shadow: var(--retro-glow-cyan);
}

/* ----- Chips ----- */
.mud-chip {
  border-radius: 2px !important;
  font-family: "Press Start 2P", "Orbitron", monospace !important;
  font-size: 0.6rem !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  box-shadow: 0 0 6px rgba(0, 180, 255, 0.3);
}

/* ----- Links ----- */
a, .mud-link {
  color: var(--retro-cyan);
  text-decoration: none;
}

a:hover, .mud-link:hover {
  color: var(--retro-white);
  text-shadow: var(--retro-glow-white);
}

/* ----- Tables ----- */
.mud-table {
  background-color: rgba(0, 8, 20, 0.7) !important;
  border: 1px solid var(--retro-blue) !important;
}

.mud-table-head .mud-table-cell {
  background: linear-gradient(180deg, #002855 0%, #001233 100%) !important;
  color: var(--retro-white) !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--retro-cyan) !important;
  font-family: "Orbitron", "VT323", monospace !important;
}

.mud-table-row:hover {
  background-color: rgba(0, 180, 255, 0.08) !important;
}

/* ----- Dialog ----- */
.mud-dialog {
  border: 2px solid var(--retro-blue) !important;
  box-shadow:
    0 0 0 1px var(--retro-cyan),
    0 0 30px rgba(0, 180, 255, 0.6) !important;
}

.mud-dialog-title {
  background: linear-gradient(90deg, #001233 0%, #00b4ff 100%);
  color: var(--retro-white) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ----- Snackbar ----- */
.mud-snackbar {
  border: 1px solid var(--retro-cyan) !important;
  box-shadow: var(--retro-glow-cyan) !important;
  font-family: "VT323", monospace !important;
}

/* ----- Scrollbars (WebKit) ----- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--retro-deeper); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--retro-blue) 0%, var(--retro-navy) 100%);
  border: 1px solid var(--retro-cyan);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--retro-cyan) 0%, var(--retro-blue) 100%);
}

/* ----- Selection ----- */
::selection {
  background: var(--retro-blue);
  color: var(--retro-deeper);
  text-shadow: none;
}

/* ----- CMS long-form content ----- */
.cms-content {
  font-family: "VT323", "Share Tech Mono", "Courier New", monospace;
  font-size: 1.5rem;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: var(--retro-text);
}

.cms-content p {
  font-size: 1.5rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cms-content li {
  font-size: 1.45rem;
  line-height: 1.55;
  margin-bottom: 0.35rem;
}

.cms-content blockquote {
  font-size: 1.5rem;
  line-height: 1.6;
  border-left: 3px solid var(--retro-cyan);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--retro-ice);
  background: rgba(0, 240, 255, 0.05);
}

.cms-content code,
.cms-content pre {
  font-family: "Share Tech Mono", "VT323", monospace;
  font-size: 1.15rem;
  background: rgba(0, 8, 20, 0.6);
  border: 1px solid rgba(0, 180, 255, 0.35);
  border-radius: 2px;
  padding: 0.1rem 0.35rem;
  color: var(--retro-cyan);
}

.cms-content pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.cms-content h1 { font-size: 2.6rem; }
.cms-content h2 { font-size: 2.1rem; }
.cms-content h3 { font-size: 1.8rem; }
.cms-content h4 { font-size: 1.6rem; }
.cms-content h5 { font-size: 1.45rem; }
.cms-content h6 { font-size: 1.35rem; }

.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.cms-content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid rgba(0, 180, 255, 0.35);
}

/* ----- Blinking cursor utility (for terminal vibes) ----- */
.retro-cursor::after {
  content: "_";
  color: var(--retro-cyan);
  animation: retro-blink 1s steps(1) infinite;
}

@keyframes retro-blink {
  50% { opacity: 0; }
}

/* ----- Responsive YouTube / video embeds (16:9) ----- */
.video-embed {

  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 1rem auto;
  aspect-ratio: 16 / 9;
  background: var(--retro-deeper);
  border: 1px solid rgba(0, 180, 255, 0.35);
  box-shadow: var(--retro-glow-blue);
  overflow: hidden;
}

.video-embed iframe {

  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
