/* ============================================
   Neovim Theme for Hatena Blog
   Based on: zola-theme-neovim (Catppuccin/Moonlight palette)
   ============================================ */

/* --- Font --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* --- CSS Variables: Dark Mode (default) --- */
:root, .nv-dark {
  --bg-color: rgba(32, 32, 42, 0.95);
  --bg-solid: #20202a;
  --font-color: #cdd6f4;
  --blue: #82aaff;
  --yellow: #ffc777;
  --green: #c3e88d;
  --purple: #dc8add;
  --lavender: #b7c2fd;
  --selection: rgba(66, 135, 245, 0.5);
  --border-color: #cdd6f4;
  --tab-inactive: rgba(205, 214, 244, 0.5);
  --border-width: 3px;
  --code-bg: rgba(183, 194, 253, 0.25);
  --blockquote-border: rgba(130, 170, 255, 0.3);
  --table-border: rgba(205, 214, 244, 0.2);
  --table-header-bg: rgba(130, 170, 255, 0.15);
  --hr-color: rgba(205, 214, 244, 0.2);
  --keyword-dot: rgba(205, 214, 244, 0.3);
}

/* --- CSS Variables: Light Mode --- */
.nv-light {
  --bg-color: rgba(245, 245, 250, 0.95);
  --bg-solid: #f0f0f5;
  --font-color: #1e1e2e;
  --blue: #2563eb;
  --yellow: #b45309;
  --green: #15803d;
  --purple: #9333ea;
  --lavender: #4f46e5;
  --selection: rgba(37, 99, 235, 0.2);
  --border-color: #c0c0cc;
  --tab-inactive: rgba(30, 30, 46, 0.45);
  --border-width: 3px;
  --code-bg: rgba(79, 70, 229, 0.1);
  --blockquote-border: rgba(37, 99, 235, 0.25);
  --table-border: rgba(30, 30, 46, 0.15);
  --table-header-bg: rgba(37, 99, 235, 0.08);
  --hr-color: rgba(30, 30, 46, 0.15);
  --keyword-dot: rgba(30, 30, 46, 0.25);
}

/* Light mode body background */
.nv-light body, .nv-light #container-inner {
  background-color: var(--bg-color) !important;
}
.nv-light {
  background-color: #e8e8f0 !important;
}

/* Light mode scrollbar */
.nv-light ::-webkit-scrollbar-track { background: var(--bg-solid); }
.nv-light ::-webkit-scrollbar-thumb { background: var(--purple); }

/* --- Scrollbar (Firefox) --- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--purple) var(--bg-solid);
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-solid); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 4px; }

/* --- Reset & Base --- */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #1a1a24;
  color: var(--font-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden !important;
  height: 100vh !important;
}

a { color: var(--blue); text-decoration: none; }
a:hover { background-color: var(--selection); }
a:visited { color: var(--blue); }

/* --- Hide Hatena Global Header --- */
#globalheader-container { display: none !important; }

/* --- Hide Hatena default sidebar & box1 --- */
#box2 { display: none !important; }
#box1 { display: none !important; }

/* --- Hide top-editarea (used for script injection, not visible) --- */
#top-editarea { display: none !important; }

