/* ── Demo Section Wrapper ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Syne:wght@700;800&display=swap');

.demo-section { padding: 0 0 60px; background: transparent; }

.demo-intro {
  text-align: center;
  padding: 60px 60px 36px;
}
.demo-intro h2 {
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.demo-intro p { color: var(--muted); font-size: 14.5px; max-width: 440px; margin: 0 auto 28px; }

.demo-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dsw-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: var(--muted);
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.dsw-btn:hover { border-color: #3a3a3a; color: var(--text); }
.dsw-btn.active { background: #161616; border-color: #3a3a3a; color: #fff; }
.dsw-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dsw-badge {
  background: #111;
  border: 1px solid #222;
  color: #3a3a3a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-left: 8px;
}

.demo-frame { max-width: 1160px; margin: 28px auto 0; padding: 0 40px; }

.demo-win {
  display: none;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e1e1e;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  height: 660px;
}
.demo-win.active { display: block; }

@media (max-width: 900px) {
  .gp-preview-panel { display: none; }
  .gp-sidebar { width: 160px; }
}
@media (max-width: 640px) {
  .gp-sidebar { display: none; }
  .demo-frame { padding: 0 12px; }
}

/* ════════════════════════════════════════
   TOUCH / RIPPLE EFFECTS (both tools)
════════════════════════════════════════ */
.gp-shell, .bfx-shell { cursor: default; }

/* Ripple container */
.gp-shell button, .gp-shell .gp-sb-item, .gp-shell .gp-tbtn,
.bfx-shell button, .bfx-shell .bfx-pi, .bfx-shell .bfx-nav-btn {
  position: relative;
  overflow: hidden;
}

/* Touch press scale — feels like tapping */
.gp-shell button:active,
.gp-shell .gp-sb-item:active { transform: scale(0.96); transition: transform 0.08s; }
.bfx-shell button:active,
.bfx-shell .bfx-pi:active  { transform: scale(0.96); transition: transform 0.08s; }

/* Ripple element injected by JS */
.touch-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.45s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ════════════════════════════════════════
   GP TOOL DEMO  — exact match to real K3GP tool
════════════════════════════════════════ */
.gp-shell {
  display: flex;
  flex-direction: column;
  height: 660px;
  background: #080c14;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: #e8f0ff;
  overflow: hidden;
}

