/* ======================================================
   BC Hyper Chain – DOCS THEME (FINTECH EDITION)
   ====================================================== */

:root {
  /* Light Mode - Explorer Specs */
  --bg-pre: #fbfcfd;
  --bg-card: #ffffff;
  --bg-sub: #f8f9fa;
  --text-accent: #0787d0;
  --text-main: #000000;
  --border: #e9ecef;
}

[data-theme="dark"] {
  /* Dark Mode - Explorer Specs */
  --bg-pre: #151515;
  --bg-card: #111111;
  --bg-sub: #151515;
  --text-accent: #73b5e4;
  --text-main: #ffffff;
  --border: #202020;
}

[data-theme="dim"] {
  /* Dim Mode - Explorer Specs */
  --bg-pre: #151F35;
  --bg-card: #111A2E;
  --bg-sub: #162138;
  --text-accent: #096DA3;
  --text-main: #ffffff;
  --border: #243040;
}

/* ======================================================
   BASE LAYOUT (Real Docs Feel)
   ====================================================== */

body {
  background-color: var(--bg-pre) !important;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

/* Content Area - No Box, No Shadow */
.content, main {
  background-color: var(--bg-pre) !important;
}

.markdown-section {
  background: transparent !important;
  max-width: 850px !important;
  margin: 0 auto !important;
  padding: 60px 25px !important;
}

/* ======================================================
   SIDEBAR (Web3 Compact Tree Style)
   ====================================================== */

.sidebar {
  background-color: var(--bg-card) !important;
  border-right: 1px solid var(--border) !important;
  width: 260px !important;
  padding: 10px 0 !important;
}

/* Global Reset */
.sidebar-nav ul, .sidebar-nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sidebar-nav li::before, .sidebar-nav a::before {
  content: none !important;
}

/* 1. MAIN CATEGORY HEADERS (Validator, DApp development) */
.sidebar-nav > ul > li {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--text-accent);
  padding: 12px 20px 4px !important; /* Space above category */
  opacity: 0.9;
}

