/* ============================================
   RETRO NEON / SYNTHWAVE THEME
   MkDocs Material Custom Override
   
   DESIGN PHILOSOPHY:
   - Dark background for the retro vibe
   - WHITE body text for easy reading
   - Neon colours ONLY for accents & structure
   - Matrix green for code
   - Amber for tips & callouts  
   - Magenta for active/interactive elements
   - Cyan for links
   ============================================ */

/* --- Color Scheme Variables --- */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0f0f1a;
  --md-default-fg-color: #e8e8e8;
  --md-default-fg-color--light: #cccccc;
  --md-default-fg-color--lighter: #999999;
  --md-default-fg-color--lightest: #666666;
  --md-primary-fg-color: #6600cc;
  --md-primary-fg-color--light: #7722dd;
  --md-primary-fg-color--dark: #4400aa;
  --md-primary-bg-color: #1a1a2e;
  --md-primary-bg-color--light: #22223a;
  --md-accent-fg-color: #ff66ff;
  --md-accent-fg-color--transparent: rgba(255, 102, 255, 0.12);
  --md-accent-bg-color: #1a1a2e;
  --md-code-bg-color: #0a1a0a;
  --md-code-fg-color: #00dd44;
  --md-code-hl-color: rgba(255, 255, 102, 0.12);
  --md-code-hl-number-color: #ffcc33;
  --md-code-hl-string-color: #66ff99;
  --md-code-hl-keyword-color: #ff66ff;
  --md-code-hl-function-color: #66ffff;
  --md-code-hl-comment-color: #666666;
  --md-code-hl-constant-color: #ffcc33;
  --md-code-hl-operator-color: #cccccc;
  --md-code-hl-punctuation-color: #999999;
  --md-code-hl-name-color: #e8e8e8;
  --md-code-hl-special-color: #ff66ff;
  --md-code-hl-generic-color: #e8e8e8;
  --md-code-hl-variable-color: #66ffff;
  --md-typeset-color: #e8e8e8;
  --md-typeset-a-color: #66ffff;
  --md-admonition-bg-color: #141425;
  --md-footer-bg-color: #0a0a14;
  --md-footer-bg-color--dark: #060610;
  --md-footer-fg-color: #999999;
  --md-footer-fg-color--light: #777777;
  --md-footer-fg-color--lighter: #555555;
  --md-shadow-z1: 0 0 8px rgba(102, 0, 204, 0.3);
  --md-shadow-z2: 0 0 16px rgba(102, 0, 204, 0.4);
  --md-shadow-z3: 0 0 24px rgba(102, 0, 204, 0.5);
}

/* --- Body & Page Background --- */
body {
  background-color: #0f0f1a !important;
}

.md-main {
  background-color: #0f0f1a;
}

/* --- Typography: WHITE body text for readability --- */
.md-typeset {
  color: #e8e8e8;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  line-height: 1.8;
}

/* h1 = Magenta glow (page titles — the star of the show) */
.md-typeset h1 {
  color: #ff66ff;
  text-shadow: 0 0 10px rgba(255, 102, 255, 0.4);
  border-bottom: 2px solid #331144;
  padding-bottom: 0.4em;
  font-size: 1.6em;
}

/* h2 = Cyan (main sections — clearly different from h1) */
.md-typeset h2 {
  color: #66ffff;
  text-shadow: 0 0 6px rgba(102, 255, 255, 0.25);
  border-bottom: 1px solid #1a3333;
  padding-bottom: 0.3em;
}

/* h3 = Amber/Gold (subsections — warm contrast to cyan) */
.md-typeset h3 {
  color: #ffbb33;
  text-shadow: 0 0 4px rgba(255, 187, 51, 0.2);
}

/* h4-h6 = White with subtle accents (less prominent) */
.md-typeset h4 {
  color: #ffffff;
  font-style: italic;
}

.md-typeset h5 {
  color: #cccccc;
}

.md-typeset h6 {
  color: #aaaaaa;
}

/* --- Links = Cyan (classic terminal link colour) --- */
.md-typeset a {
  color: #66ffff;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.md-typeset a:hover,
.md-typeset a:focus {
  color: #ff66ff;
  text-shadow: 0 0 6px rgba(255, 102, 255, 0.4);
}

/* --- Top Header Bar = Deep purple gradient --- */
.md-header {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%) !important;
  border-bottom: 1px solid #2a2a44;
  box-shadow: 0 2px 12px rgba(102, 0, 204, 0.3);
}

