/* =========================================================
   Borked.IT // Copyparty unified theme overrides.
   (Markdown + Browser + Code Viewer)
   ========================================================= */

/* --- 1. GLOBAL UI & BROWSER (Variables) --- */
:root,
html.z,
html.bz {
  --bg: #050505 !important;
  --bg-d1: #0a0a0a !important;
  --bg-d2: #000000 !important;
  --bg-max: #000000 !important;
  --fg: #a3a3a3 !important;
  --fg-max: #ffffff !important;
  --a: #dc2626 !important; /* Borked Red */
  --a-hil: #ef4444 !important;
  --scroll: #dc2626 !important;
  --font-main: "Inter", sans-serif !important;
}

/* --- 2. MARKDOWN OVERRIDES (The Specificity Fix) --- */

/* Background & Global Text */
html.z body,
html.z #mw,
html.z .mdo,
html.z #toc {
  background-color: #050505 !important;
  color: #a3a3a3 !important;
}

/* --- OPTIONAL: BOLD TEXT --- */
/* Keeping bold as pure white to maintain hierarchy */
html.z .mdo strong,
.mdo strong {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* --- CODE BLOCKS & INLINE CODE --- */
/* Overriding the default Copyparty green (#8c0) */
html.z .mdo pre,
html.z .mdo code,
.mdo code,
.mdo pre {
  color: #fca5a5 !important; /* Soft Terminal Red (Red-300) */
  background-color: #171717 !important; /* Deep Charcoal Background */
  border: 1px solid #262626 !important;
  font-family: var(--font-mono) !important;
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
}

/* --- ITALICIZED TEXT --- */
/* Making this more saturated than the code blocks as requested */
html.z .mdo em,
html.z .mdo i,
.mdo em,
.mdo i {
  color: #ef4444 !important; /* Saturated Brand Red (Red-500) */
  font-style: italic !important;
  font-weight: 500 !important; /* Slight weight boost to help it pop */
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* FIX: Headers (Copyparty uses yellow/orange borders) */
html.z .mdo h1,
html.z .mdo h2,
html.z .mdo h3 {
  color: #ffffff !important;
  background: transparent !important;
  font-family: "Inter", sans-serif !important;
  text-transform: uppercase;
}

html.z .mdo h1 {
  border-top: 4px solid #dc2626 !important; /* Your Red */
  border-bottom: 1px solid #262626 !important;
}

html.z .mdo h2 {
  border-bottom: 1px dashed #404040 !important;
}

/* Links in Markdown */
html.z .mdo a {
  color: #ef4444 !important;
  background: transparent !important; /* Kills the default blue background */
  border-bottom: 1px solid #991b1b !important;
  padding: 0 2px !important;
}

html.z .mdo a:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* --- 3. DOCUMENT VIEWER / PRISM --- */
html.z #doc,
html.z pre[class*="language-"] {
  background-color: #0a0a0a !important;
  border: 1px solid #262626 !important;
  box-shadow: none !important;
}

/* Line numbers area */
html.z .line-numbers .line-numbers-rows {
  background: #050505 !important;
  border-right: 1px solid #262626 !important;
}

/* --- 4. NAVIGATION & BROWSER UI --- */
html.z #mn,
html.z #mh,
html.z #barpos {
  background-color: #000000 !important;
  border-bottom: 1px solid #262626 !important;
}

/* Red Tint Icons for the Browser */
.ico {
  filter: grayscale(1) brightness(0.7) sepia(1) hue-rotate(-50deg) saturate(6) !important;
}
