/* ============================================================
   blox.sh — global stylesheet
   Light theme, Roblox-inspired. Accent #335fff.
   ============================================================ */

:root {
  /* ---- Non-theme tokens ---- */
  --radius: 10px;
  --radius-lg: 14px;
  --maxw: 1080px;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Poppins", var(--font);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;

  /* ---- Light theme (default) ---- */
  --accent: #335fff;
  --accent-hover: #2549d8;
  --accent-press: #2440c4;
  --accent-soft: #eaeeff;
  --accent-border: #c9d3ff;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;

  --text: #16181d;
  --text-secondary: #565d6b;
  --text-muted: #8a91a0;

  --border: #e5e7ec;
  --border-strong: #d3d7de;

  --success: #1f9d52;
  --success-soft: #e7f6ec;
  --warning: #b9770a;
  --star: #f5a623;

  --code-bg: #ffffff;
  --code-bar: #eef0f4;
  --code-text: #1b1f2a;
  --code-comment: #9298a5;
  --code-string: #0f7a3d;
  --code-fn: #335fff;
  --code-name: #6b7280;
  --code-border: rgba(0, 0, 0, 0.08);

  --header-bg: rgba(255, 255, 255, 0.9);

  --chip-green-bg: #e7f6ec;
  --chip-amber-bg: #fdf0d9;
  --chip-amber-fg: #b9770a;
  --chip-purple-bg: #efecfd;
  --chip-purple-fg: #6b5cf0;
  --chip-pink-bg: #fdeaf2;
  --chip-pink-fg: #d6468a;
}

:root[data-theme="dark"] {
  --accent: #4d7cff;
  --accent-hover: #6a91ff;
  --accent-press: #3a5fd9;
  --accent-soft: #1a2444;
  --accent-border: #2c3c6b;

  --bg: #0d0e12;
  --surface: #16181f;
  --surface-2: #1d2029;

  --text: #f1f2f4;
  --text-secondary: #a6acb8;
  --text-muted: #6e7480;

  --border: #262932;
  --border-strong: #353a45;

  --success: #34d27b;
  --success-soft: #13301f;
  --warning: #e0a020;
  --star: #f5a623;

  --code-bg: #0c0e14;
  --code-bar: #15171f;
  --code-text: #e6e9f0;
  --code-comment: #6b7280;
  --code-string: #7ee0a8;
  --code-fn: #82aaff;
  --code-name: #aab2c2;
  --code-border: rgba(255, 255, 255, 0.06);

  --header-bg: rgba(13, 14, 18, 0.85);

  --chip-green-bg: #12301e;
  --chip-amber-bg: #2f2410;
  --chip-amber-fg: #eab056;
  --chip-purple-bg: #221d3c;
  --chip-purple-fg: #9d8cff;
  --chip-pink-bg: #321627;
  --chip-pink-fg: #ef6bab;
}

* { box-sizing: border-box; }