/* ── Topbar — 52px, matches real tool ── */
.gp-topbar {
  height: 52px;
  background: #0d1320;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}
.gp-wordmark {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #e8f0ff;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.gp-wordmark em { font-style: normal; color: #ff6b35; }

.gp-chips { display: flex; gap: 6px; }
.gp-chip { padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; font-family: 'DM Mono',monospace; letter-spacing: 0.8px; text-transform: uppercase; }
.chip-orange { background: rgba(255,107,53,0.15); color: #ff6b35; border: 1px solid rgba(255,107,53,0.3); }
.chip-blue   { background: rgba(77,159,255,0.12);  color: #4d9fff; border: 1px solid rgba(77,159,255,0.25); }
.chip-green  { background: rgba(0,232,122,0.1);    color: #00e87a; border: 1px solid rgba(0,232,122,0.25); }

.gp-topbar-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* Topbar buttons — exactly matches .tbarbtn in real tool */
.gp-tbarbtn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #121929;
  color: #7d91b5;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gp-tbarbtn:hover { border-color: rgba(255,255,255,0.15); color: #e8f0ff; background: #18213a; }
.gp-accent  { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.4); color: #ff6b35; }
.gp-accent:hover  { background: rgba(255,107,53,0.25); }
.gp-blue    { background: rgba(77,159,255,0.12); border-color: rgba(77,159,255,0.3); color: #4d9fff; }
.gp-blue:hover    { background: rgba(77,159,255,0.2); }
.gp-green   { background: rgba(0,232,122,0.1);  border-color: rgba(0,232,122,0.3);  color: #00e87a; }
.gp-green:hover   { background: rgba(0,232,122,0.2); }
.gp-orange  { background: rgba(255,170,68,0.12); border-color: rgba(255,170,68,0.4); color: #ffaa44; }
.gp-orange:hover  { background: rgba(255,170,68,0.22); }
.gp-purple  { background: rgba(179,136,255,0.12); border-color: rgba(179,136,255,0.4); color: #b388ff; }
.gp-purple:hover  { background: rgba(179,136,255,0.22); }

/* ── Layout row (sidebar + main) ── */
.gp-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* ── Sidebar 220px — matches real tool ── */
.gp-sidebar {
  width: 220px;
  background: #0d1320;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.gp-sidebar::-webkit-scrollbar { width: 2px; }
.gp-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 1px; }

.gp-sb-xml-block { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.gp-sb-xml-status {
  background: #121929;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  min-height: 36px;
  margin-bottom: 8px;
  color: #3d4f6b;
  line-height: 1.4;
}
.gp-sb-xml-row { display: flex; gap: 6px; }
.gp-sb-xml-btn {
  flex: 1;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #121929;
  color: #7d91b5;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
}
.gp-sb-xml-btn:hover { border-color: #ff6b35; color: #ff6b35; }
.gp-sb-save { border-color: rgba(0,232,122,0.3); color: #00e87a; }
.gp-sb-save:hover { background: rgba(0,232,122,0.1); }

.gp-sb-section { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.gp-sb-head {
  font-size: 9px;
  font-weight: 700;
  color: #3d4f6b;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 16px 4px;
}
.gp-sb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #7d91b5;
  border-left: 2px solid transparent;
  transition: all 0.1s;
  user-select: none;
}
.gp-sb-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }
.gp-sb-item:hover { color: #e8f0ff; background: rgba(255,255,255,0.03); }
.gp-sb-item.active { color: #e8f0ff; background: rgba(255,107,53,0.07); border-left-color: #ff6b35; }

.gp-sb-preset-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 12px;
  color: #7d91b5;
  transition: all 0.1s;
}
.gp-sb-preset-mini:hover { color: #e8f0ff; background: rgba(255,255,255,0.03); }
.gp-sb-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Main area (timebar + midrow) ── */
.gp-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }

/* ── Timebar at TOP — matches real tool ── */
.gp-timebar {
  background: #0d1320;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.gp-timebar::-webkit-scrollbar { display: none; }
.gp-tbar-label {
  font-size: 9px;
  font-weight: 700;
  color: #3d4f6b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-right: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.gp-tbtn {
  height: 28px;
  min-width: 44px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #121929;
  cursor: pointer;
  color: #7d91b5;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  transition: all 0.1s;
  flex-shrink: 0;
}
.gp-tbtn:hover { color: #e8f0ff; border-color: rgba(255,255,255,0.1); }
.gp-tbtn.active { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.4); color: #ff6b35; }

.gp-edit-all-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #7d91b5;
  white-space: nowrap;
  flex-shrink: 0;
}
.gp-toggle-sw { position: relative; display: inline-block; width: 32px; height: 18px; flex-shrink: 0; }
.gp-toggle-cb { opacity: 0; width: 0; height: 0; }
.gp-toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #18213a;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: 0.2s;
}
.gp-toggle-thumb {
  position: absolute;
  content: '';
  height: 12px; width: 12px;
  left: 2px; top: 2px;
  background: #3d4f6b;
  border-radius: 50%;
  transition: 0.2s;
}
.gp-toggle-cb:checked + .gp-toggle-track { background: rgba(77,159,255,0.2); border-color: rgba(77,159,255,0.4); }
.gp-toggle-cb:checked + .gp-toggle-track .gp-toggle-thumb { background: #4d9fff; transform: translateX(14px); }

/* ── Midrow (content + preview panel) ── */
.gp-midrow { flex: 1; display: flex; overflow: hidden; min-height: 0; }

/* ── Scrollable content area ── */
.gp-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  min-width: 0;
  min-height: 0;
}
.gp-content::-webkit-scrollbar { width: 4px; }
.gp-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.gp-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.gp-section-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: #e8f0ff; letter-spacing: -0.3px; }
.gp-section-time { font-family: 'DM Mono', monospace; font-size: 10px; color: #3d4f6b; padding: 2px 8px; background: #121929; border-radius: 20px; border: 1px solid rgba(255,255,255,0.06); }

/* ── Card grid — matches real tool exactly ── */
.gp-panel { display: none; }
.gp-panel.active { display: block; }
.gp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 7px;
}

/* ── Param Card — matches .param-card in real tool ── */
.gp-param-card {
  background: #141c2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 9px;
  transition: border-color 0.15s;
}
.gp-param-card:hover { border-color: rgba(255,255,255,0.1); }

.gp-param-card-label {
  font-size: 10px;
  font-weight: 600;
  color: #7d91b5;
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

/* Color card - matches .clr-top, .swatch-big, .hex-field, .rgb-mini */
.gp-clr-top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.gp-swatch {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.gp-swatch input[type=color] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.gp-clr-inputs { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gp-hex {
  background: #121929;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 3px 6px;
  color: #e8f0ff;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  width: 100%;
  text-align: center;
  outline: none;
}
.gp-hex:focus { border-color: #ff6b35; }
.gp-rgb-mini { display: flex; gap: 3px; }
.gp-rval {
  background: #121929;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 3px;
  color: #e8f0ff;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  width: 100%;
  text-align: center;
  outline: none;
  min-width: 0;
}
.gp-rval:focus { border-color: #ff6b35; }

/* RGB sliders — matches .rgb-row grid layout */
.gp-rgb-sliders { display: flex; flex-direction: column; gap: 3px; }
.gp-rgb-row { display: grid; grid-template-columns: 10px 1fr 22px; align-items: center; gap: 4px; }
.gp-rlbl { font-family: 'DM Mono', monospace; font-size: 8px; font-weight: 700; text-align: center; }
.gp-rlbl.r { color: #e06060; }
.gp-rlbl.g { color: #60e060; }
.gp-rlbl.b { color: #6090e0; }
.gp-rdisplay { font-family: 'DM Mono', monospace; font-size: 9px; color: #7d91b5; text-align: right; }

/* Num slider card */
.gp-num-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.gp-num-label { font-size: 11.5px; color: #7d91b5; }
.gp-num-val { font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 500; color: #e8f0ff; }
.gp-num-range { display: flex; justify-content: space-between; font-size: 9px; color: #3d4f6b; margin-top: 4px; font-family: 'DM Mono', monospace; }

/* Sliders — matches real tool: 2px height, orange fill, 9px thumb */
.gp-slider {
  width: 100%;
  height: 2px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #ff6b35 var(--pct,0%), var(--pct,0%), #18213a var(--pct,0%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.gp-slider::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; }
.gp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ff6b35;
  margin-top: -3px;
  box-shadow: 0 0 5px rgba(255,107,53,0.4);
  cursor: pointer;
}
.gp-slider.r::-webkit-slider-thumb { background: #e06060; box-shadow: 0 0 5px rgba(224,96,96,0.4); }
.gp-slider.g::-webkit-slider-thumb { background: #60e060; box-shadow: 0 0 5px rgba(96,224,96,0.4); }
.gp-slider.b::-webkit-slider-thumb { background: #6090e0; box-shadow: 0 0 5px rgba(96,144,224,0.4); }

/* Card apply-all footer */
.gp-card-footer { display: flex; justify-content: flex-end; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
.gp-apply-all-btn {
  height: 20px; padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #3d4f6b;
  font-size: 9px;
  cursor: pointer;
  transition: all 0.1s;
}
.gp-apply-all-btn:hover { border-color: #ff6b35; color: #ff6b35; }

/* ── Preview Panel 380px — matches real tool ── */
.gp-preview-panel {
  width: 380px;
  min-width: 280px;
  background: #0d1320;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  overflow: hidden;
}
.gp-preview-header {
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gp-preview-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: #7d91b5;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 1;
}
.gp-preview-time-badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: #ff6b35;
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.3);
  padding: 2px 8px;
  border-radius: 20px;
}
.gp-preview-canvas-wrap { flex: 1; position: relative; overflow: hidden; min-height: 0; background: #000; }
#gpCanvas { width: 100%; height: 100%; display: block; }
.gp-preview-info {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gp-pinfo-item { display: flex; flex-direction: column; gap: 2px; }
.gp-pinfo-label { font-size: 9px; color: #3d4f6b; text-transform: uppercase; letter-spacing: 1px; }
.gp-pinfo-val { font-family: 'DM Mono', monospace; font-size: 11px; color: #e8f0ff; }

/* ── AI panel ── */
.gp-ai-wrap { max-width: 620px; }
.gp-ai-banner {
  background: linear-gradient(135deg, rgba(179,136,255,0.1), rgba(77,159,255,0.07));
  border: 1px solid rgba(179,136,255,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.gp-ai-prompt-area { background: #141c2e; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.gp-ai-prompt-label { font-size: 11px; font-weight: 600; color: #b388ff; letter-spacing: 0.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.gp-ai-prompt-row { display: flex; gap: 8px; align-items: flex-end; }
.gp-ai-textarea {
  flex: 1;
  background: #121929;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #e8f0ff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  resize: none;
  min-height: 52px;
  max-height: 120px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s;
}
.gp-ai-textarea:focus { border-color: #b388ff; }
.gp-ai-textarea::placeholder { color: #3d4f6b; }
.gp-ai-send-btn {
  height: 52px; width: 52px;
  border-radius: 8px;
  border: 1px solid rgba(179,136,255,0.4);
  background: rgba(179,136,255,0.12);
  color: #b388ff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gp-ai-send-btn:hover { background: rgba(179,136,255,0.22); border-color: #b388ff; }
.gp-ai-prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gp-prompt-chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: #121929;
  border: 1px solid rgba(255,255,255,0.1);
  color: #7d91b5;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.1s;
}
.gp-prompt-chip:hover { border-color: #b388ff; color: #b388ff; background: rgba(179,136,255,0.1); }

/* ── Settings panel ── */
.gp-settings-wrap { max-width: 540px; }
.gp-settings-banner {
  background: linear-gradient(135deg, rgba(77,159,255,0.1), rgba(77,159,255,0.05));
  border: 1px solid rgba(77,159,255,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.gp-settings-section { background: #141c2e; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.gp-settings-section-title { font-size: 11px; font-weight: 700; color: #4d9fff; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.gp-settings-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.gp-settings-row:last-child { border-bottom: none; padding-bottom: 0; }

/* Preset buttons */
.gp-preset-btn {
  background: #121929;
  border: 1px solid rgba(255,255,255,0.07);
  color: #7d91b5;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gp-preset-btn:hover { background: rgba(255,255,255,0.08); color: #e8f0ff; }
.gp-preset-btn.active { background: rgba(255,107,53,0.1); border-color: rgba(255,107,53,0.3); color: #ff6b35; }
.gp-pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ════════════════════════════════════════
   BFX TOOL DEMO
════════════════════════════════════════ */
.bfx-shell {
  display: flex;
  flex-direction: column;
  height: 660px;
  background: #06060e;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  color: #b0b0d8;
  overflow: hidden;
}

/* Header */
.bfx-hdr {
  height: 48px;
  background: #09091a;
  border-bottom: 1px solid #1a1a38;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
}
.bfx-brand-name { font-size: 13px; font-weight: 800; color: #00e5ff; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; }
.bfx-brand-sub  { font-size: 8px;  color: #3a3a60;  letter-spacing: 0.08em; text-transform: uppercase; }
.bfx-vd { width: 1px; height: 22px; background: #1a1a38; flex-shrink: 0; margin: 0 2px; }
.bfx-hstatus { font-size: 10px; color: #3a3a60; white-space: nowrap; }
.bfx-huser {
  font-size: 10px; font-weight: 700; color: #00e5ff;
  letter-spacing: 0.05em;
  background: rgba(0,229,255,0.07);
  border: 1px solid rgba(0,229,255,0.18);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

.bfx-nav { display: flex; gap: 2px; margin-left: auto; }
.bfx-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #3a3a60;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bfx-nav-btn:hover { background: rgba(255,255,255,0.03); color: #b0b0d8; }
.bfx-nav-btn.active { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.25); color: #00e5ff; }

.bfx-hbtn {
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a38;
  color: #3a3a60;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.bfx-hbtn:hover { background: rgba(255,255,255,0.06); color: #b0b0d8; }
.bfx-hbtn.g { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.2); color: #00e5ff; }
.bfx-hbtn.r { background: rgba(255,34,85,0.08);  border-color: rgba(255,34,85,0.2);  color: #ff2255; }
.bfx-hbtn.b { background: rgba(77,159,255,0.08); border-color: rgba(77,159,255,0.2); color: #4d9fff; }

/* Pages */
.bfx-page { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.bfx-page.active { display: flex; }

/* Preview Bar */
.bfx-pvbar {
  height: 40px;
  background: #09091a;
  border-bottom: 1px solid #1a1a38;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 5px;
  flex-shrink: 0;
}
.bfx-pvlbl { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: #3a3a60; text-transform: uppercase; margin-right: 3px; white-space: nowrap; }
.bfx-pbtn {
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a38;
  color: #3a3a60;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.bfx-pbtn:hover { background: rgba(255,255,255,0.06); color: #b0b0d8; }
.bfx-pbtn.r { background: rgba(255,34,85,0.1);  border-color: rgba(255,34,85,0.25);  color: #ff2255; }
.bfx-pbtn.b { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.2);   color: #00e5ff; }
.bfx-pbtn.o { background: rgba(255,170,68,0.1); border-color: rgba(255,170,68,0.25); color: #ffaa44; }
.bfx-pvd { width: 1px; height: 18px; background: #1a1a38; flex-shrink: 0; margin: 0 2px; }
.bfx-quality,.bfx-modes { display: flex; gap: 2px; }
.bfx-qbtn,.bfx-mbtn {
  background: transparent;
  border: 1px solid transparent;
  color: #3a3a60;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.03em;
}
.bfx-qbtn:hover,.bfx-mbtn:hover { background: rgba(255,255,255,0.04); color: #b0b0d8; }
.bfx-qbtn.active { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.25); color: #00e5ff; }
.bfx-mbtn.active { background: rgba(255,34,85,0.1); border-color: rgba(255,34,85,0.25); color: #ff2255; }

/* Editor body */
.bfx-body { display: flex; flex: 1; overflow: hidden; }

/* Left panel */
.bfx-lp {
  width: 210px;
  background: #09091a;
  border-right: 1px solid #1a1a38;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.bfx-srch {
  background: rgba(255,255,255,0.03);
  border: none;
  border-bottom: 1px solid #1a1a38;
  color: #b0b0d8;
  font-size: 12px;
  padding: 9px 12px;
  outline: none;
  font-family: inherit;
  width: 100%;
}
.bfx-srch::placeholder { color: #3a3a60; }
.bfx-cats { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 10px; border-bottom: 1px solid #1a1a38; }
.bfx-cbt {
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a38;
  color: #3a3a60;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.bfx-cbt:hover { background: rgba(255,255,255,0.06); color: #b0b0d8; }
.bfx-cbt.active { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.25); color: #00e5ff; }

.bfx-list { flex: 1; overflow-y: auto; }
.bfx-list::-webkit-scrollbar { width: 3px; }
.bfx-list::-webkit-scrollbar-thumb { background: #1a1a38; }
.bfx-pi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  border-left: 2px solid transparent;
  transition: all 0.12s;
}
.bfx-pi:hover { background: rgba(255,255,255,0.03); }
.bfx-pi.active { background: rgba(0,229,255,0.06); border-left-color: #00e5ff; }
.bfx-psw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.bfx-pn { font-size: 11.5px; font-weight: 600; color: #b0b0d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfx-pi.active .bfx-pn { color: #00e5ff; }
.bfx-pd { font-size: 9px; color: #3a3a60; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Right panel */
.bfx-rp {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0d0d1e;
}
.bfx-rp::-webkit-scrollbar { width: 4px; }
.bfx-rp::-webkit-scrollbar-thumb { background: #1a1a38; border-radius: 2px; }

.bfx-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bfx-empty-icon { font-size: 34px; color: #1a1a38; }
.bfx-empty-txt  { font-size: 12.5px; font-weight: 800; color: #2a2a4a; letter-spacing: 0.1em; text-transform: uppercase; }
.bfx-empty-sub  { font-size: 11px; color: #1e1e38; }

.bfx-editor { padding: 14px; display: flex; flex-direction: column; gap: 14px; }

.bfx-ef-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bfx-ef-dot { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; margin-top: 4px; }
.bfx-ef-name { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -0.01em; line-height: 1.2; }
.bfx-ef-meta { font-size: 10.5px; color: #3a3a60; margin-top: 3px; display: flex; gap: 10px; }
.bfx-ef-status {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.2);
  color: #00e5ff; padding: 3px 8px; border-radius: 4px; align-self: flex-start; margin-top: 2px;
}

.bfx-sec {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #3a3a60; margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.bfx-sec::after { content: ''; flex: 1; height: 1px; background: #1a1a38; }

.bfx-em-actions { display: flex; gap: 5px; margin-bottom: 8px; }
.bfx-eact {
  background: rgba(255,255,255,0.04);
  border: 1px solid #1a1a38;
  color: #3a3a60;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
}
.bfx-eact:hover { background: rgba(255,255,255,0.07); color: #b0b0d8; }

.bfx-emitters { display: flex; flex-direction: column; gap: 6px; }
.bfx-em-row {
  background: #131328;
  border: 1px solid #1a1a38;
  border-radius: 7px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bfx-em-sw {
  width: 38px; height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.bfx-em-sw input[type=color] {
  position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; opacity: 0; cursor: pointer;
}
.bfx-em-argb {
  font-size: 10.5px; font-family: monospace; color: #5a5a88;
  cursor: pointer; padding: 3px 7px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #1a1a38; border-radius: 4px;
  transition: color 0.15s; white-space: nowrap;
}
.bfx-em-argb:hover { color: #00e5ff; border-color: rgba(0,229,255,0.25); }
.bfx-em-al { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 100px; }
.bfx-em-allbl { font-size: 9px; color: #3a3a60; font-weight: 700; letter-spacing: 0.05em; white-space: nowrap; }
.bfx-em-alval { font-size: 10px; color: #3a3a60; font-family: monospace; width: 26px; text-align: right; }

/* BFX Slider */
.bfx-sl {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, rgba(0,229,255,0.5) var(--pct,50%), rgba(255,255,255,0.08) var(--pct,50%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.bfx-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #00e5ff;
  cursor: pointer;
  border: 2px solid #131328;
  box-shadow: 0 0 5px rgba(0,229,255,0.4);
}

/* Timing grid */
.bfx-timing { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bfx-tc {
  background: #131328;
  border: 1px solid #1a1a38;
  border-radius: 7px;
  padding: 9px 11px;
}
.bfx-tc-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #3a3a60; margin-bottom: 8px; }
.bfx-tc-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.bfx-tc-row:last-child { margin-bottom: 0; }
.bfx-tc-sub { font-size: 8.5px; font-weight: 700; color: #3a3a60; width: 22px; flex-shrink: 0; }
.bfx-tc-val { font-size: 10px; color: #00e5ff; font-family: monospace; width: 30px; text-align: right; }

/* Actions */
.bfx-actions { display: flex; gap: 8px; }
.bfx-act {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.03em;
}
.bfx-act.save  { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.3); color: #00e5ff; }
.bfx-act.prev  { background: rgba(255,255,255,0.04); border-color: #1a1a38; color: #5a5a88; }
.bfx-act.save:hover { background: rgba(0,229,255,0.18); }
.bfx-act.prev:hover { background: rgba(255,255,255,0.08); color: #b0b0d8; }

/* THEME PAGE */
.bfx-theme-wrap { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.bfx-theme-wrap::-webkit-scrollbar { width: 4px; }
.bfx-theme-wrap::-webkit-scrollbar-thumb { background: #1a1a38; }
.bfx-tpresets { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.bfx-tcard {
  background: #131328;
  border: 1px solid #1a1a38;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.bfx-tcard:hover { border-color: #2a2a50; }
.bfx-tcard.active { border-color: rgba(0,229,255,0.35); background: rgba(0,229,255,0.05); }
.bfx-tdot { width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 6px; }
.bfx-tname { font-size: 9.5px; font-weight: 700; color: #3a3a60; letter-spacing: 0.06em; text-transform: uppercase; }
.bfx-tcard.active .bfx-tname { color: #b0b0d8; }
.bfx-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bfx-cp-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #1a1a38; }
.bfx-cp-row:last-child { border-bottom: none; }
.bfx-cp-lbl { font-size: 11px; color: #7d7daa; }
.bfx-cp-pair { display: flex; align-items: center; gap: 7px; }
.bfx-cpsw { width: 24px; height: 24px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; position: relative; overflow: hidden; flex-shrink: 0; }
.bfx-cpsw input[type=color] { position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; opacity: 0; cursor: pointer; }
.bfx-cphex {
  background: rgba(255,255,255,0.04);
  border: 1px solid #1a1a38;
  border-radius: 4px;
  color: #7d7daa;
  font-size: 10.5px;
  padding: 3px 7px;
  outline: none;
  font-family: monospace;
  width: 72px;
}
.bfx-glow-row { display: flex; flex-direction: column; gap: 8px; }
.bfx-grow { display: flex; align-items: center; gap: 10px; }
.bfx-glbl { font-size: 11px; color: #7d7daa; flex: 1; }
.bfx-gval { font-size: 10.5px; color: #00e5ff; font-family: monospace; width: 36px; text-align: right; }

/* SETTINGS PAGE */
.bfx-sets-wrap { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.bfx-sets-wrap::-webkit-scrollbar { width: 4px; }
.bfx-sets-wrap::-webkit-scrollbar-thumb { background: #1a1a38; }
.bfx-scard { background: #131328; border: 1px solid #1a1a38; border-radius: 9px; padding: 13px 14px; }
.bfx-scard-ttl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #b0b0d8; margin-bottom: 12px; }
.bfx-qcards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.bfx-qc {
  background: #0d0d1e;
  border: 1px solid #1a1a38;
  border-radius: 6px;
  padding: 9px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.bfx-qc:hover { border-color: rgba(0,229,255,0.2); }
.bfx-qc.active { background: rgba(0,229,255,0.07); border-color: rgba(0,229,255,0.3); }
.bfx-qcn { font-size: 11.5px; font-weight: 800; color: #b0b0d8; letter-spacing: 0.04em; margin-bottom: 2px; }
.bfx-qc.active .bfx-qcn { color: #00e5ff; }
.bfx-qcv { font-size: 9.5px; color: #3a3a60; }
.bfx-ultra {
  background: rgba(255,34,85,0.05);
  border: 1px solid rgba(255,34,85,0.2);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s;
}
.bfx-ultra:hover { background: rgba(255,34,85,0.1); }
.bfx-ultra-n { font-size: 12px; font-weight: 800; color: #ff2255; letter-spacing: 0.04em; }
.bfx-ultra-d { font-size: 10px; color: #3a3a60; }
.bfx-toggles { display: flex; flex-direction: column; gap: 10px; }
.bfx-trow { display: flex; align-items: center; justify-content: space-between; }
.bfx-tlbl { font-size: 12px; color: #b0b0d8; }
.bfx-ttrack {
  width: 32px; height: 17px;
  background: rgba(255,255,255,0.07);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.bfx-ttrack.on { background: rgba(0,229,255,0.3); }
.bfx-ttrack::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 13px; height: 13px;
  background: #3a3a60;
  border-radius: 50%;
  transition: all 0.2s;
}
.bfx-ttrack.on::after { left: 17px; background: #00e5ff; }
.bfx-srows { display: flex; flex-direction: column; gap: 8px; }
.bfx-srow { display: flex; align-items: center; gap: 10px; }
.bfx-slbl { font-size: 11.5px; color: #7d7daa; flex: 1; }
.bfx-sval { font-size: 10.5px; color: #00e5ff; font-family: monospace; width: 36px; text-align: right; }
.bfx-save-row { display: flex; gap: 8px; margin-top: 4px; }
.bfx-save-btn {
  flex: 1;
  padding: 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  font-family: inherit;
  transition: all 0.15s;
}
.bfx-save-btn.save { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.3); color: #00e5ff; }
.bfx-save-btn.save:hover { background: rgba(0,229,255,0.18); }
.bfx-save-btn.reset { background: rgba(255,255,255,0.04); border-color: #1a1a38; color: #5a5a88; }
.bfx-save-btn.reset:hover { background: rgba(255,255,255,0.08); color: #b0b0d8; }

/* Stats row */
.bfx-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: 12px; }
.bfx-stat {
  background: #131328;
  border: 1px solid #1a1a38;
  border-radius: 7px;
  padding: 10px;
  text-align: center;
}
.bfx-stat-val { font-size: 18px; font-weight: 800; color: #00e5ff; font-family: monospace; line-height: 1; margin-bottom: 4px; }
.bfx-stat-lbl { font-size: 9px; font-weight: 700; color: #3a3a60; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 768px) {
  .demo-intro { padding: 48px 24px 28px; }
  .demo-frame { padding: 0 16px; }
  .gp-preview { display: none; }
  .bfx-timing { grid-template-columns: 1fr 1fr; }
  .bfx-stats { grid-template-columns: 1fr 1fr; }
}