/* --- Main Container: Neovim Window --- */
#container {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
#container-inner {
  position: fixed !important;
  top: 1.5vh;
  bottom: 1.5vh;
  left: 1.5vw;
  right: 1.5vw;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 56px !important;
  padding-bottom: 40px !important;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-color);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(205, 214, 244, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.nv-light #container-inner {
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Blog Header + Tab Bar: Fixed, aligned to container --- */
#nv-topbar {
  position: fixed !important;
  top: 1.5vh;
  left: 1.5vw;
  right: 1.5vw;
  z-index: 99999;
  background-color: var(--bg-solid);
  border-bottom: 1px solid rgba(205, 214, 244, 0.1);
  border-radius: 12px 12px 0 0;
}
.nv-light #nv-topbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- Traffic lights (window controls) --- */
#nv-traffic-lights {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  height: 100%;
  flex-shrink: 0;
}
#nv-traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.nv-light-red { background-color: #ff5f57; }
.nv-light-yellow { background-color: #febc2e; }
.nv-light-green { background-color: #28c840; }

/* Original blog title hidden by JS, replaced by #nv-title-bar */
#blog-title { display: none !important; }

#nv-title-bar {
  margin: 0; padding: 0;
  box-shadow: 0px var(--border-width) 0px 0px var(--border-color);
  display: flex;
  align-items: center;
  height: 28px;
}
/* --- Theme toggle switch --- */
#nv-theme-toggle {
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--tab-inactive);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  height: 100%;
  box-shadow: calc(-1 * var(--border-width)) 0px 0px 0px var(--border-color) inset;
  gap: 6px;
}
#nv-theme-toggle:hover {
  color: var(--font-color);
  background-color: var(--selection);
}
#nv-theme-toggle-track {
  width: 32px;
  height: 16px;
  border-radius: 8px;
  background: var(--tab-inactive);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
#nv-theme-toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--font-color);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}
.nv-light #nv-theme-toggle-track {
  background: var(--blue);
}
.nv-light #nv-theme-toggle-thumb {
  left: 18px;
}

/* --- 386 toggle switch --- */
#nv-386-toggle {
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--tab-inactive);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  height: 100%;
  box-shadow: calc(-1 * var(--border-width)) 0px 0px 0px var(--border-color) inset;
  gap: 6px;
}
#nv-386-toggle:hover {
  color: var(--font-color);
  background-color: var(--selection);
}
#nv-386-toggle-track {
  width: 32px;
  height: 16px;
  border-radius: 8px;
  background: var(--tab-inactive);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
#nv-386-toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--font-color);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}
.nv-386 #nv-386-toggle-track {
  background: #00aa00;
}
.nv-386 #nv-386-toggle-thumb {
  left: 18px;
}
.nv-386 #nv-386-label {
  color: #00ff00;
}

/* --- 1984 toggle switch --- */
#nv-1984-toggle {
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--tab-inactive);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  height: 100%;
  box-shadow: calc(-1 * var(--border-width)) 0px 0px 0px var(--border-color) inset;
  gap: 6px;
}
#nv-1984-toggle:hover {
  color: var(--font-color);
  background-color: var(--selection);
}
#nv-1984-toggle-track {
  width: 32px;
  height: 16px;
  border-radius: 8px;
  background: var(--tab-inactive);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
#nv-1984-toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--font-color);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}
.nv-1984 #nv-1984-toggle-track {
  background: #cc0000;
}
.nv-1984 #nv-1984-toggle-thumb {
  left: 18px;
}
.nv-1984 #nv-1984-label {
  color: #cc0000;
  font-weight: bold;
}

/* --- 1984 mode styles --- */
.nv-1984 .entry-content p,
.nv-1984 .entry-content li,
.nv-1984 .entry-content h1,
.nv-1984 .entry-content h2,
.nv-1984 .entry-content h3,
.nv-1984 .entry-content h4,
.nv-1984 .entry-content h5,
.nv-1984 .entry-content blockquote,
.nv-1984 .entry-content td,
.nv-1984 .entry-content th {
  text-decoration: line-through !important;
  text-decoration-color: #cc0000 !important;
  text-decoration-thickness: 2px !important;
}
.nv-1984-msg {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #cc0000 !important;
  padding: 0.6em 1em;
  margin: 0.8em 0;
  border: 1px solid #cc0000;
  background: rgba(204, 0, 0, 0.08);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#nv-title-bar a {
  font-size: 16px;
  color: var(--font-color);
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  background-color: var(--selection);
  box-shadow: calc(-1 * var(--border-width)) 0px 0px 0px var(--border-color) inset;
  text-decoration: none;
}
#nv-title-bar a:hover { background-color: var(--selection); }
#blog-description { display: none !important; }

