/* ==========================================================================
   RAMPAGE CLIENT — Editorial Luxury Dark Design System
   Spacious, high-contrast Apple × Linear craftsmanship.
   Midnight Ember (#05060A + #FF5A2C) with live 12-theme GuiThemes.kt sync.
   ========================================================================== */

:root {
  --bg: #05060a;
  --bg-elev: #0a0c13;
  --surface: rgba(15, 18, 28, 0.72);
  --surface-solid: #0f121c;
  --surface-hover: #151927;

  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.045);

  --text: #f7f8fc;
  --text-2: #9aa3b8;
  --text-3: #636d84;

  --accent: #ff5a2c;
  --accent-2: #ff8659;
  --accent-ink: #140502;
  --accent-soft: rgba(255, 90, 44, 0.12);
  --accent-glow: rgba(255, 90, 44, 0.34);

  --cat-combat: #ff5a5f;
  --cat-movement: #58b4ff;
  --cat-render: #b388ff;
  --cat-world: #f5b942;
  --cat-donutsmp: #ff85c0;
  --cat-lag: #ff8a4c;
  --cat-blatant: #ff3b4e;
  --cat-client: #36d6a8;
  --cat-clone: #38bdf8;
  --cat-beta: #facc15;

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons & KBD ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.22s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 32px -10px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 38px -8px var(--accent-glow);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 6px 12px; font-size: 12px; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; line-height: 1;
  padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--text-2);
}

/* ---------- Floating Minimal Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: rgba(5, 6, 10, 0.65);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
.nav.scrolled {
  background: rgba(5, 6, 10, 0.9);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 18px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 15.5px; letter-spacing: 0.07em;
}
.logo-mark {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); font-size: 14px; font-weight: 800;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  padding: 7px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  transition: color 0.16s, background 0.16s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.nav-actions { display: flex; align-items: center; gap: 8px; position: relative; }

.nav-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(88, 101, 242, 0.12);
  color: #aeb7ff; font-size: 12.5px; font-weight: 500;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.nav-discord:hover { border-color: rgba(88, 101, 242, 0.55); background: rgba(88, 101, 242, 0.22); color: #fff; }
.nav-discord svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Post-checkout return banner */
.checkout-banner {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 95;
  width: min(680px, calc(100% - 32px)); padding: 14px 18px; border-radius: 14px;
  background: #0d121f; border: 1px solid var(--accent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text);
}
.checkout-banner.success { border-color: #36d6a8; }

/* Community Discord Showcase Banner */
.discord-banner {
  max-width: 880px; margin: 0 auto 44px; padding: 26px 30px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.14), rgba(15, 18, 28, 0.92) 60%);
  border: 1px solid rgba(88, 101, 242, 0.32);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.discord-banner-copy { max-width: 540px; }
.discord-banner-copy h3 { font-family: var(--font-display); font-size: 21px; margin: 0 0 6px; letter-spacing: -0.025em; }
.discord-banner-copy p { margin: 0; font-size: 14px; color: var(--text-2); }
.btn-discord {
  background: #5865f2; color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px -10px rgba(88, 101, 242, 0.55);
}
.btn-discord:hover { background: #6b76ff; transform: translateY(-1px); }

/* Checkout Modal & Legal Center */
.checkout-card { width: min(520px, 100%); border-radius: 20px; background: #0c0f18; border: 1px solid var(--line-strong); overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.9); }
.co-tier-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.co-tier-btn {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025); text-align: left;
  display: flex; flex-direction: column; gap: 2px; transition: border-color 0.15s, background 0.15s;
}
.co-tier-btn strong { font-family: var(--font-display); font-size: 14.5px; color: var(--text); }
.co-tier-btn span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.co-tier-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.co-tier-btn.active span { color: var(--accent); }

.co-field { display: grid; gap: 6px; }
.co-field label { font-size: 12.5px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; }
.co-field label span { font-weight: 400; color: var(--text-3); }
.co-input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #06070c; color: var(--text);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; outline: none;
}
.co-input:focus { border-color: var(--accent); }
.co-input.valid { border-color: #36d6a8; }
.co-input.invalid { border-color: #ff5a5f; }
.co-hint { font-size: 12px; color: var(--text-3); }

.co-consent {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); line-height: 1.5;
}
.co-consent input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.co-link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }

.co-status {
  padding: 11px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.5;
  background: rgba(255, 90, 44, 0.1); border: 1px solid rgba(255, 90, 44, 0.35); color: var(--text);
}
.co-trust {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); padding-top: 4px;
}

.legal-card { width: min(720px, 100%); max-height: 85vh; border-radius: 20px; background: #0c0f18; border: 1px solid var(--line-strong); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.9); }
.legal-tabs { display: flex; gap: 6px; padding: 12px 22px; border-bottom: 1px solid var(--line-soft); background: rgba(0,0,0,0.22); flex-wrap: wrap; }
.legal-body { padding: 22px 24px; overflow-y: auto; display: grid; gap: 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.66; }
.legal-body h4 { font-family: var(--font-display); font-size: 14.5px; color: var(--text); margin: 0 0 5px; }
.legal-body p { margin: 0; }
.legal-notice-box {
  padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--text);
}

.cmd-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--text-3); font-size: 12.5px;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.cmd-trigger:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.06); }
.cmd-trigger svg { width: 13px; height: 13px; }

.theme-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.16s, color 0.16s;
}
.theme-trigger:hover { border-color: var(--line-strong); color: var(--text); }
.theme-trigger-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

.theme-popover {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 304px; padding: 16px; border-radius: 16px;
  background: #0d1019; border: 1px solid var(--line-strong);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85); z-index: 100;
}
.theme-popover-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 12px;
}
.chroma-pill {
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  padding: 3px 9px; border-radius: 999px; font-size: 11px; color: var(--text-2);
}
.chroma-pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.theme-popover-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.theme-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px; color: var(--text-2); text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.theme-option:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.theme-option.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.theme-swatch-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--sw); flex-shrink: 0; }

.nav-toggle { display: none; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); padding: 8px; border-radius: 9px; }
.nav-toggle span { display: block; width: 17px; height: 1.8px; background: var(--text); margin: 3.5px 0; border-radius: 2px; }

/* ==========================================================================
   CINEMATIC CENTERED HERO + FULL-WIDTH INTERACTIVE CLICKGUI STAGE
   ========================================================================== */
.hero {
  position: relative;
  padding: 136px 0 88px;
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.7;
}
/* Soft studio top spotlight (subtle, refined) */
.hero::before {
  content: "";
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 980px; height: 540px; border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 68%);
  pointer-events: none; z-index: 0;
}

.hero-center {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 56px;
}

.hero-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
}
.hero-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.2vw, 76px);
  line-height: 1.03; letter-spacing: -0.045em;
  margin: 24px 0 20px; font-weight: 800;
}
.hero h1 .muted-title { color: var(--text-3); }

.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.62; color: var(--text-2);
  max-width: 620px; margin: 0 auto 32px; font-weight: 400;
}

.hero-ctas {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}

.hero-metrics {
  display: inline-flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-soft);
}
.hm-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hm-val { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.hm-val span { color: var(--accent); }
.hm-lbl { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* Spacious Full-Width ClickGUI Showcase Window */
.gui-showcase-wrap {
  max-width: 1080px;
  margin: 0 auto;
}
.clickgui-window {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 20, 32, 0.92), rgba(9, 11, 18, 0.96));
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 40px 100px -30px rgba(0, 0, 0, 0.9),
    0 0 90px -45px var(--accent-glow);
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.clickgui-chrome {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.gui-pack-tabs {
  display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
}
.gui-pack-tab {
  border: 0; background: transparent; padding: 5px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  transition: color 0.15s, background 0.15s;
}
.gui-pack-tab:hover { color: var(--text-2); }
.gui-pack-tab.active { background: var(--accent-soft); color: var(--accent); }

.gui-chrome-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gui-mini-search {
  width: 150px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.38);
  color: var(--text); font-size: 12px; outline: none;
  transition: border-color 0.15s, width 0.2s var(--ease);
}
.gui-mini-search:focus { border-color: var(--accent); width: 185px; }
.gui-mini-search::placeholder { color: var(--text-3); }

.gui-theme-dots { display: inline-flex; gap: 5px; align-items: center; }
.gui-theme-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25); background: var(--sw); padding: 0;
  transition: transform 0.15s, border-color 0.15s;
}
.gui-theme-dot:hover { transform: scale(1.18); }
.gui-theme-dot.active { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 10px var(--sw); }