/* Suppress transitions during theme switch so colors repaint instantly */
.no-transitions, .no-transitions *, .no-transitions *::before, .no-transitions *::after {
  transition: none !important;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .logo, .btn-nav, .cta-btn, .btn-action, .code-btn, .step-num, .game-card-title {
  font-family: var(--font-head);
}
h1, h2, h3 { letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 34px); }
.page-head { padding: 18px 0 6px; }
.page-head p { color: var(--text-secondary); font-size: 16px; max-width: 700px; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-text span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.logo-icon { width: 28px; height: 28px; display: block; flex-shrink: 0; }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .btn-nav {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
}
.nav .btn-nav:hover { background: var(--accent-hover); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

/* ---------- Search ---------- */
.search-box { position: relative; }
.search-box .search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
}
.search-box .search-input::placeholder { color: var(--text-muted); }
.search-box .search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box .search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 18px; pointer-events: none; }
.search-box--header { flex: 1; max-width: 420px; margin: 0 16px; }
.search-box--hero { max-width: 540px; margin: 0 auto 22px; }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden auto;
  max-height: 70vh;
  text-align: left;
}
.search-results[hidden] { display: none; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.active { background: var(--surface-2); text-decoration: none; }
.sr-item img, .sr-item .sr-ico { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sr-item .sr-ico { background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.sr-text { min-width: 0; }
.sr-t { font-family: var(--font-head); font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-s { font-size: 12px; color: var(--text-muted); display: block; }

.search-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px; height: 38px;
  border-radius: var(--radius);
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 19px; flex-shrink: 0;
}
.search-toggle:hover { background: var(--surface-2); color: var(--text); }
.mobile-search { display: none; padding: 10px 20px 14px; border-top: 1px solid var(--border); }
.mobile-search.open { display: block; }
@media (max-width: 860px) {
  .search-box--header { display: none; }
  .search-toggle { display: flex; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 19px;
  flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0 0;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.breadcrumb li::after {
  content: "/";
  margin-left: 6px;
  color: var(--border-strong);
}
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-secondary); }

/* ---------- Layout grid ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding: 20px 0 60px;
  align-items: start;
}
.layout > * { min-width: 0; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.hero-icon {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}
.hero h1 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.badge-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.badge .star { color: var(--star); }

/* Featured game card (sidebar) */
.game-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--text);
  transition: border-color .15s, transform .15s;
}
.game-card:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.game-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.game-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}
.game-card-title { font-weight: 600; font-size: 15px; line-height: 1.2; }
.game-card-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.game-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.game-card:hover .game-card-link { color: var(--accent-hover); }
.game-card-link .ti { font-size: 15px; }

/* ---------- Executor notice ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text-secondary);
}
.notice .ico { color: var(--accent); font-size: 20px; flex-shrink: 0; }
.notice a { font-weight: 600; white-space: nowrap; }

/* ---------- Code box ---------- */
.codebox {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  margin-bottom: 28px;
  background: var(--code-bg);
}
.codebox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--code-bar);
  border-bottom: 1px solid var(--code-border);
}
.codebox-bar { gap: 10px; }
.codebox-name {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--code-name);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.codebox-actions { display: flex; gap: 8px; flex-shrink: 0; }
.code-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  padding: 6px 13px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, transform .1s;
}
.code-btn-secondary:active { transform: scale(0.97); }
.code-btn-primary { background: var(--accent); color: #fff; border-bottom: 3px solid var(--accent-press); }
.code-btn-primary:hover { background: var(--accent-hover); }
.code-btn-primary:active { transform: translateY(2px); border-bottom-width: 1px; }
.code-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e6e9f0;
  border-color: rgba(255, 255, 255, 0.14);
}
.code-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.code-btn.copied { background: var(--success); color: #fff; }

.codebox pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--code-text);
}
.codebox .tok-comment { color: var(--code-comment); }
.codebox .tok-string { color: var(--code-string); }
.codebox .tok-fn { color: var(--code-fn); }

/* ---------- Big action buttons (chunky, gaming) ---------- */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 18px;
}
.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .08s;
}
.btn-action .ti { font-size: 20px; }
.btn-action-primary {
  background: var(--accent);
  color: #fff;
  border-bottom: 4px solid var(--accent-press);
}
.btn-action-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-action-primary:active { transform: translateY(3px); border-bottom-width: 1px; }
.btn-action-secondary {
  background: #1c2030;
  color: #fff;
  border-bottom: 4px solid #0c0f17;
}
.btn-action-secondary:hover { background: #272d42; text-decoration: none; }
.btn-action-secondary:active { transform: translateY(3px); border-bottom-width: 1px; }
.btn-action-light {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-bottom-width: 4px;
}
.btn-action-light:hover { background: var(--surface-2); text-decoration: none; }
.btn-action-light:active { transform: translateY(3px); border-bottom-width: 1px; }
.btn-action.copied { background: var(--success); color: #fff; border-bottom-color: #14773b; }

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
a.feature:hover h3 { color: var(--accent); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 21px;
}
.feature h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 3px; }
.feature p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.45; }

.chip-blue { background: var(--accent-soft); color: var(--accent); }
.chip-green { background: var(--chip-green-bg); color: var(--success); }
.chip-amber { background: var(--chip-amber-bg); color: var(--chip-amber-fg); }
.chip-purple { background: var(--chip-purple-bg); color: var(--chip-purple-fg); }
.chip-pink { background: var(--chip-pink-bg); color: var(--chip-pink-fg); }