/* --- Content Layout --- */
#content {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
#content-inner {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --- #wrapper (Hatena's inner wrapper around #main) --- */
#wrapper {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* --- Main Content Area: Viewer --- */
#main {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  width: auto !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#main:focus { outline: none; }
#main-inner {
  padding: 3px 20px 20px 20px !important;
  overflow-y: auto !important;
  flex: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* ============================================
   JS-injected: File Browser (#nv-files)
   ============================================ */
#nv-files {
  width: 20%;
  min-width: 200px;
  max-width: 300px;
  box-shadow: var(--border-width) 0px 0px 0px var(--border-color);
  overflow-x: auto;
  overflow-y: auto;
  padding: 15px 0 15px 10px;
  white-space: nowrap;
  font-size: 13px;
  flex-shrink: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#nv-files::-webkit-scrollbar { display: none; }
#nv-files:focus { outline: none; }

#nv-files ul {
  list-style-type: none;
  padding-left: 0.2em;
  margin: 0;
}
#nv-files li {
  padding-left: 0;
  margin: 0;
  line-height: 1.5;
}
#nv-files a {
  color: var(--font-color);
  text-decoration: none;
  display: inline;
}
#nv-files a:hover,
#nv-files a.nv-selected {
  background-color: var(--selection) !important;
}
#nv-files .nv-tree-prefix {
  color: var(--tab-inactive);
  font-size: 0.9em;
  user-select: none;
  -webkit-user-select: none;
}
#nv-files .nv-folder-icon { color: var(--yellow); }
#nv-files .nv-file-icon { color: var(--blue); }
#nv-files .nv-archive-toggle {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
#nv-files .nv-archive-toggle:hover {
  opacity: 0.7;
}
#nv-files .nv-section-label {
  color: var(--yellow);
  font-size: 12px;
  margin-top: 1.2em;
  margin-bottom: 0.2em;
  padding-left: 0.2em;
  border-bottom: 1px solid rgba(205, 214, 244, 0.15);
  padding-bottom: 0.2em;
}

/* ============================================
   Entry (Post) Styles
   ============================================ */
.entry,
.entry-inner,
.entry-header,
.entry-content,
.entry-footer {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
}
.entry { margin-bottom: 2em; padding-bottom: 1em; }
.entry-header { margin-bottom: 0.5em; }
.entry-title { font-size: 1.4em; margin: 0; }
.entry-title a { color: var(--blue); text-decoration: none; }
.entry-title a:hover { background-color: var(--selection); }
.entry-title a:visited { color: var(--blue); }

.date, .entry-date { font-size: 0.85em; }
.date a, .entry-date a { color: var(--tab-inactive); }
.categories, .entry-tags { margin-top: 0.3em; }
.categories a, .entry-tags a { color: var(--purple); font-size: 0.85em; margin-right: 0.5em; }

/* --- Entry Content --- */
.entry-content {
  text-wrap: balance;
  word-break: break-word;
  font-size: 18px;
  line-height: 2;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.entry-content h1,
.entry-content h1::before { color: var(--blue); }
.entry-content h2,
.entry-content h2::before { color: var(--yellow); }
.entry-content h3,
.entry-content h3::before { color: var(--green); }
.entry-content h4 { color: var(--lavender); }
.entry-content h5 { color: var(--purple); }

.entry-content a { color: var(--blue); }
.entry-content a:hover { background-color: var(--selection); }

/* --- Code Blocks --- */
.entry-content pre {
  background-color: var(--bg-solid) !important;
  padding: 10px; border-radius: 4px; overflow-x: auto;
  text-wrap: auto;
  border: 1px solid rgba(205, 214, 244, 0.15);
}
.entry-content pre code {
  background-color: transparent !important;
  color: var(--font-color); padding: 0; font-size: 1em; border: none;
}

/* --- Inline Code --- */
.entry-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95em; padding: 0.15em 0.4em;
  background-color: var(--code-bg) !important;
  color: var(--lavender); border-radius: 3px; border: none;
}