.md-header__title {
  color: #ff66ff;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

.md-header__button {
  color: #cccccc;
}

.md-header__topic {
  color: #ff66ff;
}

/* --- Tabs (top navigation tabs) --- */
.md-tabs {
  background-color: #0d0d1a;
  border-bottom: 1px solid #2a2a44;
}

.md-tabs__link {
  color: #999999;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #ff66ff;
}

.md-tabs__item--active {
  border-bottom: 2px solid #ff66ff;
}

/* --- Sidebar Navigation --- */
.md-sidebar {
  background-color: #0f0f1a;
  border-right: 1px solid #1a1a2e;
}

.md-sidebar--secondary {
  border-left: 1px solid #1a1a2e;
  border-right: none;
}

.md-nav {
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 0.68rem;
}

.md-nav__title {
  color: #ffbb33;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.md-nav__link {
  color: #cccccc;
  transition: color 0.2s ease, border-left 0.2s ease;
}

.md-nav__link:hover {
  color: #66ffff;
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  color: #ff66ff !important;
  border-left: 3px solid #ff66ff;
  padding-left: 8px;
  text-shadow: 0 0 6px rgba(255, 102, 255, 0.3);
}

.md-nav__item--nested > .md-nav__link {
  color: #dddddd;
}

/* Sidebar scrollbar */
.md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 4px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-track {
  background: #0f0f1a;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background: #2a2a44;
  border-radius: 2px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
  background: #6600cc;
}

/* --- Content Area --- */
.md-content {
  background-color: #0f0f1a;
}

.md-content__inner {
  margin-bottom: 2rem;
}

/* --- Tables = Clean with subtle neon accents --- */
.md-typeset table:not([class]) {
  border: 1px solid #2a2a44;
  box-shadow: 0 0 6px rgba(102, 0, 204, 0.15);
  border-collapse: collapse;
  font-size: 0.75rem;
}

.md-typeset table:not([class]) thead {
  background-color: #1a1a2e;
  border-bottom: 2px solid #6600cc;
}

.md-typeset table:not([class]) th {
  color: #ffbb33;
  font-weight: 600;
  border: 1px solid #2a2a44;
  padding: 0.6rem 0.8rem;
}

.md-typeset table:not([class]) td {
  color: #e0e0e0;
  border: 1px solid #222233;
  padding: 0.5rem 0.8rem;
}

.md-typeset table:not([class]) tbody tr {
  background-color: #12121e;
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background-color: #161628;
}

.md-typeset table:not([class]) tbody tr:hover {
  background-color: #1a1a2e;
}

/* --- Code Blocks = Matrix Green on dark (the hacker vibe) --- */
.md-typeset pre {
  background-color: #0a1a0a !important;
  border: 1px solid #1a3a1a;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 200, 50, 0.1);
}

.md-typeset pre > code {
  color: #00dd44;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 0.8rem;
}

.md-typeset code {
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

/* --- Inline Code = Amber on dark (the DOS vibe) --- */
.md-typeset :not(pre) > code {
  background-color: #1a1500;
  color: #ffbb33;
  border: 1px solid #332800;
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.8em;
}

/* --- Code copy button --- */
.md-clipboard {
  color: #555555;
}

.md-clipboard:hover {
  color: #00dd44;
}

/* --- Code line numbers & highlighting --- */
.md-typeset .highlight .linenodiv {
  color: #555555;
}

.md-typeset .highlight .hll {
  background-color: rgba(0, 221, 68, 0.08);
}

/* --- Admonitions = Subtle dark bg with coloured left borders --- */
.md-typeset .admonition,
.md-typeset details {
  background-color: #141425;
  border: 1px solid #2a2a44;
  box-shadow: 0 0 6px rgba(102, 0, 204, 0.1);
  border-radius: 4px;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background-color: rgba(26, 26, 46, 0.8) !important;
  color: #ffffff;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  border-bottom: 1px solid #2a2a44;
}

/* Tip = Amber (warm, helpful) */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left: 4px solid #ffbb33;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  color: #ffbb33;
}

/* Note = Cyan (informational) */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-left: 4px solid #66ffff;
}

.md-typeset .admonition.note > .admonition-title,
.md-typeset details.note > summary {
  color: #66ffff;
}

/* Warning = Orange (attention) */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left: 4px solid #ff8833;
}

.md-typeset .admonition.warning > .admonition-title,
.md-typeset details.warning > summary {
  color: #ff8833;
}

/* Danger = Red (critical) */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left: 4px solid #ff3344;
}