.clickgui-columns {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px;
}
.ramp-panel {
  background: rgba(8, 10, 17, 0.85); border: 1px solid var(--line);
  border-radius: 13px; overflow: hidden; align-self: start;
}
.ramp-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
}
.ramp-panel-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
}
.ramp-panel-icon { width: 14px; height: 14px; color: var(--accent); }
.ramp-panel-meta { display: inline-flex; align-items: center; gap: 6px; }
.ramp-count-pill {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.ramp-collapse-btn { border: 0; background: transparent; color: var(--text-3); font-family: var(--font-mono); font-size: 13px; padding: 0 4px; }
.ramp-panel.collapsed .ramp-panel-list { display: none; }

.ramp-panel-list { padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.ramp-item.filtered-out { display: none; }

.ramp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 9px 7px 12px; border-radius: 8px;
  border: 1px solid transparent; color: var(--text-2);
  font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; position: relative;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.ramp-row:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.ramp-row.on {
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.ramp-row.on::before {
  content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 2.5px;
  border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.ramp-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ramp-row-btn {
  border: 0; background: transparent; color: var(--text-3); font-size: 12px;
  padding: 2px 5px; border-radius: 5px; transition: color 0.14s, background 0.14s;
}
.ramp-row-btn:hover { color: var(--accent); background: rgba(255, 255, 255, 0.08); }

.clickgui-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25); font-size: 12px; color: var(--text-3);
}
.active-mods {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px;
}
.active-mods span {
  padding: 2px 8px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.04); border-left: 2px solid var(--accent); color: var(--text-2);
}

/* ==========================================================================
   SECTIONS — GENEROUS EDITORIAL RHYTHM
   ========================================================================== */
section { position: relative; z-index: 2; }
.section {
  padding: 116px 0;
  border-top: 1px solid var(--line-soft);
}
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.07; letter-spacing: -0.04em;
  margin: 0 0 16px; font-weight: 800;
}
.section-head p { margin: 0; font-size: 16.5px; color: var(--text-2); line-height: 1.66; }

/* ==========================================================================
   FULL-BLEED CINEMA 3D WEBGL SHOWCASE + SHADER LAB (#studio)
   ========================================================================== */
.model-pill-strip {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.model-pill {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.model-pill:hover { color: var(--text); border-color: var(--line-strong); }
.model-pill.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

.cinema-stage {
  position: relative;
  border-radius: 22px;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, #0c101d 0%, #05060b 75%);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: 0 36px 90px -30px rgba(0, 0, 0, 0.9);
}
.cinema-canvas-wrap {
  position: relative;
  height: 520px;
  cursor: grab;
}
.cinema-canvas-wrap:active { cursor: grabbing; }
.cinema-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

/* Floating Apple-style Info Top Overlay */
.cinema-top-info {
  position: absolute; top: 24px; left: 26px; right: 26px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  pointer-events: none; z-index: 4;
}
.cinema-title-block { max-width: 440px; }
.cinema-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.cinema-title-block h3 {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  letter-spacing: -0.03em; margin: 4px 0 6px;
}
.cinema-title-block p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.52; }

.cinema-top-right {
  display: flex; align-items: center; gap: 10px; pointer-events: auto;
}
.fps-pill {
  font-family: var(--font-mono); font-size: 11px; padding: 6px 11px; border-radius: 999px;
  background: rgba(5, 6, 10, 0.72); border: 1px solid var(--line); color: var(--text-2);
  backdrop-filter: blur(10px);
}

/* Floating Bottom Glass Control Bar */
.cinema-dock {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(9, 11, 19, 0.84); border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7);
  max-width: calc(100% - 32px);
}
.dock-group { display: inline-flex; align-items: center; gap: 3px; }
.dock-sep { width: 1px; height: 18px; background: var(--line); }
.dock-btn {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  transition: background 0.14s, color 0.14s;
}
.dock-btn:hover { color: var(--text); }
.dock-btn.active { background: var(--accent-soft); color: var(--accent); }