/* --- Blockquote --- */
.entry-content blockquote {
  background-color: var(--bg-solid);
  border: 1px solid var(--blockquote-border);
  border-left: 3.5px solid var(--blue);
  border-radius: 8px;
  padding: 0.6em 1.2em;
  margin-left: 0 !important;
  margin-right: 0 !important;
  color: var(--font-color);
  position: relative;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.entry-content blockquote p { margin: 0.5em 0; }

/* --- Lists --- */
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li { margin-bottom: 0.3em; }
.entry-content ul li::marker { color: var(--purple); }
.entry-content ol li::marker { color: var(--yellow); }

/* --- Tables --- */
.entry-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--table-border); padding: 0.4em 0.8em; }
.entry-content th { background-color: var(--table-header-bg); color: var(--blue); }
.entry-content tr:hover { background-color: var(--selection); }

/* --- Images --- */
.entry-content img { max-width: 90%; border-radius: 4px; height: auto; }

.nv-mobile .entry-content img { max-width: 98% !important; }


/* --- Horizontal Rule --- */
.entry-content hr { border: none; border-top: 1px solid var(--hr-color); margin: 1.5em 0; }

/* --- Entry Footer --- */
.entry-footer { font-size: 0.85em; margin-top: 1em; }
.entry-footer-section { margin-bottom: 0.3em; }
.entry-footer a { color: var(--tab-inactive); }
.entry-footer a:hover { color: var(--font-color); background-color: var(--selection); }

/* --- Social Buttons --- */
.social-buttons, .entry-footer-html { margin-top: 0.5em; }

/* --- Comment Section --- */
.comment-box { margin-top: 1em; }
.comment-box .comment { border-top: 1px solid rgba(205, 214, 244, 0.1); padding: 0.8em 0; }
.comment-user-name a { color: var(--green); }
.comment-content p { color: var(--font-color); }

/* --- Pager --- */
.pager { display: flex; justify-content: space-between; margin: 1.5em 0; font-size: 0.9em; }
.pager a { color: var(--blue); }

/* --- Hatena Star --- */
.hatena-star-star-container { margin-top: 0.5em; }

/* --- Keyword Link (auto-link by Hatena) --- */
.entry-content a.keyword {
  color: var(--font-color); border-bottom: 1px dotted var(--keyword-dot); background: none;
}
.entry-content a.keyword:hover { border-bottom-color: var(--blue); background-color: var(--selection); }

/* --- Breadcrumb --- */
.breadcrumb { font-size: 0.85em; margin-bottom: 0.5em; }
.breadcrumb a { color: var(--tab-inactive); }

/* --- Read More Link --- */
.entry-see-more a { color: var(--purple); font-size: 0.9em; }
.entry-see-more a::before { content: '>> '; }

/* --- Selection --- */
::selection { background-color: var(--selection); color: var(--font-color); }

/* --- Hide original footer (replaced by prompt bar) --- */
#footer { display: none !important; }

/* ============================================
   JS-injected: Tab Bar
   ============================================ */
