/* ============================
   BarsikCMD Dev — style.css
   Terminal aesthetic
   ============================ */

:root {
  --bg: #0a0c0f;
  --bg2: #0e1117;
  --bg3: #141820;
  --border: #1e2530;
  --border2: #252d3a;
  --green: #39ff6a;
  --green-dim: #1a7a35;
  --green-glow: rgba(57, 255, 106, 0.15);
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.3);
  --yellow: #f5c400;
  --red: #ff4a4a;
  --text: #c8d8c0;
  --text-dim: #546a50;
  --text-muted: #3a4a38;
  --font-mono: 'JetBrains Mono', 'Share Tech Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* --- Atmosphere --- */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* --- Cursor blink --- */
.cursor-blink {
  animation: blink 1.1s step-end infinite;
  color: var(--green);
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Terminal bar / Header --- */
.terminal-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 44px;
  background: rgba(10, 12, 15, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.bar-title {
  color: var(--text-dim);
  font-size: 12px;
  margin-left: 0.5rem;
}

.bar-nav {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--green);
  background: var(--green-glow);
}

/* Pages section in header */
.bar-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-left: 1px solid var(--border2);
  padding-left: 1rem;
  margin-left: 0.5rem;
}

.pages-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.page-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.page-link:hover {
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.25);
}

/* --- Hero --- */
.hero {
  min-height: calc(100vh - 44px);
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(57,255,106,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 13px;
  color: var(--green);
}

.prompt { color: var(--green); font-size: 16px; }

.cmd { color: var(--text-dim); }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(57,255,106,0.2);
}