.glow-sw {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25); background: var(--sw); padding: 0;
  transition: transform 0.14s, border-color 0.14s;
}
.glow-sw:hover, .glow-sw.active { transform: scale(1.18); border-color: #fff; }

/* Second Row: Live Shader Lab + 6 Blender Studio Renders Split */
.studio-secondary {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 20px;
  align-items: stretch;
}

.shader-lab-card {
  border-radius: 20px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.shader-lab-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.lab-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.lab-tab {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  transition: color 0.15s, background 0.15s;
}
.lab-tab:hover { color: var(--text); }
.lab-tab.active { background: var(--accent-soft); color: var(--accent); }

.shader-lab-stage {
  position: relative; flex: 1; min-height: 310px; background: #05060b; overflow: hidden;
}
.shader-lab-stage canvas { width: 100%; height: 100%; display: block; }
.lab-caption-float {
  position: absolute; left: 16px; bottom: 14px; right: 16px; pointer-events: none; z-index: 4;
  font-size: 12.5px; color: var(--text-2);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.lab-caption-float b { color: var(--text); }

/* SpotiPlay 3D Sky Lyrics Panel */
.sky-lyrics-lab {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, color-mix(in srgb, var(--accent) 22%, #131c38), #05060c 78%);
  display: flex; flex-direction: column; justify-content: space-between; padding: 20px 22px 16px;
}
.sky-mountains {
  position: absolute; left: 0; right: 0; bottom: 0; height: 68px;
  background:
    linear-gradient(135deg, transparent 48%, #070910 48%) 0 0 / 120px 68px repeat-x,
    linear-gradient(225deg, transparent 52%, #090c16 52%) 40px 8px / 140px 68px repeat-x;
  pointer-events: none; z-index: 2;
}
.sky-lyrics-arch {
  position: relative; z-index: 3; margin: auto; max-width: 480px; width: 100%;
  padding: 18px 24px; border-radius: 16px;
  background: rgba(8, 10, 18, 0.52); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px); text-align: center;
  transform: perspective(760px) rotateX(10deg);
}
.sky-track-bar { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-bottom: 10px; }
.sky-line { font-family: var(--font-display); margin: 4px 0; }
.sky-line.past { font-size: 13px; color: var(--text-3); opacity: 0.55; }
.sky-line.active { font-size: 21px; font-weight: 800; color: #fff; text-shadow: 0 0 24px var(--accent-glow); }
.sky-line.next { font-size: 14px; color: var(--text-2); opacity: 0.8; }
.sky-track-switcher { position: relative; z-index: 4; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.track-btn {
  border: 1px solid var(--line-strong); background: rgba(5, 6, 10, 0.78);
  padding: 4px 10px; border-radius: 999px; font-size: 11px; color: var(--text-2);
}
.track-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Clean 3x2 Studio Render Wall */
.gallery-wall {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.gallery-tile {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #070910; padding: 0;
  aspect-ratio: 16 / 10; transition: border-color 0.2s, transform 0.22s var(--ease);
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: transform 0.4s var(--ease), opacity 0.2s; }
.gallery-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery-tile:hover img { opacity: 1; transform: scale(1.04); }
.gallery-tile span {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(5, 6, 10, 0.78); backdrop-filter: blur(6px); color: var(--text);
}

/* ==========================================================================
   CLEAN INTERACTIVE ARCHITECTURE SHOWCASE (#systems — ZERO WALL OF BOXES!)
   ========================================================================== */
.arch-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
  align-items: start;
}

.arch-nav {
  display: flex; flex-direction: column; gap: 4px;
}
.arch-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 15px 18px; border-radius: 14px;
  border: 1px solid transparent; background: transparent;
  text-align: left; transition: background 0.16s, border-color 0.16s;
}
.arch-tab:hover { background: rgba(255, 255, 255, 0.03); }
.arch-tab.active {
  background: var(--surface-solid);
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}
.arch-tab-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-2); }
.arch-tab.active .arch-tab-title { color: var(--text); }
.arch-tab-sub { font-size: 12.5px; color: var(--text-3); }

.arch-stage {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 20, 31, 0.75), rgba(10, 12, 20, 0.9));
  border: 1px solid var(--line);
  padding: 36px 38px;
  min-height: 440px;
  display: flex; flex-direction: column; gap: 24px;
}
.arch-pane { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.arch-pane-head h3 {
  font-family: var(--font-display); font-size: 28px; letter-spacing: -0.03em; margin: 4px 0 10px;
}
.arch-pane-head p { margin: 0; font-size: 15.5px; color: var(--text-2); max-width: 620px; }

/* Clean borderless divider list inside architecture stage */
.clean-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.clean-row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.clean-row strong { font-size: 14.5px; font-weight: 600; color: var(--text); }
.clean-row p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.clean-row-tag {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  white-space: nowrap;
}

.sub-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-pill-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025);
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.sub-pill-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.arch-mod-links {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px;
}
.mod-chip {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.mod-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Streamer Mode Split Slider */
.stream-compare {
  position: relative; height: 260px; border-radius: 16px;
  border: 1px solid var(--line-strong); background: #06080f; overflow: hidden; user-select: none;
}
.stream-pane { position: absolute; inset: 0; overflow: hidden; }
.stream-obs { background: linear-gradient(180deg, #0b101b 0%, #070a11 64%, #0d131d 64%, #080b12 100%); }
.stream-local {
  background: radial-gradient(circle at 28% 25%, var(--accent-soft), transparent 58%),
              linear-gradient(180deg, #0b101b 0%, #070a11 64%, #0d131d 64%, #080b12 100%);
  clip-path: inset(0 calc(100% - var(--split, 54%)) 0 0);
}
.stream-badge {
  position: absolute; top: 14px; z-index: 3; font-size: 11.5px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; background: rgba(5, 6, 10, 0.85); border: 1px solid var(--line-strong); color: var(--text-2);
}
.stream-badge-left { left: 14px; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.stream-badge-right { right: 14px; }
.mc-scene { position: relative; width: 100%; height: 100%; font-family: var(--font-mono); }
.mc-horizon { position: absolute; left: 0; right: 0; top: 64%; height: 1px; background: rgba(255, 255, 255, 0.08); }
.mc-crosshair { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); color: rgba(255, 255, 255, 0.45); font-size: 16px; }
.mc-sil { position: absolute; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 4px; }
.mc-sil.s1 { left: 16%; bottom: 30px; width: 38px; height: 82px; }
.mc-sil.s2 { left: 70%; bottom: 38px; width: 32px; height: 32px; }
.mc-esp { position: absolute; border: 1.5px solid var(--accent); box-shadow: 0 0 18px var(--accent-glow), inset 0 0 10px var(--accent-soft); border-radius: 4px; }
.mc-esp span {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--accent);
  white-space: nowrap; background: rgba(5, 6, 10, 0.92); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 2px 7px; border-radius: 5px;
}
.mc-esp.e1 { left: 16%; bottom: 30px; width: 38px; height: 82px; }
.mc-esp.e2 { left: 70%; bottom: 38px; width: 32px; height: 32px; border-color: var(--cat-world); box-shadow: 0 0 14px rgba(245, 185, 66, 0.4); }
.mc-esp.e2 span { color: var(--cat-world); border-color: rgba(245, 185, 66, 0.4); }
.mc-thud {
  position: absolute; left: 34%; bottom: 24px; width: 150px; padding: 9px 11px; border-radius: 9px;
  background: rgba(6, 8, 14, 0.92); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 10.5px; color: var(--text-2);
}
.mc-thud-top { display: flex; justify-content: space-between; }
.mc-thud b { color: var(--text); }
.mc-thud-bar { margin-top: 6px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.mc-thud-bar i { display: block; height: 100%; width: 78%; background: var(--accent); }
.mc-array { position: absolute; right: 14px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mc-array span { font-size: 10.5px; padding: 2px 8px; border-radius: 4px; background: rgba(5, 6, 10, 0.88); border-right: 2px solid var(--accent); color: var(--text); }
.stream-divider { position: absolute; top: 0; bottom: 0; left: var(--split, 54%); width: 2px; background: var(--accent); transform: translateX(-50%); z-index: 4; pointer-events: none; }
.stream-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: #0a0c14; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; }
.stream-knob svg { width: 14px; height: 14px; }
.stream-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; }

/* ==========================================================================
   CLEAN, AIRY 212-MODULE EXPLORER (#modules)
   ========================================================================== */
.explorer-controls {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px;
}
.explorer-row-1 {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.search-pill {
  position: relative; flex: 1; min-width: 260px; max-width: 440px;
}
.search-pill input {
  width: 100%; padding: 11px 40px 11px 40px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text);
  font: inherit; font-size: 14px; outline: none; transition: border-color 0.16s, box-shadow 0.16s;
}
.search-pill input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-pill input::placeholder { color: var(--text-3); }
.search-pill input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-pill svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.search-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.clear-search {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 14px; display: grid; place-items: center;
}

.explorer-status { font-size: 13px; color: var(--text-3); }

.cat-pills, .preset-pills {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cat-tab {
  border: 1px solid var(--line); background: transparent; padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cat-tab:hover { color: var(--text); border-color: var(--line-strong); }
.cat-tab.active { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); }
.cat-tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cat-tab .cnt { font-size: 11.5px; color: var(--text-3); }

.preset-lbl { font-size: 12px; font-weight: 600; color: var(--text-3); margin-right: 4px; }
.preset-chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 12.5px; font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.preset-chip:hover { color: var(--text); border-color: var(--line-strong); }
.preset-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Clean Airy Module Cards (Click -> Full All-Settings Popup!) */
.module-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.mod-card {
  padding: 20px 22px; border-radius: 16px;
  background: var(--surface-solid); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 9px; cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.2s var(--ease);
}
.mod-card:hover {
  border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, var(--line-strong));
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.mod-card.in-config {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.mod-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mod-name-wrap { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.mod-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex-shrink: 0; }
.mod-name { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-cat-lbl { font-size: 11.5px; color: var(--text-3); font-weight: 500; flex-shrink: 0; }
.mod-desc {
  margin: 0; font-size: 13.5px; line-height: 1.56; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mod-foot {
  margin-top: auto; padding-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--text-3);
}
.mod-card:hover .mod-settings-hint { color: var(--accent); }
.mod-add-btn {
  border: 1px solid var(--line); background: transparent;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.mod-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.mod-card.in-config .mod-add-btn { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.empty-state { grid-column: 1 / -1; padding: 48px; text-align: center; border-radius: 16px; border: 1px dashed var(--line-strong); color: var(--text-2); }
.module-more-wrap { margin-top: 28px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   CENTERED ALL-SETTINGS MODULE POPUP MODAL (#module-modal)
   ========================================================================== */
.mod-modal-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(3, 4, 9, 0.78);
  backdrop-filter: blur(12px);
  display: grid; place-items: center; padding: 24px;
}
.mod-modal {
  width: min(820px, 100%);
  max-height: min(86vh, 780px);
  border-radius: 22px;
  background: #0b0e17;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalPop 0.22s var(--ease);
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mod-modal-head {
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--modal-c, var(--accent)) 9%, transparent), transparent);
}
.mod-modal-toprow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.mod-modal-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-cat-pill {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  color: var(--modal-c, var(--accent));
  background: color-mix(in srgb, var(--modal-c, var(--accent)) 14%, transparent);
}
.mm-meta-txt { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }

.modal-close-x {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  color: var(--text-2); font-size: 18px; display: grid; place-items: center;
}
.modal-close-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }

.mod-modal-head h3 {
  font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px;
}
.mod-modal-head p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.58; }

.mod-modal-tabs {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 28px; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.22);
}
.mm-tab-group { display: inline-flex; gap: 6px; }
.mm-tab {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
  transition: color 0.14s, background 0.14s;
}
.mm-tab:hover { color: var(--text); }
.mm-tab.active { background: var(--accent-soft); color: var(--accent); }

.mm-setting-filter {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); color: var(--text); font-size: 12.5px; outline: none; width: 200px;
}
.mm-setting-filter:focus { border-color: var(--accent); }
.mm-setting-filter::placeholder { color: var(--text-3); }

.mod-modal-body {
  flex: 1; overflow-y: auto; padding: 22px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.mod-modal-body::-webkit-scrollbar,
.cmd-results::-webkit-scrollbar { width: 6px; height: 6px; }
.mod-modal-body::-webkit-scrollbar-track,
.cmd-results::-webkit-scrollbar-track { background: transparent; }
.mod-modal-body::-webkit-scrollbar-thumb,
.cmd-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
.mod-modal-body::-webkit-scrollbar-thumb:hover,
.cmd-results::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.26); }

/* All Settings Clean Grid Inside Popup */
.mm-settings-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.mm-setting-card {
  padding: 14px 16px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 9px;
}
.mm-setting-card.wide { grid-column: 1 / -1; }
.mm-setting-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-setting-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.mm-setting-val { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.mm-setting-bounds { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }

/* Sleek iOS-style switch for boolean settings */
.mm-switch {
  width: 38px; height: 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.08); position: relative; padding: 0; flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.mm-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--text-2); transition: transform 0.18s var(--ease), background 0.18s;
}
.mm-switch.on { background: var(--accent-soft); border-color: var(--accent); }
.mm-switch.on::after { transform: translateX(16px); background: var(--accent); }

.mm-setting-card input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.12); cursor: pointer;
}
.mm-setting-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.mm-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-opt {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; color: var(--text-2);
}
.mm-opt:hover { color: var(--text); border-color: var(--line-strong); }
.mm-opt.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Overview & Architecture Tab inside Popup */
.mm-overview { display: flex; flex-direction: column; gap: 20px; }
.mm-block h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.mm-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mm-notes li { padding-left: 14px; position: relative; font-size: 13.5px; color: var(--text-2); }
.mm-notes li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.mm-specs-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.mm-spec-box { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.mm-spec-box span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.mm-spec-box strong { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }

.mm-json-pre {
  margin: 0; padding: 18px; border-radius: 14px;
  background: #06070c; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
  color: #cbd5e1; overflow-x: auto;
}

.mod-modal-foot {
  padding: 15px 28px; border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.mm-nav-btns, .mm-act-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Floating Config Builder Dock */
.config-dock {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 75;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(11, 14, 23, 0.94); border: 1px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 32px -10px var(--accent-glow);
  backdrop-filter: blur(16px);
}
.config-dock-info { font-size: 13px; color: var(--text); font-weight: 500; }
.config-dock-info b { color: var(--accent); }

/* ---------- Setup, Changelog, FAQ, Editions, Footer ---------- */
.install-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 36px; align-items: start; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: step; border-top: 1px solid var(--line); }
.step-list li {
  counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.step-list li::before {
  content: "0" counter(step); font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); padding-top: 2px;
}
.step-list h3 { font-family: var(--font-display); font-size: 16.5px; margin: 0 0 4px; }
.step-list p { margin: 0; font-size: 14px; color: var(--text-2); }

.terminal-stack { display: grid; gap: 18px; }
.terminal { border-radius: 16px; background: #090b12; border: 1px solid var(--line); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.os-tabs { display: inline-flex; gap: 4px; }
.os-tab { border: 0; background: transparent; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.os-tab.active { background: var(--accent-soft); color: var(--accent); }
.copy-btn { border: 1px solid var(--line); background: transparent; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; color: var(--text-2); }
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.terminal pre { margin: 0; padding: 20px 18px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; overflow-x: auto; color: var(--text); }
.terminal .c, .terminal .v { color: var(--text-3); }
.terminal .k { color: var(--accent); }
.terminal .s { color: #7dd3fc; }

.controls-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ctrl-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--line-soft);
  font-size: 13px; color: var(--text-2);
}

.changelog-list { display: grid; gap: 20px; max-width: 860px; margin-inline: auto; }
.release-card { display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); }
.release-ver { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--accent); }
.release-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.release-body h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 14px; }
.release-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.release-body li { display: flex; align-items: baseline; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.badge { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; flex-shrink: 0; }
.badge.new { background: var(--accent-soft); color: var(--accent); }
.badge.imp { background: rgba(88, 180, 255, 0.14); color: #58b4ff; }
.badge.fix { background: rgba(54, 214, 168, 0.14); color: #36d6a8; }

.faq-list { max-width: 780px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; font-family: var(--font-display); font-size: 16.5px; font-weight: 600; cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-plus { font-family: var(--font-mono); color: var(--accent); font-size: 20px; transition: transform 0.2s var(--ease); }
.faq-list details[open] .faq-plus { transform: rotate(45deg); }
.faq-answer { padding: 0 4px 20px; font-size: 14.5px; color: var(--text-2); line-height: 1.7; }
.faq-answer p { margin: 0; }

.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 880px; margin: 0 auto; }
.price-card {
  position: relative; border-radius: 22px; background: var(--surface-solid); border: 1px solid var(--line);
  padding: 34px; display: flex; flex-direction: column; gap: 22px;
}
.price-card.featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--surface-solid)), var(--surface-solid));
  box-shadow: 0 30px 70px -30px var(--accent-glow);
}
.price-badge {
  position: absolute; top: 22px; right: 22px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.price-tier { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-3); }