.nv-tab {
  width: 100%; height: 28px;
  box-shadow: 0px var(--border-width) 0px 0px var(--border-color);
  overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none;
  display: flex !important; align-items: stretch;
}
.nv-tab::-webkit-scrollbar { display: none; }
.nv-tab ul {
  display: flex; flex-direction: row; padding: 0; margin: 0;
  height: 100%; list-style: none; margin-left: 3px;
}
.nv-tab li {
  padding: 0 12px 0 15px;
  box-shadow: calc(-1 * var(--border-width)) 0px 0px 0px var(--border-color) inset;
  color: var(--tab-inactive) !important;
  display: flex; align-items: center; white-space: nowrap; font-size: 15px;
}
.nv-tab li:hover,
.nv-tab .nv-tab-selected { background-color: var(--selection) !important; }
.nv-tab li:not(.nv-tab-selected) a { color: var(--tab-inactive); }
.nv-tab .nv-tab-selected a { color: var(--font-color); }
.nv-tab a {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 150px; display: block; text-decoration: none; font-size: 15px;
}
.nv-tab a:hover { background-color: transparent; }
.nv-closetab {
  all: unset; cursor: pointer; padding-left: 8px;
  font-size: 11px; color: var(--tab-inactive); line-height: 1;
}
.nv-closetab:hover { color: #C62828; }
.nv-file-manager { display: none; }

/* ============================================
   JS-injected: Prompt Bar (fixed, aligned to container)
   ============================================ */
.nv-prompt {
  position: fixed !important;
  bottom: 1.5vh;
  left: 1.5vw;
  right: 1.5vw;
  height: 40px;
  z-index: 99999;
  background-color: var(--bg-solid);
  box-shadow: 0px calc(-1 * var(--border-width)) 0px 0px var(--border-color);
  border-top: 1px solid rgba(205, 214, 244, 0.1);
  font-size: 10px;
  display: flex !important;
  align-items: center;
  border-radius: 0 0 12px 12px;
}
.nv-light .nv-prompt {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Mode badge (replaces ::before) */
.nv-mode-badge {
  color: var(--bg-solid);
  background-color: var(--blue);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 1.3em;
  margin-right: 1em;
  margin-left: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nv-insert-mode .nv-mode-badge {
  background-color: var(--green);
  color: var(--bg-solid);
}

.nv-prompt label { font-size: 2em; color: var(--font-color); }
.nv-prompt input { position: absolute; left: -9999px; }
.nv-cursor {
  opacity: 0.6; width: 15px; background-color: #fff;
  margin-top: 2ex; margin-bottom: 2ex; position: relative; display: none;
}

/* ============================================
   INSERT mode: Share buttons
   ============================================ */
.nv-insert-buttons {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.nv-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 3px;
  font-size: 1.2em;
  font-weight: bold;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nv-share-btn:hover {
  opacity: 0.8;
  background-color: transparent !important;
}
.nv-share-hatena {
  background-color: #00A4DE;
  color: #fff !important;
}
.nv-share-x {
  background-color: #000;
  color: #fff !important;
}
.nv-share-fb {
  background-color: #1877F2;
  color: #fff !important;
}
.nv-share-reader {
  background-color: var(--purple);
  color: #fff !important;
}

/* ============================================
   SEARCH mode
   ============================================ */
.nv-search-mode .nv-mode-badge {
  background-color: var(--yellow);
  color: var(--bg-solid);
}
.nv-search-input {
  display: none;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  caret-color: var(--yellow);
  line-height: 40px;
  height: 40px;
}
.nv-search-input::placeholder {
  color: var(--tab-inactive);
}

/* ============================================
   JS-injected: Selection highlight
   ============================================ */
a.nv-selected, .nv-selected { background-color: var(--selection) !important; }

/* --- Fullscreen mode (green button) --- */
.nv-fullscreen #nv-topbar { display: none !important; }
.nv-fullscreen .nv-prompt { display: none !important; }
.nv-fullscreen #nv-swipe-dots { display: none !important; }
.nv-fullscreen #container-inner {
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* --- Minimized mode (yellow button): small floating window --- */
.nv-minimized body,
.nv-minimized {
  background: #0e0e16 !important;
}
.nv-light.nv-minimized,
.nv-light.nv-minimized body {
  background: #b0b0c0 !important;
}
/* Minimized base styles (positions set by JS inline) */
.nv-minimized #nv-swipe-dots {
  display: none !important;
}
.nv-minimized #main-inner {
  overflow-y: auto !important;
}
.nv-minimized #nv-files {
  overflow-y: auto !important;
}

/* --- Vim Uganda splash (red button) --- */
#nv-uganda {
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 40px;
  z-index: 99998;
  background-color: var(--bg-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nv-uganda-text {
  color: var(--font-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  background: transparent !important;
  border: none !important;
  padding: 20px !important;
  white-space: pre;
}

/* --- Traffic light cursor --- */
#nv-traffic-lights span { cursor: pointer; }

/* --- Vim blinking cursor at end of content --- */
.nv-vim-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.2em;
  background-color: var(--font-color);
  vertical-align: text-bottom;
  animation: nv-blink 1s step-end infinite;
}
@keyframes nv-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================
   Mobile Responsive — class-based (.nv-mobile)
   Simple show/hide + swipe
   ============================================ */
.nv-mobile,
.nv-mobile body {
  overflow-x: hidden !important;
}
.nv-mobile #container,
.nv-mobile #container-inner,
.nv-mobile #content,
.nv-mobile #content-inner,
.nv-mobile #wrapper,
.nv-mobile #main,
.nv-mobile #main-inner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
}
.nv-mobile #container-inner {
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0;
  overflow: hidden !important;
}
.nv-mobile #content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-height: 0 !important;
}
.nv-mobile #content-inner {
  display: block !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: 100% !important;
}
.nv-mobile #wrapper {
  display: block !important;
  height: 100% !important;
}
.nv-mobile #main {
  display: block !important;
  height: 100% !important;
}
.nv-mobile #main-inner {
  overflow-y: auto !important;
  height: 100% !important;
}
.nv-mobile #main-inner {
  padding: 3px 3% 20px 3% !important;
  overflow-x: hidden !important;
  word-break: break-all;
}