/* 2. MENU LINKS (General Links) */
.sidebar-nav a {
  color: var(--text-main) !important;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 20px !important; /* Tight vertical spacing */
  display: flex !important;
  align-items: center;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

/* 3. SUB-MENU LOGIC (The Branch Effect) */
.sidebar-nav ul li ul {
  margin-left: 24px !important; /* Alignment indent */
  border-left: 1px solid var(--border); /* The branch line */
  margin-bottom: 5px !important;
}

.sidebar-nav ul li ul li a {
  padding: 4px 15px !important; /* Very tight sub-items */
  font-size: 12.5px !important;
  border-left: none !important;
}

/* 4. ACTIVE & HOVER STATES */
.sidebar-nav li.active > a {
  color: var(--text-accent) !important;
  font-weight: 700;
  background: var(--bg-sub);
  border-left: 2px solid var(--text-accent) !important; /* Neon Indicator */
}

.sidebar-nav a:hover {
  background: var(--bg-sub);
  color: var(--text-accent) !important;
}

/* 5. LUCIDE ICONS (Multi-color Support) */
.sidebar-nav i.lucide {
  width: 14px !important;
  height: 14px !important;
  margin-right: 10px !important;
  stroke-width: 2.5px;
}

.sidebar img {
  padding: 8px 20px !important;
}

.icon-blue { stroke: #3b82f6; }
.icon-amber { stroke: #f59e0b; }
.icon-emerald { stroke: #10b981; }
.icon-rose { stroke: #f43f5e; }
.icon-purple { stroke: #a855f7; }
.icon-cyan { stroke: #06b6d4; }

.sidebar-toggle {
  display: none;
}


/* ======================================================
   TYPOGRAPHY
   ====================================================== */

.markdown-section h1 {
  font-family: 'Sora', sans-serif;
  color: var(--text-accent) !important;
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 30px;
}

.markdown-section h2 {
  font-family: 'Sora', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  margin-top: 50px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.markdown-section h3 {
  font-family: 'Sora', sans-serif;
  color: var(--text-main);
  font-weight: 600;
}

.markdown-section p, .markdown-section li {
  color: var(--text-main);
  opacity: 0.85; /* Better for long-form reading */
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ======================================================
   CODE & TECHNICAL ELEMENTS
   ====================================================== */

/* Inline Code `like this` */
.markdown-section code {
  background-color: var(--bg-sub) !important;
  color: var(--text-accent) !important;
  border: 1px solid var(--border);
  padding: 3px 6px !important;
  border-radius: 6px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9em;
}

/* Multi-line code blocks */
.markdown-section pre {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  padding: 20px !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

.markdown-section pre code {
  background: transparent !important;
  border: none !important;
  color: var(--text-main) !important;
}

/* ======================================================
   TOP NAVBAR (navbar.md)
   ====================================================== */

.app-nav {
  position: fixed;
  right: 40px;
  top: 15px;
  z-index: 100;
}

.app-nav a {
  color: var(--text-main) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
}

.app-nav a:hover {
  color: var(--text-accent) !important;
}

/* ======================================================
   THEME TOGGLE BUTTON
   ====================================================== */

.theme-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-accent);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.08);
}

/* ======================================================
   TABLES
   ====================================================== */

.markdown-section table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
}

.markdown-section table th {
  background: var(--bg-sub);
  padding: 12px 15px;
  font-weight: bold;
  border-bottom: 1px solid var(--border);
}

.markdown-section table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.markdown-section table th:last-child {
  width: 100%;
}

.cli-tbl-div table {
  width: 80% !important;
}
.cli-tbl-div table th:nth-child(1) {
  width: 40% !important;
}

/* ======================================================
   TOP NAVIGATION FIX
   ====================================================== */

.app-nav {
  position: fixed;
  right: 40px;
  top: 20px;
  z-index: 100;
  margin: 0;
}

.app-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-nav li {
  display: inline-block;
}

/* Style the link as a Fintech Action Button */
.app-nav a {
  color: var(--text-accent) !important; /* Blue color from explorer */
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  padding: 8px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.app-nav a:hover {
  background-color: var(--bg-sub);
  border-color: var(--text-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7, 135, 208, 0.15);
}

/* Small adjustment for mobile */
@media (max-width: 768px) {
  .app-nav {
    top: 15px;
    right: 20px;
  }
}


/* ======================================================
   MARKDOWN CONTENT REFINEMENT
   ====================================================== */

/* Link Styling - Styled like Explorer buttons/links */
.markdown-section a:not(.button) {
  color: var(--text-accent) !important;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.markdown-section a:not(.button):hover {
  border-bottom: 1px solid var(--text-accent);
  opacity: 0.8;
}

/* Bullet List Styling */
.markdown-section ul {
  list-style: none;
  padding-left: 10px;
}

.markdown-section ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
}

/* Custom Bullet Marker (Colored Blue) */
.markdown-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 2px;
  background-color: var(--text-accent);
  border-radius: 2px;
}

/* Numbered List Styling */
.markdown-section ol {
  counter-reset: custom-counter;
  list-style: none;
  padding-left: 10px;
}

.markdown-section ol li {
  counter-increment: custom-counter;
  position: relative;
  padding-left: 35px;
  margin-bottom: 15px;
}

/* Custom Number Marker (Fintech Circle) */
.markdown-section ol li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background-color: var(--bg-sub);
  border: 1px solid var(--border);
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bold text sync */
.markdown-section strong, .markdown-section b {
  color: var(--text-main);
  font-weight: 700;
}

/* ======================================================
   WALLET & IMAGE STYLING
   ====================================================== */

/* Special block for Network Configurations */
.markdown-section .config-block {
  background-color: var(--bg-sub) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--text-accent) !important;
  padding: 20px;
  border-radius: 12px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 15px 0;
  color: var(--text-main);
}

.markdown-section .config-block strong {
  color: var(--text-accent);
  margin-right: 5px;
}

/* Image Styling - Standard Docs Look */
.markdown-section img {
  display: block;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: 30px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.markdown-section img:hover {
  transform: scale(1.01);
}

/* Horizontal line polish */
.markdown-section hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}


/* ======================================================
   CONSENSUS & SLASHING STYLING
   ====================================================== */

/* Red warning box for Slashing/Penalties */
.markdown-section .penalty-box {
  background-color: rgba(244, 63, 94, 0.05) !important;
  border: 1px solid rgba(244, 63, 94, 0.2) !important;
  border-left: 4px solid #f43f5e !important;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  color: var(--text-main);
}

.markdown-section .penalty-box strong {
  color: #f43f5e;
  display: block;
  margin-bottom: 5px;
}

/* Ensure sub-headers H3 also align with icons */
.markdown-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  color: var(--text-main);
}


/* ======================================================
   GENESIS SPECIFICATION STYLING
   ====================================================== */

/* Styles the parameter list to look like a technical dashboard */
.markdown-section ul li i[data-lucide] {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  opacity: 0.8;
}

/* Image container with specific caption styling */
.markdown-section .img-container {
  margin: 40px 0;
  padding: 20px;
  background-color: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* Specific styling for the parameter names to make them stand out */
.markdown-section ul li strong {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background-color: rgba(7, 135, 208, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-accent);
}


/* ======================================================
   VALIDATOR PAGE SPECIFIC STYLING
   ====================================================== */

/* Indented technical rows for a "Docs" feel */
.markdown-section .tech-row {
  border-left: 2px solid var(--border);
  padding: 5px 0 5px 25px;
  margin: 15px 0 30px 5px;
}

/* Styled Data Pills (Fintech Style) */
.info-pill-container {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.info-pill {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.info-pill .pill-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-accent);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.info-pill .pill-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* Footer note polish */
.footer-note {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-main);
  opacity: 0.6;
}

/* Hover effect for links to match explorer */
.markdown-section a {
  transition: all 0.2s ease;
  padding: 0 2px;
}

.markdown-section a:hover {
  background-color: var(--bg-sub);
  border-radius: 4px;
}


/* ======================================================
   HARDWARE & SETUP STYLING
   ====================================================== */

/* Grid layout for Hardware Specs */
.markdown-section .specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 25px 0;
}

.markdown-section .spec-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 15px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.markdown-section .spec-item span {
  font-size: 14px;
  color: var(--text-main);
}

.markdown-section .spec-item strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-accent);
  letter-spacing: 0.05em;
}

/* Terminal Command Polish */
.markdown-section pre {
  position: relative;
  /* background-color: #0d1117 !important;  */
  background-color: #F3F4F6 !important; 
  color: #e6edf3 !important;
  border: 1px solid var(--border) !important;
  font-size: 13px !important;
}

/* Add a "Terminal" dot decoration */
.markdown-section pre::before {
  content: "•••";
  position: absolute;
  top: 8px;
  right: 12px;
  color: var(--border);
  letter-spacing: 2px;
  font-size: 18px;
  line-height: 1;
}


/* ======================================================
   HARDWARE & RUN GUIDE (HTML TAG VERSION)
   ====================================================== */

/* Main Card Container */
.markdown-section .card {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  padding: 40px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  margin: 20px 0 !important;
}

/* Typography Polish */
.card h1 {
  color: var(--text-accent) !important;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  margin-bottom: 2rem !important;
}

.card h3 {
  color: var(--text-main);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.card p {
  color: var(--text-main);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 15px;
}

.card a {
  color: var(--text-accent);
  font-weight: 600;
  text-decoration: underline;
}

/* Section Spacing */
.section-block {
  margin-bottom: 40px;
}

/* Technical Terminal Style */
.card pre {
  background-color: #0d1117 !important; /* Fintech Dark Terminal */
  color: #e6edf3 !important;
  padding: 20px !important;
  border-radius: 12px !important;
  font-family: 'SFMono-Regular', Consolas, monospace !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  border: 1px solid var(--border) !important;
  margin-bottom: 20px !important;
  overflow-x: auto;
}

/* Bold text inside boxes */
.card strong {
  font-weight: 700;
  color: var(--text-main);
}

/* ======================================================
   CLI & COMMAND REFERENCE STYLING
   ====================================================== */

/* Blue tip box for developer hints */
.markdown-section .tip-box {
  background-color: rgba(7, 135, 208, 0.05) !important;
  border: 1px solid rgba(7, 135, 208, 0.15) !important;
  border-left: 4px solid var(--text-accent) !important;
  padding: 15px 20px;
  border-radius: 12px;
  margin: 25px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
}

.markdown-section .tip-box strong {
  color: var(--text-accent);
}

/* CLI Flag Highlighter */
.cli-flag {
  color: var(--text-accent) !important;
  background-color: var(--bg-sub) !important;
  border: 1px solid var(--border) !important;
  font-weight: 700 !important;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* Tightening the Table for CLI Options */
.markdown-section table {
  margin: 20px 0 !important;
  font-size: 13.5px !important;
}

.markdown-section table th {
  background-color: var(--bg-sub) !important;
  color: var(--text-main) !important;
  border-bottom: 2px solid var(--border) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.markdown-section table td {
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 15px !important;
}

/* Code block alignment */
.markdown-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  margin-top: 2.5rem;
}


/* ======================================================
   TUTORIAL & KEYBOARD STYLING
   ====================================================== */

/* Styles the Ctrl+S shortcut keys */
.markdown-section kbd {
  background-color: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 0 var(--border);
  color: var(--text-accent);
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  white-space: nowrap;
  margin: 0 2px;
}

/* Specific styling for the Solidity code block labels */
.markdown-section h3 i[data-lucide] {
  width: 18px;
  height: 18px;
  margin-left: 10px;
  opacity: 0.7;
}

/* Ensure the code blocks are easily readable in all themes */
.markdown-section pre {
  margin: 25px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

[data-theme="dark"] .markdown-section pre,
[data-theme="dim"] .markdown-section pre {
  background-color: #0d1117 !important; /* Github Dark style for code */
  border-color: #30363d !important;
}

/* ======================================================
   LUCIDE ICON STYLING
   ====================================================== */

.lucide {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
  stroke-width: 2.5px;
}

/* Specific Colors for Icons */
.icon-blue { stroke: var(--text-accent); }
.icon-emerald { stroke: #10b981; }
.icon-rose { stroke: #f43f5e; }
.icon-amber { stroke: #f59e0b; }
.icon-purple { stroke: #a855f7; }
.icon-cyan { stroke: #06b6d4; }

/* Large icons for headers */
.icon-lg {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
}

.markdown-section blockquote p {
  font-weight: normal;
  font-size: 15px;
}