.price-amount { font-family: var(--font-display); font-size: 46px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 8px 0 10px; }
.price-amount small { font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.price-desc { margin: 0; font-size: 14.5px; color: var(--text-2); }
.price-features { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); }
.price-features svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.price-btn { margin-top: auto; width: 100%; }

.pricing-footnote {
  text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-3);
}

.footer { padding: 64px 0 44px; border-top: 1px solid var(--line-soft); background: #040509; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.footer p { margin: 12px 0 0; font-size: 13.5px; color: var(--text-3); max-width: 320px; }
.footer h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer li a, .footer-link-btn { background: none; border: 0; padding: 0; font-size: 13.5px; color: var(--text-2); }
.footer li a:hover, .footer-link-btn:hover { color: var(--text); }
.footer-bottom { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }

/* Command Palette, Lightbox, Legal Modal, Toast */
.cmd-backdrop, .lightbox-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(3, 4, 9, 0.82); backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 20px;
}
.cmd-backdrop { align-items: start; padding-top: 10vh; }
.cmd-dialog {
  width: min(620px, 100%); border-radius: 18px; background: #0c0f18; border: 1px solid var(--line-strong);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.92); overflow: hidden;
}
.cmd-input-wrap { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.cmd-input-wrap svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.cmd-input-wrap input { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.cmd-results { max-height: 400px; overflow-y: auto; padding: 8px; display: grid; gap: 3px; }
.cmd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0;
  background: transparent; padding: 10px 13px; border-radius: 10px; text-align: left; color: var(--text-2);
}
.cmd-item:hover, .cmd-item.selected { background: var(--accent-soft); color: var(--text); }
.cmd-item-main { display: flex; flex-direction: column; min-width: 0; }
.cmd-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.cmd-item-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.cmd-item-kind { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); flex-shrink: 0; }
.cmd-foot { padding: 10px 16px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); }