/* Slide rail: two panes side by side, slides via transform */
.nv-mobile #nv-slide-rail {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 200% !important;
  max-width: none !important;
  height: 100% !important;
  transition: transform 0.3s ease;
}
.nv-mobile #nv-slide-rail.nv-show-files {
  transform: translateX(-50%);
}
.nv-mobile #nv-slide-rail > #wrapper,
.nv-mobile #nv-slide-rail > #nv-files {
  width: 50% !important;
  min-width: 50% !important;
  max-width: 50% !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  overflow-y: auto !important;
  height: 100% !important;
}
.nv-mobile #nv-slide-rail > #nv-files {
  padding: 15px 10px !important;
  white-space: normal !important;
}

/* Content overflow */
.nv-mobile .entry-content img,
.nv-mobile .entry-content iframe,
.nv-mobile .entry-content embed,
.nv-mobile .entry-content object,
.nv-mobile .entry-content video {
  max-width: 96% !important;
  width: auto !important;
  height: auto !important;
}
.nv-mobile .twitter-tweet,
.nv-mobile .twitter-tweet-rendered {
  max-width: 96% !important;
}
.nv-mobile .entry-content pre {
  max-width: 94% !important;
  overflow-x: auto !important;
}
.nv-mobile .entry-content table {
  max-width: 94% !important;
  display: block;
  overflow-x: auto !important;
}

.nv-mobile #nv-title-bar a { font-size: 15px; }
.nv-mobile .nv-tab { height: 1.8em; }
.nv-mobile .nv-tab ul { margin-left: 0; }
.nv-mobile .nv-file-manager { display: none !important; }

/* Topbar & prompt: full width on mobile */
.nv-mobile #nv-topbar {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
}
.nv-mobile .nv-prompt {
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
}

/* Swipe indicator dots */
#nv-swipe-dots { display: none; }
.nv-mobile #nv-swipe-dots {
  display: flex !important;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  position: fixed;
  bottom: 42px; left: 0; right: 0;
  z-index: 99998;
  pointer-events: none;
}
.nv-mobile #nv-swipe-dots .nv-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tab-inactive);
  transition: background 0.2s;
}
.nv-mobile #nv-swipe-dots .nv-dot.nv-active {
  background: var(--blue);
}

/* ============================================
   386 mode — retro DOS style (pure CSS, no external deps)
   ============================================ */