.version-tag {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid var(--green-dim);
  border-radius: 3px;
  padding: 2px 8px;
  margin-left: 12px;
  vertical-align: middle;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #000;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 3px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(57,255,106,0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 3px;
  border: 1px solid var(--green-dim);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-ghost:hover {
  background: var(--green-glow);
  box-shadow: 0 0 12px rgba(57,255,106,0.15);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-sep {
  color: var(--border2);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* Terminal window */
.terminal-window {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), 0 0 1px var(--green-dim);
}

.tw-header {
  background: var(--bg3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.tw-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.tw-body {
  padding: 1.2rem 1.4rem;
  font-size: 13px;
}

.tl {
  padding: 2px 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.tl .p    { color: #7ec8e3; }
.tl .at   { color: var(--text-muted); }
.tl .host { color: var(--green); }
.tl .colon{ color: var(--text-muted); }
.tl .path { color: var(--cyan); }
.tl .dollar { color: var(--text-dim); margin: 0 6px; }
.tl.out   { color: var(--text-dim); padding-left: 4px; }
.tl.out.indent { padding-left: 20px; }
.tl.out.indent::before { content: '  '; }

/* --- Sections --- */
.section {
  padding: 5rem 2rem;
}
.section.alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.section-prefix {
  color: var(--green);
  font-size: 1.1rem;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Download --- */
.download-grid {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.dl-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dl-card:hover,
.dl-card.featured {
  border-color: var(--green-dim);
  box-shadow: 0 0 20px rgba(57,255,106,0.08);
}
.dl-card.featured { border-color: var(--green); }

.dl-card-off {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.5rem;
  opacity: 0.45;
  pointer-events: none;
}

.dl-os {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.os-icon { font-size: 1.4rem; }
.os-name { font-size: 1rem; color: #fff; font-weight: 500; }

.dl-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 11px;
}
.dl-version { color: var(--green); }
.dl-size { color: var(--text-muted); }

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.dl-btn:hover { border-color: var(--green); color: var(--green); }
.dl-arrow { font-size: 14px; }

.unavail-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255,74,74,0.1);
  color: var(--red);
  border: 1px solid rgba(255,74,74,0.3);
  border-radius: 2px;
  padding: 1px 6px;
  margin-left: auto;
}

.dl-btn-disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: not-allowed;
}

.dl-dim { color: var(--text-muted) !important; }

.install-snippet {
  max-width: 1200px;
  margin: 0 auto;
}
.snip-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.snip-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 12px 16px;
}
.snip-line code {
  flex: 1;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
}
.copy-btn {
  background: var(--border2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.copy-btn:hover { background: var(--green-glow); color: var(--green); border-color: var(--green-dim); }

/* --- News --- */
.news-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 140px 60px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.news-item:hover { background: rgba(57,255,106,0.02); }
.news-item:last-child { border-bottom: none; }

.news-date { font-size: 11px; color: var(--text-muted); padding-top: 3px; }

.news-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  display: inline-block;
  height: fit-content;
}
.news-tag.new  { background: rgba(57,255,106,0.15); color: var(--green); border: 1px solid var(--green-dim); }
.news-tag.fix  { background: rgba(0,212,255,0.1);   color: var(--cyan);  border: 1px solid rgba(0,212,255,0.3); }
.news-tag.dev  { background: rgba(245,196,0,0.1);   color: var(--yellow);border: 1px solid rgba(245,196,0,0.3); }
.news-tag.pre  { background: rgba(255,74,74,0.1);   color: var(--red);   border: 1px solid rgba(255,74,74,0.3); }

.news-body h3 { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.news-body p  { font-size: 12px; color: var(--text-dim); line-height: 1.7; }

/* --- Pre-builds --- */
.prebuild-banner {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  background: rgba(245,196,0,0.05);
  border: 1px solid rgba(245,196,0,0.2);
  border-radius: 4px;
  padding: 1.2rem 1.4rem;
}

.pb-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }

.pb-warning { font-size: 11px; color: var(--yellow); margin-bottom: 4px; }
.pb-desc    { font-size: 12px; color: var(--text-dim); }
.pb-desc code { color: var(--cyan); }

.prebuild-list {
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
}

.pb-row {
  display: grid;
  grid-template-columns: 160px 80px 1fr 90px 80px 70px;
  gap: 1rem;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  transition: background 0.15s;
}
.pb-row:last-child { border-bottom: none; }
.pb-row.header {
  background: var(--bg3);
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: default;
}
.pb-row:not(.header):hover { background: rgba(57,255,106,0.03); }

.pb-name { color: #fff; font-weight: 500; }
.pb-date { color: var(--text-dim); }
.pb-commit code { color: var(--cyan); font-size: 11px; }
.pb-status.pass { color: var(--green); }
.pb-status.fail { color: var(--red); }

/* Build type badges */
.pb-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 2px;
  display: inline-block;
  width: fit-content;
}
.pb-type.nightly { background: rgba(57,255,106,0.12);  color: var(--green);  border: 1px solid var(--green-dim); }
.pb-type.dev-t   { background: rgba(0,212,255,0.1);    color: var(--cyan);   border: 1px solid rgba(0,212,255,0.3); }
.pb-type.beta    { background: rgba(245,196,0,0.1);    color: var(--yellow); border: 1px solid rgba(245,196,0,0.3); }
.pb-type.pre-t   { background: rgba(255,74,74,0.1);    color: var(--red);    border: 1px solid rgba(255,74,74,0.3); }

.pb-dl {
  color: var(--green);
  text-decoration: none;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--green-dim);
  border-radius: 2px;
  text-align: center;
  transition: background 0.15s;
}
.pb-dl:hover { background: var(--green-glow); }
.pb-dl.disabled { color: var(--text-muted); border-color: transparent; cursor: default; }

/* --- Docs --- */
.docs-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1.4rem;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.doc-card:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 16px rgba(57,255,106,0.07);
  transform: translateY(-2px);
}
.doc-icon { font-size: 1.5rem; }
.doc-name { font-size: 13px; color: #fff; font-weight: 500; }
.doc-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* --- Footer --- */
.footer {
  padding: 2rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-brand { color: var(--green); font-weight: 500; font-size: 13px; }
.footer-sep   { color: var(--border2); }
.footer-copy  { color: var(--text-muted); font-size: 12px; }

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--green); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.prompt-small { color: var(--text-muted); font-size: 11px; }
.footer-cmd   { color: var(--red); font-size: 11px; }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-left > * {
  animation: fadeUp 0.6s ease both;
}
.hero-left > *:nth-child(1) { animation-delay: 0.1s; }
.hero-left > *:nth-child(2) { animation-delay: 0.2s; }
.hero-left > *:nth-child(3) { animation-delay: 0.3s; }
.hero-left > *:nth-child(4) { animation-delay: 0.4s; }
.hero-left > *:nth-child(5) { animation-delay: 0.5s; }

.hero-right {
  animation: fadeUp 0.7s ease 0.3s both;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-right { display: none; }
  .download-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .pb-row { grid-template-columns: 1fr 70px 80px; }
  .pb-row .pb-date, .pb-row .pb-commit { display: none; }
  .news-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .bar-nav { display: none; }
}

@media (max-width: 480px) {
  .docs-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 0.8rem; }
}

/* ============================
   Sub-pages styles
   ============================ */

/* Active page link */
.page-link.active {
  color: var(--green);
  background: var(--green-glow);
  border-color: var(--green-dim);
}

/* Page hero */
.page-hero {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem 2.5rem;
  background: var(--bg2);
}
.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.page-breadcrumb {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.page-breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.page-sub {
  color: var(--text-dim);
  font-size: 13px;
}
.page-sub code { color: var(--cyan); }

.page-main {
  padding: 3rem 2rem 2rem;
}

/* Downloads full page */
.dl-full-grid {
  max-width: 900px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dl-release-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 1.5rem;
}
.dl-release-card.old { opacity: 0.7; }

.dlr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.dlr-version {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tag-stable {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(57,255,106,0.12);
  color: var(--green);
  border: 1px solid var(--green-dim);
  border-radius: 2px;
  padding: 1px 7px;
}
.tag-old {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(100,100,100,0.15);
  color: var(--text-muted);
  border: 1px solid var(--border2);
  border-radius: 2px;
  padding: 1px 7px;
}
.dlr-date { font-size: 11px; color: var(--text-muted); }

.dlr-notes {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dlr-assets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dlr-asset {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
a.dlr-asset:hover {
  border-color: var(--green-dim);
  background: rgba(57,255,106,0.04);
}
.dlr-asset.off {
  opacity: 0.4;
  pointer-events: none;
}
.asset-icon { font-size: 1.1rem; flex-shrink: 0; }
.asset-info { flex: 1; }
.asset-name { display: block; font-size: 12px; color: #fff; }
.asset-meta { display: block; font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.asset-dl { color: var(--green); font-size: 1.1rem; }

/* News full page */
.news-item-full {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.8rem 0;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.news-item-full .news-body h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.news-item-full .news-body p  { font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.news-action {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--green);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--green-dim);
  padding: 4px 12px;
  border-radius: 3px;
  transition: background 0.2s;
}
.news-action:hover { background: var(--green-glow); }

/* Pre-build filter */
.pb-filters {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 0.25rem;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover  { border-color: var(--green-dim); color: var(--green); }
.filter-btn.active { border-color: var(--green); color: var(--green); background: var(--green-glow); }

/* Docs layout */
.docs-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 60px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sidebar-link {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-link.active { color: var(--green); border-left-color: var(--green); background: var(--green-glow); }

.docs-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.doc-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.doc-section:last-child { border-bottom: none; }

.doc-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}
.doc-h3 {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 1.2rem 0 0.5rem;
}
.doc-p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.doc-p code { color: var(--cyan); }

.code-block {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.code-label {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg2);
  padding: 4px 12px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.code-block pre {
  padding: 1rem 1.2rem;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 700px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .bar-pages { display: none; }
}

/* GitHub stats badge */
.gh-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  margin-left: 0.5rem;
  transition: border-color 0.2s, color 0.2s;
}
.gh-badge:hover { border-color: var(--green-dim); color: var(--green); }

.gh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  animation: pulse-grey 2s ease infinite;
}
.gh-dot.online  { background: var(--green); animation: pulse-green 2s ease infinite; }
.gh-dot.offline { background: var(--red); animation: none; }

@keyframes pulse-grey  { 0%,100%{opacity:.4} 50%{opacity:1} }
@keyframes pulse-green { 0%,100%{box-shadow:0 0 0 0 rgba(57,255,106,.4)} 50%{box-shadow:0 0 0 4px rgba(57,255,106,0)} }

/* ============================
   Stats hover expand
   ============================ */
.hero-stats {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 10px 14px;
  background: var(--bg2);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.hero-stats:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 16px rgba(57,255,106,0.07);
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stats-row-secondary {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, margin-top .25s ease;
  margin-top: 0;
}
.hero-stats:hover .stats-row-secondary {
  max-height: 60px;
  opacity: 1;
  margin-top: 10px;
}

.stats-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ============================
   OS Selector
   ============================ */
.os-selector {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.os-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 4px 4px 0 0;
  border-bottom: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
  bottom: -1px;
}
.os-tab:hover:not(.disabled) {
  color: var(--text);
  background: var(--bg3);
}
.os-tab.active {
  color: var(--green);
  background: var(--bg);
  border-color: var(--green-dim);
  border-bottom-color: var(--bg);
  z-index: 1;
}
.os-tab.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.os-tab-icon { font-size: 1rem; }

.os-panel {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--border2);
  border-radius: 0 4px 4px 4px;
  padding: 1.5rem;
  background: var(--bg);
}
.os-panel.active { display: block; }
.os-panel .download-grid { margin-bottom: 1.5rem; }
.os-panel .install-snippet { max-width: 100%; margin: 0; }

/* ============================
   Stats page
   ============================ */
.stats-grid-top {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.sg-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  text-align: center;
}
.sg-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  margin-bottom: 4px;
}
.sg-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-two-col {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stats-block {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
}
.sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.sb-title { font-size: 11px; color: var(--text-dim); }
.sb-sub   { font-size: 10px; color: var(--text-muted); }
.sb-body  { padding: 12px 14px; }
.sb-loading { color: var(--text-muted); font-size: 12px; }
.sb-empty   { color: var(--text-muted); font-size: 12px; font-style: italic; }

/* Commits list */
.commit-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.commit-row:last-child { border-bottom: none; }
.commit-sha  { color: var(--cyan); font-size: 11px; }
.commit-msg  { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit-age  { color: var(--text-muted); text-align: right; white-space: nowrap; }

/* Languages */
.lang-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  gap: 1px;
}
.lb-seg { height: 100%; min-width: 2px; transition: opacity .15s; }
.lb-seg:hover { opacity: .7; }
.lang-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.lang-row:last-child { border-bottom: none; }
.lang-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lang-name { flex: 1; color: var(--text); }
.lang-pct  { color: var(--text-muted); font-size: 11px; }

/* Info rows */
.info-row {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.info-row.indent { padding-left: 12px; }
.info-row:last-child { border-bottom: none; }
.ir-key { color: var(--text-muted); min-width: 90px; flex-shrink: 0; }
.ir-val { color: var(--text); word-break: break-all; }

@media (max-width: 700px) {
  .stats-grid-top  { grid-template-columns: repeat(2, 1fr); }
  .stats-two-col   { grid-template-columns: 1fr; }
  .os-selector     { flex-wrap: wrap; }
}