.lightbox-card { width: min(1040px, 100%); border-radius: 18px; overflow: hidden; background: #0a0d16; border: 1px solid var(--line-strong); }
.lightbox-card img { width: 100%; max-height: 76vh; object-fit: contain; background: #05060b; }
.lightbox-bar { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }

.modal-card { width: min(560px, 100%); border-radius: 18px; background: #0d1019; border: 1px solid var(--line-strong); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-display); font-size: 17px; margin: 0; }
.modal-body { padding: 22px; display: grid; gap: 16px; font-size: 14px; color: var(--text-2); }
.modal-body h4 { font-family: var(--font-display); font-size: 14.5px; color: var(--text); margin: 0 0 4px; }
.modal-body p { margin: 0; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); z-index: 160;
  padding: 10px 18px; border-radius: 999px; background: #141929; border: 1px solid var(--accent);
  color: var(--text); font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Safe reveal */
.reveal { opacity: 1; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.pre-reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .clickgui-columns { grid-template-columns: repeat(2, 1fr); }
  .studio-secondary { grid-template-columns: 1fr; }
  .arch-shell { grid-template-columns: 1fr; }
  .arch-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .arch-tab { flex-shrink: 0; }
  .install-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cmd-trigger .cmd-text { display: none; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 12px 24px 18px;
    background: #080a11; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .clickgui-columns { grid-template-columns: 1fr; }
  .cinema-canvas-wrap { height: 420px; }
  .cinema-top-info { flex-direction: column; }
  .module-grid, .mm-settings-grid, .pricing-grid, .controls-grid { grid-template-columns: 1fr; }
  .clean-row { grid-template-columns: 1fr; gap: 4px; }
  .release-card { grid-template-columns: 1fr; gap: 10px; }
  .mm-specs-bar { grid-template-columns: 1fr; }
}