.md-typeset .admonition.danger > .admonition-title,
.md-typeset details.danger > summary {
  color: #ff3344;
}

/* Info = Cyan */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-left: 4px solid #66ffff;
}

.md-typeset .admonition.info > .admonition-title,
.md-typeset details.info > summary {
  color: #66ffff;
}

/* Example = Magenta */
.md-typeset .admonition.example,
.md-typeset details.example {
  border-left: 4px solid #ff66ff;
}

.md-typeset .admonition.example > .admonition-title,
.md-typeset details.example > summary {
  color: #ff66ff;
}

/* Success = Green */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-left: 4px solid #44dd66;
}

.md-typeset .admonition.success > .admonition-title,
.md-typeset details.success > summary {
  color: #44dd66;
}

/* Abstract = Light blue */
.md-typeset .admonition.abstract,
.md-typeset details.abstract {
  border-left: 4px solid #66ccff;
}

.md-typeset .admonition.abstract > .admonition-title,
.md-typeset details.abstract > summary {
  color: #66ccff;
}

/* Question = Teal */
.md-typeset .admonition.question,
.md-typeset details.question {
  border-left: 4px solid #44ddaa;
}

.md-typeset .admonition.question > .admonition-title,
.md-typeset details.question > summary {
  color: #44ddaa;
}

/* Bug = Red */
.md-typeset .admonition.bug,
.md-typeset details.bug {
  border-left: 4px solid #ff4444;
}

.md-typeset .admonition.bug > .admonition-title,
.md-typeset details.bug > summary {
  color: #ff4444;
}

/* Quote = Muted grey */
.md-typeset .admonition.quote,
.md-typeset details.quote {
  border-left: 4px solid #888888;
}

.md-typeset .admonition.quote > .admonition-title,
.md-typeset details.quote > summary {
  color: #aaaaaa;
}