/* ---------- Content sections ---------- */
.section { margin-bottom: 30px; }
.section h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.section p { color: var(--text-secondary); margin: 0 0 12px; }

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-body { color: var(--text-secondary); font-size: 15px; padding-top: 2px; }
.step-body strong { color: var(--text); font-weight: 600; }

.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.features li {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--text-secondary); font-size: 15px;
}
.features .ti { color: var(--success); font-size: 19px; flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 16px;
  font-weight: 500;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .2s; color: var(--text-muted); flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-a { padding: 0 16px 16px; color: var(--text-secondary); font-size: 15px; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }

.cta-card {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #fff;
}
.cta-card h3 { margin: 0 0 5px; font-size: 16px; font-weight: 600; color: #fff; }
.cta-card p { margin: 0 0 14px; font-size: 13.5px; color: #d8e0ff; line-height: 1.5; }
.cta-card .cta-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px;
  border-radius: var(--radius);
}
.cta-card .cta-btn:hover { background: #f0f3ff; text-decoration: none; }
:root[data-theme="dark"] .cta-card .cta-btn { background: var(--surface); color: #fff; }
:root[data-theme="dark"] .cta-card .cta-btn:hover { background: var(--surface-2); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.detail-row {
  display: flex; justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--text-muted); }
.detail-row .v { font-weight: 500; }
.detail-row .v.ok { color: var(--success); }

.related { display: flex; flex-direction: column; gap: 2px; }
.related a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  font-size: 14.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.related a:last-child { border-bottom: none; }
.related a:hover { color: var(--accent); text-decoration: none; }
.related a .ti { color: var(--accent); font-size: 16px; }
.related a.related-all {
  justify-content: space-between;
  color: var(--accent);
  font-weight: 600;
}
.related a.related-all:hover { color: var(--accent-hover); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 44px 0 26px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; line-height: 1.6; max-width: 260px; margin: 0; }
.footer-col .footer-h { font-family: var(--font-head); font-size: 13px; color: var(--text); font-weight: 600; margin: 2px 0 8px; }
.footer-col a { display: block; color: var(--text-secondary); font-size: 14.5px; padding: 7px 0; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border); }
.footer-bottom .disclaimer { color: var(--text-muted); font-size: 12.5px; line-height: 1.6; margin: 0 0 10px; max-width: 760px; }
.footer-bottom .copy { color: var(--text-muted); font-size: 13px; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 14px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Home hero ---------- */
.home-hero { text-align: center; padding: 54px 0 36px; }
.home-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 0 0 16px; }
.home-hero p { font-size: 18px; color: var(--text-secondary); max-width: 660px; margin: 0 auto 24px; }
.home-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.home-stats { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.home-stats .stat { text-align: center; }
.home-stats .stat .n { font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--text); }
.home-stats .stat .l { font-size: 13px; color: var(--text-muted); }

/* Top-scripts cards (icon + title) */
.script-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.script-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.script-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.script-card img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.script-card .sc-title { font-family: var(--font-head); font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.script-card:hover .sc-title { color: var(--accent); }
.script-card .sc-sub { font-size: 12.5px; color: var(--text-muted); }
.script-card .sc-arrow { margin-left: auto; color: var(--text-muted); font-size: 18px; }
.script-card:hover .sc-arrow { color: var(--accent); }

.center-btn { text-align: center; margin-top: 22px; }

/* Full-width accent CTA band */
.cta-band {
  background: var(--accent); border-radius: 14px; padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0; font-size: 15px; }
.cta-band .cta-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--accent); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: var(--radius); white-space: nowrap;
}
.cta-band .cta-btn:hover { background: #f0f3ff; text-decoration: none; }

/* ---------- Section header with "view all" ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 16px; gap: 12px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- Game grid / tiles (home + /games/) ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.game-tile {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
  color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.game-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.game-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.game-tile .gt-name { font-family: var(--font-head); font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.game-tile:hover .gt-name { color: var(--accent); }
.game-tile .gt-count { font-size: 12.5px; color: var(--text-muted); }

/* ---------- All-scripts directory ---------- */
.scripts-index { display: flex; flex-direction: column; gap: 12px; }
.si-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  display: grid; grid-template-columns: 220px 1fr; gap: 8px 20px; align-items: start;
}
.si-game { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.si-game img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.si-game-name { font-family: var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.15; }
.si-game:hover .si-game-name { color: var(--accent); }
.si-game-count { display: none; font-size: 12px; color: var(--text-muted); }
.si-scripts { display: flex; flex-wrap: wrap; gap: 8px; }
.si-script {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary); text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.si-script i { font-size: 15px; color: var(--accent); }
.si-script:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); text-decoration: none; }
@media (max-width: 640px) {
  .si-group { grid-template-columns: 1fr; gap: 12px; }
  .si-game { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
  .si-game-count { display: inline; margin-left: auto; }
}

/* ---------- Executors page ---------- */
.exec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.exec-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.exec-card .exec-top { display: flex; align-items: center; gap: 10px; }
.exec-card .exec-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.exec-card h3 { margin: 0; font-size: 16px; }
.exec-card .exec-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exec-card p { margin: 0; font-size: 14px; color: var(--text-secondary); flex: 1; }
.exec-card .cta-btn { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; font-weight: 600; padding: 10px; border-radius: var(--radius); border-bottom: 4px solid var(--accent-press); }
.exec-card .cta-btn:hover { background: var(--accent-hover); text-decoration: none; }

/* ---------- Download page ---------- */
.dl-wrap { max-width: 520px; margin: 34px auto 8px; }
.dl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; text-align: center; }
.dl-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 16px; }
.dl-card h1 { font-size: 24px; margin: 0 0 6px; }
.dl-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.dl-status { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px; font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.dl-status .spin { width: 14px; height: 14px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: dl-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
.dl-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 16px; padding: 14px; border-radius: 12px; border-bottom: 4px solid var(--accent-press); transition: background .15s, transform .08s; }
.dl-btn:hover { background: var(--accent-hover); text-decoration: none; }
.dl-btn:active { transform: translateY(3px); border-bottom-width: 1px; }
.dl-manual { display: block; font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.dl-manual a { font-weight: 600; }
.dl-badges { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.dl-badges span { display: inline-flex; align-items: center; gap: 5px; }
.dl-badges .ti { color: var(--success); font-size: 16px; }
.install-head { text-align: center; margin-top: 44px; }
.install-head h2 { font-size: 26px; margin: 0 0 8px; }
.install-head p { color: var(--text-secondary); margin: 0; }
.install-steps { max-width: 720px; margin: 0 auto 40px; display: flex; flex-direction: column; gap: 12px; }
.install-steps .step { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }

/* ---------- Learn-more callout (script page -> wiki) ---------- */
.learn-more {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin: 0 0 26px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
}
.learn-more:hover { text-decoration: none; border-color: var(--accent); }
.learn-more .end { margin-left: auto; }

/* ---------- Wiki / articles ---------- */
.wiki-lead p { font-size: 17px; color: var(--text); line-height: 1.7; margin: 0 0 10px; }
.wiki ul, .wiki ol { margin: 0 0 14px; padding-left: 22px; color: var(--text-secondary); }
.wiki li { margin-bottom: 7px; line-height: 1.6; }
.wiki a { font-weight: 500; }
.wiki code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 4px;
}
.wiki pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; overflow-x: auto; margin: 4px 0 16px;
}
.wiki pre code { background: none; border: none; padding: 0; color: var(--code-text); font-size: 13px; }
.wiki-toc a { display: block; padding: 6px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.wiki-toc a:last-child { border-bottom: none; }
.wiki-toc a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { position: static; margin-top: 30px; }
  .nav-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(16, 19, 26, 0.08);
    padding: 8px 20px 14px;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 13px 2px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child { border-bottom: none; }
  .nav .btn-nav {
    margin-top: 12px;
    padding: 12px;
    text-align: center;
    border-radius: var(--radius);
  }
  .nav .btn-nav:hover { color: #fff; }
}

@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-icon { width: 60px; height: 60px; }
  .notice { flex-wrap: wrap; }
}