@font-face {
  font-family: 'DOS';
  src: url('https://cdn.jsdelivr.net/gh/kristopolous/BOOTSTRA.386@master/assets/fonts/Px437_IBM_EGA8.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
/* 386 common styles */
.nv-386 * {
  font-family: 'DOS', 'Px437_IBM_EGA8', Monaco, Menlo, Consolas, 'Courier New', monospace !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  font-variant-ligatures: none !important;
}
.nv-386 #container-inner {
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.nv-386 #nv-topbar { border-radius: 0 !important; }
.nv-386 .nv-prompt { border-radius: 0 !important; }
.nv-386 .nv-mode-badge { border-radius: 0 !important; }
.nv-386 .nv-share-btn { border-radius: 0 !important; }
.nv-386 .entry-content img {
  filter: url(#nv-386-posterize) !important;
  image-rendering: pixelated;
}

/* 386 + light mode: DOS blue */
.nv-light.nv-386 {
  --bg-color: #0000aa !important;
  --bg-solid: #0000aa !important;
  --font-color: #ffffff !important;
  --blue: #5555ff !important;
  --yellow: #ffff55 !important;
  --green: #00aa00 !important;
  --purple: #ff55ff !important;
  --lavender: #55ffff !important;
  --selection: rgba(255, 255, 85, 0.3) !important;
  --border-color: #00aa00 !important;
  --tab-inactive: rgba(255, 255, 255, 0.5) !important;
  --code-bg: rgba(0, 170, 0, 0.2) !important;
  --blockquote-border: rgba(0, 170, 0, 0.4) !important;
  --table-border: rgba(0, 170, 0, 0.4) !important;
  --table-header-bg: rgba(0, 170, 0, 0.2) !important;
  --hr-color: rgba(0, 170, 0, 0.5) !important;
  --keyword-dot: rgba(0, 170, 0, 0.4) !important;
}
.nv-light.nv-386,
.nv-light.nv-386 body { background-color: #000080 !important; }
.nv-light.nv-386 #container-inner {
  border: 2px solid #00aa00 !important;
  background-color: #0000aa !important;
}
.nv-light.nv-386 #nv-topbar { background-color: #0000aa !important; border-bottom: 1px solid #00aa00 !important; }
.nv-light.nv-386 .nv-prompt { background-color: #0000aa !important; border-top: 1px solid #00aa00 !important; }
.nv-light.nv-386 .entry-content pre { border: 1px solid #00aa00 !important; background-color: #000080 !important; }
.nv-light.nv-386 .entry-content blockquote { border: 1px solid #00aa00 !important; border-left: 3px solid #00aa00 !important; background-color: #000080 !important; }
.nv-light.nv-386 ::selection { background-color: #ffff55 !important; color: #0000aa !important; }
.nv-light.nv-386 ::-webkit-scrollbar-thumb { background: #00aa00 !important; border-radius: 0 !important; }
.nv-light.nv-386 ::-webkit-scrollbar-track { background: #000080 !important; }

/* 386 + dark mode: black terminal */
.nv-dark.nv-386 {
  --bg-color: #000000 !important;
  --bg-solid: #000000 !important;
  --font-color: #aaaaaa !important;
  --blue: #5555ff !important;
  --yellow: #ffff55 !important;
  --green: #00aa00 !important;
  --purple: #ff55ff !important;
  --lavender: #55ffff !important;
  --selection: rgba(170, 170, 170, 0.3) !important;
  --border-color: #555555 !important;
  --tab-inactive: rgba(170, 170, 170, 0.5) !important;
  --code-bg: rgba(85, 85, 85, 0.2) !important;
  --blockquote-border: rgba(85, 85, 85, 0.4) !important;
  --table-border: rgba(85, 85, 85, 0.4) !important;
  --table-header-bg: rgba(85, 85, 85, 0.2) !important;
  --hr-color: rgba(85, 85, 85, 0.5) !important;
  --keyword-dot: rgba(85, 85, 85, 0.4) !important;
}
.nv-dark.nv-386,
.nv-dark.nv-386 body { background-color: #000000 !important; }
.nv-dark.nv-386 #container-inner {
  border: 2px solid #555555 !important;
  background-color: #000000 !important;
}
.nv-dark.nv-386 #nv-topbar { background-color: #000000 !important; border-bottom: 1px solid #555555 !important; }
.nv-dark.nv-386 .nv-prompt { background-color: #000000 !important; border-top: 1px solid #555555 !important; }
.nv-dark.nv-386 .entry-content pre { border: 1px solid #555555 !important; background-color: #111111 !important; }
.nv-dark.nv-386 .entry-content blockquote { border: 1px solid #555555 !important; border-left: 3px solid #555555 !important; background-color: #111111 !important; }
.nv-dark.nv-386 ::selection { background-color: #aaaaaa !important; color: #000000 !important; }
.nv-dark.nv-386 ::-webkit-scrollbar-thumb { background: #555555 !important; border-radius: 0 !important; }
.nv-dark.nv-386 ::-webkit-scrollbar-track { background: #111111 !important; }