/* --- Search Bar --- */
.md-search__input {
  background-color: #12121e !important;
  color: #e8e8e8 !important;
  border: 1px solid #2a2a44 !important;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

.md-search__input::placeholder {
  color: #666666 !important;
}

.md-search__input:hover,
.md-search__input:focus {
  border-color: #6600cc !important;
  box-shadow: 0 0 6px rgba(102, 0, 204, 0.3);
}

.md-search__icon {
  color: #999999;
}

.md-search-result {
  background-color: #12121e;
}

.md-search-result__meta {
  background-color: #0f0f1a;
  color: #666666;
}

.md-search-result__link {
  border-bottom: 1px solid #1a1a2e;
}

.md-search-result__link:hover {
  background-color: #1a1a2e;
}

.md-search-result__article h1 {
  color: #ff66ff;
}

.md-search-result mark {
  background-color: rgba(255, 102, 255, 0.2);
  color: #ff66ff;
}

/* --- Footer --- */
.md-footer {
  background-color: #0a0a14;
  border-top: 1px solid #2a2a44;
}

.md-footer__inner {
  color: #666666;
}

.md-footer__link {
  color: #999999;
}

.md-footer__link:hover {
  color: #66ffff;
}

.md-footer-meta {
  background-color: #0a0a14;
}

.md-footer-meta__inner {
  color: #666666;
}

/* --- Tags / Badges --- */
.md-typeset .md-tag {
  background-color: #2a2a44;
  color: #ffffff;
  border: 1px solid #444466;
  border-radius: 3px;
  font-size: 0.7em;
  padding: 0.15em 0.5em;
}

/* --- Tabbed Content --- */
.md-typeset .tabbed-labels > label {
  color: #999999;
  border-bottom: 2px solid transparent;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

.md-typeset .tabbed-labels > label:hover {
  color: #66ffff;
}

.md-typeset .tabbed-labels > .tabbed-alternate .tabbed-labels > label.tabbed--active,
.md-typeset .tabbed-set > input:checked + label {
  color: #ff66ff;
  border-bottom-color: #ff66ff;
}

/* Tab indicator */
.md-typeset .tabbed-labels::after {
  background-color: #ff66ff;
}

/* --- Blockquotes = Amber border (warm, thoughtful) --- */
.md-typeset blockquote {
  border-left: 4px solid #ffbb33;
  color: #cccccc;
  background-color: rgba(40, 30, 10, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 0 4px 4px 0;
}

/* --- Horizontal Rules = Subtle gradient --- */
.md-typeset hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #6600cc, #ff66ff, #6600cc, transparent);
  margin: 1.5em 0;
}

/* --- Lists = White bullets with subtle accents --- */
.md-typeset ul li::marker {
  color: #ff66ff;
}

.md-typeset ol li::marker {
  color: #66ffff;
}

/* --- Strong / Bold = White (stands out on any page) --- */
.md-typeset strong {
  color: #ffffff;
  font-weight: 700;
}

/* --- Emphasis / Italic = Soft cyan --- */
.md-typeset em {
  color: #aaddee;
}

/* --- Global Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
  background: #2a2a44;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6600cc;
}

/* --- Selection Highlight --- */
::selection {
  background-color: rgba(102, 0, 204, 0.4);
  color: #ffffff;
}

/* --- TOC (Table of Contents) right sidebar --- */
.md-nav--secondary .md-nav__link {
  color: #888888;
}

.md-nav--secondary .md-nav__link--active {
  color: #66ffff !important;
}

.md-nav--secondary .md-nav__link:hover {
  color: #ff66ff;
}

/* --- Source/Edit button --- */
.md-source {
  color: #999999;
}

.md-source:hover {
  color: #ff66ff;
}

/* --- Keyboard keys = Amber (DOS feel) --- */
.md-typeset kbd {
  background-color: #1a1500;
  color: #ffbb33;
  border: 1px solid #332800;
  box-shadow: 0 1px 0 #332800;
}

/* --- Definition lists --- */
.md-typeset dt {
  color: #66ffff;
  font-weight: 600;
}

/* ============================================
   COLOR PALETTE REFERENCE
   ============================================
   Body text:   #e8e8e8  (white/light grey — easy reading)
   Bold:        #ffffff  (pure white — emphasis)
   Italic:      #aaddee  (soft cyan)
   
   h1:          #ff66ff  (Magenta — page titles)
   h2:          #66ffff  (Cyan — sections)
   h3:          #ffbb33  (Amber — subsections)
   h4:          #ffffff  (White italic)
   
   Links:       #66ffff  (Cyan), hover: #ff66ff (Magenta)
   Code blocks: #00dd44  (Matrix Green on dark green bg)
   Inline code: #ffbb33  (Amber on dark amber bg)
   
   Nav active:  #ff66ff  (Magenta)
   Nav hover:   #66ffff  (Cyan)
   Nav titles:  #ffbb33  (Amber)
   
   Table heads:  #ffbb33 (Amber)
   Table text:   #e0e0e0 (Light grey)
   
   Tip boxes:    #ffbb33 (Amber)
   Info boxes:   #66ffff (Cyan)
   Warning:      #ff8833 (Orange)
   Danger:       #ff3344 (Red)
   Success:      #44dd66 (Green)
   ============================================ */

/* --- Progress bars (if used) --- */
.md-typeset .progress-bar {
  background-color: #1a0033;
}

.md-typeset .progress-bar__fill {
  background: linear-gradient(90deg, #6600cc, #ff66ff);
}

/* --- Announcement bar (if configured) --- */
.md-banner {
  background-color: #1a0033;
  color: #ff66ff;
  border-bottom: 1px solid #330066;
}

/* --- Dialog / Modal --- */
.md-dialog {
  background-color: #0d001a;
  border: 1px solid #330066;
  box-shadow: 0 0 16px rgba(102, 0, 204, 0.5);
}

/* --- Tooltip --- */
.md-tooltip {
  background-color: #1a0033;
  color: #cc99ff;
  border: 1px solid #330066;
}

/* --- Back to top button --- */
.md-top {
  background-color: #1a0033;
  color: #ff66ff;
  border: 1px solid #330066;
  box-shadow: 0 0 8px rgba(102, 0, 204, 0.4);
}

.md-top:hover {
  background-color: #220044;
}

/* --- Task Board: Floating Legend --- */
.todo-legend {
  float: right;
  max-width: 280px;
  margin: 0 0 1rem 1.5rem;
}

.todo-legend .admonition {
  font-size: 0.8rem;
  margin-top: 0;
}

@media screen and (max-width: 768px) {
  .todo-legend {
    float: none;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* --- Home Page: Hero Tagline --- */
.hero-tagline {
  text-align: center;
  font-size: 1.1rem;
  color: #bb86fc;
  margin: -0.5rem 0 0.5rem 0;
}

/* --- Nav: Coloured Section Headers --- */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link {
  color: #bb86fc !important;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid #bb86fc;
  padding-left: 0.6rem;
  margin-top: 0.5rem;
}

.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link:hover,
.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link:hover {
  color: #e040fb !important;
  border-left-color: #e040fb;
}
