/* ═══════════════════════════════════════════════════════════
   QubitPage™ Quantum OS — Main Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1422;
  --bg-tertiary: #141928;
  --bg-surface: #1a2035;
  --bg-elevated: #1e2640;
  --border: #1e2a45;
  --border-glow: #00d4ff33;
  --text-primary: #e8edf5;
  --text-secondary: #8b95b0;
  --text-dim: #5a6480;
  --accent: #00d4ff;
  --accent-green: #00ffaa;
  --accent-purple: #a855f7;
  --accent-orange: #ff8c00;
  --accent-red: #ff4060;
  --accent-pink: #f472b6;
  --accent-glow: #00d4ff22;
  --window-bg: #0d1220ee;
  --window-header: #111830;
  --taskbar-bg: #080c16ee;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,.5);
  --shadow-glow: 0 0 20px rgba(0,212,255,.15);
  --transition: all .2s ease;
}

/* Alternate themes */
body.theme-quantum-blue {
  --bg-primary: #040a18;
  --bg-secondary: #081020;
  --bg-surface: #0c1830;
  --accent: #3b82f6;
  --accent-green: #22d3ee;
}
body.theme-quantum-purple {
  --bg-primary: #0a0518;
  --bg-secondary: #10081e;
  --bg-surface: #180c30;
  --accent: #a855f7;
  --accent-green: #d946ef;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.cyan { color: var(--accent) !important; }
.green { color: var(--accent-green) !important; }
.purple { color: var(--accent-purple) !important; }
.dim { color: var(--text-dim) !important; }

/* ══════════════════════════════════════════════════════════════
   BOOT SCREEN
   ══════════════════════════════════════════════════════════════ */
#boot-screen {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
}
.boot-logo { width: 120px; height: 120px; }
.boot-atom { width: 100%; height: 100%; }
.boot-atom .orbit { transform-origin: center; }
.orbit.o1 { animation: orbit-spin 4s linear infinite; }
.orbit.o2 { animation: orbit-spin 4s linear infinite; transform: rotate(60deg); }
.orbit.o3 { animation: orbit-spin 4s linear infinite; transform: rotate(120deg); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit.o2 { animation-delay: -1.33s; }
.orbit.o3 { animation-delay: -2.66s; }

.boot-title {
  font-size: 36px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.boot-sub { color: var(--text-secondary); font-size: 14px; }
.boot-progress {
  width: 300px; height: 3px; background: var(--border);
  border-radius: 3px; overflow: hidden; margin-top: 12px;
}
.boot-bar {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  border-radius: 3px; transition: width .3s ease;
}
.boot-log {
  margin-top: 16px; font-size: 12px; font-family: var(--font-mono);
  color: var(--text-dim); text-align: center;
  max-height: 100px; overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   DESKTOP
   ══════════════════════════════════════════════════════════════ */
#desktop {
  position: fixed; inset: 0;
  background: var(--bg-primary);
}
#particles-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}

/* ── Desktop Icons ───────────────────────────────────────────── */
#desktop-icons {
  position: absolute; top: 20px; left: 20px; z-index: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.desktop-icon {
  display: flex; flex-direction: column; align-items: center;
  width: 80px; padding: 10px 4px; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  text-align: center; user-select: none;
}
.desktop-icon:hover {
  background: rgba(0,212,255,.08);
}
.desktop-icon:active {
  transform: scale(.95);
}
.icon-img {
  font-size: 32px; margin-bottom: 4px;
  filter: drop-shadow(0 0 6px rgba(0,212,255,.3));
}
.desktop-icon span {
  font-size: 11px; color: var(--text-secondary);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

/* ══════════════════════════════════════════════════════════════
   WINDOWS
   ══════════════════════════════════════════════════════════════ */
#windows-container {
  position: absolute; inset: 0 0 48px 0; z-index: 10;
  pointer-events: none;
}
.os-window {
  position: absolute; pointer-events: auto;
  background: var(--window-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  min-width: 400px; min-height: 300px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.os-window.focused {
  border-color: var(--accent);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.os-window.maximized {
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: calc(100vh - 48px) !important;
  border-radius: 0;
}

/* Window Header */
.win-header {
  display: flex; align-items: center;
  height: 38px; padding: 0 12px;
  background: var(--window-header);
  border-bottom: 1px solid var(--border);
  cursor: grab; user-select: none;
  flex-shrink: 0;
}
.win-header:active { cursor: grabbing; }
.win-title {
  flex: 1; font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win-controls {
  display: flex; gap: 6px;
}
.win-btn {
  width: 14px; height: 14px; border-radius: 50%;
  border: none; cursor: pointer;
  transition: var(--transition);
}
.win-btn:hover { transform: scale(1.2); }
.win-btn.minimize { background: var(--accent-orange); }
.win-btn.maximize { background: var(--accent-green); }
.win-btn.close { background: var(--accent-red); }

/* Window Body */
.win-body {
  flex: 1; overflow: auto; padding: 0;
}

/* ══════════════════════════════════════════════════════════════
   TASKBAR
   ══════════════════════════════════════════════════════════════ */
#taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 48px; z-index: 1000;
  background: var(--taskbar-bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  display: flex; align-items: center;
  padding: 0 8px;
}
#start-button {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
}
#start-button:hover { background: rgba(0,212,255,.12); }
#start-button:active { transform: scale(.92); }
#taskbar-apps {
  flex: 1; display: flex; gap: 4px;
  padding: 0 12px; overflow-x: auto;
}
.taskbar-item {
  height: 36px; padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
  border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.taskbar-item:hover { background: rgba(0,212,255,.08); color: var(--text-primary); }
.taskbar-item.active {
  background: rgba(0,212,255,.12);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
#taskbar-right {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--text-secondary);
  padding-right: 8px;
}
#quantum-status {
  display: flex; align-items: center; gap: 4px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Start Menu ──────────────────────────────────────────────── */
#start-menu {
  position: fixed; bottom: 56px; left: 8px;
  width: 280px; z-index: 2000;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.start-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,212,255,.05), rgba(168,85,247,.05));
}
.start-header h3 {
  font-size: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.start-header small { color: var(--text-dim); }
.start-apps { padding: 8px; }
.start-app {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 6px;
  cursor: pointer; transition: var(--transition);
  font-size: 13px;
}
.start-app:hover { background: rgba(0,212,255,.08); color: var(--accent); }
.sa-icon { font-size: 18px; width: 24px; text-align: center; }
.start-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn-quantum {
  padding: 8px 20px; border: none; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #0090cc);
  color: #fff; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-ui);
}
.btn-quantum:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-quantum:active { transform: translateY(0); }
.btn-quantum:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary {
  padding: 8px 20px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-surface); color: var(--text-secondary);
  font-size: 13px; cursor: pointer; transition: var(--transition);
  font-family: var(--font-ui);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: 8px; }

/* ══════════════════════════════════════════════════════════════
   TERMINAL APP
   ══════════════════════════════════════════════════════════════ */
.app-terminal {
  height: 100%; display: flex; flex-direction: column;
  background: #0a0e18; font-family: var(--font-mono); font-size: 13px;
}
.term-output {
  flex: 1; padding: 12px; overflow-y: auto;
}
.term-line { padding: 1px 0; white-space: pre-wrap; word-break: break-all; }
.term-line.error { color: var(--accent-red); }
.term-line.success { color: var(--accent-green); }
.term-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-top: 1px solid var(--border);
  background: #080c14;
}
.term-prompt { color: var(--accent-green); font-weight: 600; white-space: nowrap; }
.term-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-mono); font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════
   CIRCUIT LAB APP
   ══════════════════════════════════════════════════════════════ */
.app-circuit-lab { height: 100%; display: flex; flex-direction: column; }
.cl-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}
.cl-preset {
  padding: 6px 10px; border-radius: 6px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 12px;
  font-family: var(--font-ui);
}
.cl-preset option { background: var(--bg-secondary); }
.cl-status {
  margin-left: auto; font-size: 12px; color: var(--text-dim);
  font-family: var(--font-mono);
}
.cl-main {
  flex: 1; display: flex; overflow: hidden;
}
.cl-editor-wrap, .cl-results-wrap {
  flex: 1; display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.cl-results-wrap { border-right: none; }
.cl-label {
  padding: 8px 14px; font-size: 11px; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}
.cl-editor {
  flex: 1; padding: 14px; resize: none;
  background: #0a0e18; border: none; outline: none;
  color: var(--accent-green); font-family: var(--font-mono); font-size: 13px;
  tab-size: 2;
}
.cl-results {
  flex: 1; padding: 14px; overflow-y: auto;
}
.cl-placeholder { color: var(--text-dim); text-align: center; padding: 40px; }
.cl-chart { width: 100%; height: 200px; padding: 10px; }

/* Result bars */
.result-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.result-label { font-family: var(--font-mono); font-size: 13px; width: 80px; color: var(--accent); }
.result-bar-track { flex: 1; height: 24px; background: var(--bg-surface); border-radius: 4px; overflow: hidden; }
.result-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  transition: width .5s ease;
}
.result-pct { font-family: var(--font-mono); font-size: 12px; width: 50px; text-align: right; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════
   QUANTUM GAME APP
   ══════════════════════════════════════════════════════════════ */
.app-quantum-game {
  height: 100%; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at center, #0c1428 0%, var(--bg-primary) 80%);
}
.qg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.qg-header h2 { font-size: 18px; color: var(--accent); }
.qg-score { font-family: var(--font-mono); font-size: 14px; color: var(--accent-green); }
.qg-arena {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.qg-intro { text-align: center; max-width: 400px; }
.qg-intro p { color: var(--text-secondary); margin-bottom: 24px; line-height: 1.7; }
.qg-controls { padding: 20px; border-top: 1px solid var(--border); }
.qg-hint {
  text-align: center; font-size: 16px; color: var(--accent-purple);
  margin-bottom: 16px; padding: 12px;
  background: rgba(168,85,247,.08); border-radius: var(--radius);
}
.qg-options {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.qg-option {
  padding: 12px 24px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); font-family: var(--font-mono); font-size: 16px;
  cursor: pointer; transition: var(--transition);
  min-width: 80px; text-align: center;
}
.qg-option:hover { border-color: var(--accent); color: var(--accent); }
.qg-option.correct { border-color: var(--accent-green); background: rgba(0,255,170,.1); color: var(--accent-green); }
.qg-option.wrong { border-color: var(--accent-red); background: rgba(255,64,96,.1); color: var(--accent-red); }
.qg-feedback {
  text-align: center; margin-top: 16px; padding: 12px;
  border-radius: var(--radius); font-size: 14px;
}
.qg-feedback.correct { background: rgba(0,255,170,.1); color: var(--accent-green); }
.qg-feedback.wrong { background: rgba(255,64,96,.1); color: var(--accent-red); }

/* ══════════════════════════════════════════════════════════════
   CRYPTO TOOLS APP
   ══════════════════════════════════════════════════════════════ */
.app-crypto-tools { height: 100%; display: flex; flex-direction: column; }
.ct-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}
.ct-tab {
  padding: 10px 16px; border: none; background: none;
  color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent;
  font-family: var(--font-ui);
}
.ct-tab:hover { color: var(--text-primary); }
.ct-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ct-panel { padding: 20px; flex: 1; overflow-y: auto; }
.ct-panel h3 { margin-bottom: 16px; color: var(--accent); font-size: 16px; }
.ct-input {
  width: 100%; padding: 12px; resize: vertical; min-height: 80px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-family: var(--font-mono); font-size: 13px;
  margin-bottom: 12px;
}
.ct-input:focus { border-color: var(--accent); outline: none; }
.ct-field {
  width: 100%; padding: 10px; margin-bottom: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-primary);
  font-family: var(--font-mono); font-size: 13px;
}
.ct-field:focus { border-color: var(--accent); outline: none; }
.ct-field-sm { width: 100px; padding: 8px; text-align: center; }
.ct-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ct-row label { color: var(--text-secondary); white-space: nowrap; }
.ct-result {
  margin-top: 16px; padding: 16px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px;
  word-break: break-all; line-height: 1.7;
}
.ct-result .label { color: var(--text-dim); font-size: 11px; text-transform: uppercase; }
.ct-result .value { color: var(--accent-green); margin-bottom: 8px; }

/* ══════════════════════════════════════════════════════════════
   ARIA AI APP
   ══════════════════════════════════════════════════════════════ */
.app-aria { height: 100%; display: flex; flex-direction: column; }
.aria-messages {
  flex: 1; padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.aria-msg {
  display: flex; gap: 10px; max-width: 85%;
  animation: msg-in .3s ease;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.aria-msg.bot { align-self: flex-start; }
.aria-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.aria-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(168,85,247,.15));
  border: 1px solid var(--border);
}
.aria-msg.user .aria-avatar { background: linear-gradient(135deg, rgba(0,255,170,.15), rgba(0,212,255,.15)); }
.aria-bubble {
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg-surface); border: 1px solid var(--border);
  font-size: 13px; line-height: 1.6;
}
.aria-bubble strong { color: var(--accent); }
.aria-bubble code {
  background: var(--bg-primary); padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px;
}
.aria-bubble pre {
  background: var(--bg-primary); padding: 10px; border-radius: 6px;
  margin: 8px 0; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5;
}
.aria-msg.user .aria-bubble {
  background: linear-gradient(135deg, rgba(0,212,255,.1), rgba(168,85,247,.1));
  border-color: rgba(0,212,255,.2);
}
.aria-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}
.aria-input {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px;
  font-family: var(--font-ui);
}
.aria-input:focus { border-color: var(--accent); outline: none; }
.aria-typing {
  color: var(--text-dim); font-size: 12px; padding: 4px 14px;
  animation: typing-pulse 1s ease-in-out infinite;
}
@keyframes typing-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* ══════════════════════════════════════════════════════════════
   SETTINGS APP
   ══════════════════════════════════════════════════════════════ */
.app-settings { padding: 24px; overflow-y: auto; height: 100%; }
.app-settings h2 { color: var(--accent); margin-bottom: 24px; }
.settings-section {
  margin-bottom: 24px; padding: 16px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.settings-section h3 { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; }
.settings-info {
  font-family: var(--font-mono); font-size: 12px;
  line-height: 2; color: var(--text-secondary);
}
.settings-info .val { color: var(--accent-green); }
.settings-themes { display: flex; gap: 8px; }
.theme-btn {
  padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); font-size: 12px; cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-ui);
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,.08); }
.settings-backends { font-family: var(--font-mono); font-size: 12px; line-height: 2; }

/* ══════════════════════════════════════════════════════════════
   DOCS APP
   ══════════════════════════════════════════════════════════════ */
.app-docs { height: 100%; display: flex; }
.docs-sidebar {
  width: 200px; padding: 16px; border-right: 1px solid var(--border);
  background: var(--bg-tertiary); overflow-y: auto; flex-shrink: 0;
}
.docs-sidebar h3 { color: var(--accent); font-size: 14px; margin-bottom: 12px; }
.docs-nav { display: flex; flex-direction: column; gap: 2px; }
.docs-link {
  padding: 8px 10px; border-radius: 6px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.docs-link:hover { background: rgba(0,212,255,.06); color: var(--text-primary); }
.docs-link.active { background: rgba(0,212,255,.1); color: var(--accent); }
.docs-content {
  flex: 1; padding: 24px; overflow-y: auto; line-height: 1.8;
}
.docs-content h1 { font-size: 24px; color: var(--accent); margin-bottom: 16px; }
.docs-content h2 { font-size: 18px; color: var(--accent-green); margin: 20px 0 10px; }
.docs-content h3 { font-size: 15px; color: var(--accent-purple); margin: 16px 0 8px; }
.docs-content p { color: var(--text-secondary); margin-bottom: 12px; }
.docs-content code {
  background: var(--bg-primary); padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-green);
}
.docs-content pre {
  background: var(--bg-primary); padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border); margin: 12px 0;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  overflow-x: auto; color: var(--accent-green);
}
.docs-content ul { padding-left: 20px; margin-bottom: 12px; color: var(--text-secondary); }
.docs-content li { margin-bottom: 4px; }
.docs-content .api-endpoint {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
}
.docs-content .api-method {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  margin-right: 8px;
}
.docs-content .api-method.get { background: rgba(0,212,255,.15); color: var(--accent); }
.docs-content .api-method.post { background: rgba(0,255,170,.15); color: var(--accent-green); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .os-window {
    min-width: 100% !important;
    min-height: calc(100vh - 48px) !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: calc(100vh - 48px) !important;
    border-radius: 0;
  }
  #desktop-icons { display: none; }
  .cl-main { flex-direction: column; }
  .app-docs { flex-direction: column; }
  .docs-sidebar { width: 100%; max-height: 120px; }
}

/* ═══════════════════════════════════════════════════════════
   QuantumDrug Explorer
   ═══════════════════════════════════════════════════════════ */
.app-quantum-drug { display: flex; flex-direction: column; height: 100%; padding: 12px; gap: 10px; overflow-y: auto; }
.qd-header { text-align: center; padding: 6px 0; }
.qd-header h2 { margin: 0; color: var(--accent); font-size: 1.3em; }
.qd-subtitle { color: var(--text-dim); font-size: 0.8em; margin-top: 2px; }

/* Steps indicator */
.qd-steps { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; }
.qd-step { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 16px; font-size: 0.78em; background: rgba(255,255,255,0.05); color: var(--text-dim); transition: all 0.3s; cursor: default; }
.qd-step.active { background: var(--accent); color: #000; font-weight: 600; }
.qd-step.done { background: var(--accent-green); color: #000; }
.qd-step-num { font-weight: 700; }
.qd-step-arrow { color: var(--text-dim); font-size: 0.7em; }

/* Panels */
.qd-panel { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.qd-panel h3 { margin: 0; color: var(--accent); font-size: 1em; border-bottom: 1px solid rgba(0,212,255,0.15); padding-bottom: 4px; }

/* Disease grid */
.qd-disease-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.qd-disease-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(0,212,255,0.1); border-radius: 8px; padding: 10px; cursor: pointer; transition: all 0.2s; }
.qd-disease-card:hover { border-color: var(--accent); background: rgba(0,212,255,0.06); transform: translateY(-1px); }
.qd-disease-card.selected { border-color: var(--accent); background: rgba(0,212,255,0.1); box-shadow: 0 0 12px rgba(0,212,255,0.2); }
.qd-disease-card h4 { margin: 0 0 4px; font-size: 0.85em; color: #fff; }
.qd-disease-card .qd-prev-text { font-size: 0.7em; color: var(--text-dim); }
.qd-disease-card .qd-targets { font-size: 0.7em; color: var(--accent); margin-top: 4px; }
.qd-disease-card .qd-complexity { display: inline-block; font-size: 0.65em; padding: 1px 6px; border-radius: 8px; margin-top: 4px; }
.qd-complexity.high { background: rgba(255,80,80,0.2); color: #ff5050; }
.qd-complexity.medium { background: rgba(255,200,50,0.2); color: #ffc832; }

/* Selected disease bar */
.qd-selected-disease { background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.2); border-radius: 6px; padding: 8px 12px; font-size: 0.8em; }
.qd-selected-disease strong { color: var(--accent); }

/* Molecule list */
.qd-molecule-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.qd-mol-card { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 8px 10px; cursor: pointer; transition: all 0.2s; }
.qd-mol-card:hover { border-color: var(--accent); background: rgba(0,212,255,0.05); }
.qd-mol-card.selected { border-color: var(--accent-green); background: rgba(0,255,170,0.08); }
.qd-mol-info h4 { margin: 0; font-size: 0.82em; color: #fff; }
.qd-mol-info small { color: var(--text-dim); font-size: 0.7em; }
.qd-mol-badge { font-size: 0.65em; padding: 2px 8px; border-radius: 10px; }
.qd-mol-badge.approved { background: rgba(0,255,170,0.15); color: var(--accent-green); }
.qd-mol-badge.novel { background: rgba(168,85,247,0.15); color: #a855f7; }
.qd-mol-badge.other { background: rgba(255,255,255,0.08); color: var(--text-dim); }

/* Screening result */
.qd-screening-result { background: rgba(0,0,0,0.3); border: 1px solid rgba(0,212,255,0.15); border-radius: 8px; padding: 12px; }
.qd-score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.qd-score-item { text-align: center; }
.qd-score-item .qd-score-val { font-size: 1.4em; font-weight: 700; }
.qd-score-item .qd-score-label { font-size: 0.65em; color: var(--text-dim); }
.qd-score-overall { text-align: center; margin: 8px 0; }
.qd-score-overall .qd-big-score { font-size: 2.2em; font-weight: 700; }
.qd-recommendation { font-size: 0.78em; color: var(--text-dim); margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }

/* Quantum controls & result */
.qd-quantum-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.qd-run-btn { font-size: 0.78em !important; padding: 6px 12px !important; }
.qd-quantum-result { flex: 1; overflow-y: auto; background: rgba(0,0,0,0.2); border: 1px solid rgba(0,212,255,0.1); border-radius: 6px; padding: 10px; font-size: 0.78em; }
.qd-placeholder { text-align: center; color: var(--text-dim); padding: 30px; }
.qd-qec-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.qd-stat { background: rgba(255,255,255,0.04); border-radius: 4px; padding: 6px 8px; }
.qd-stat-label { font-size: 0.7em; color: var(--text-dim); }
.qd-stat-value { font-size: 1.1em; font-weight: 600; color: var(--accent); }
.qd-interpretation { margin-top: 8px; padding: 8px; background: rgba(0,212,255,0.05); border-radius: 4px; font-size: 0.78em; color: var(--text-dim); line-height: 1.4; }

/* Report */
.qd-report-content { flex: 1; overflow-y: auto; background: rgba(0,0,0,0.2); border: 1px solid rgba(0,212,255,0.1); border-radius: 6px; padding: 14px; font-size: 0.8em; line-height: 1.5; }
.qd-report-content h2, .qd-report-content h3 { color: var(--accent); margin: 10px 0 4px; }
.qd-report-content strong { color: #fff; }
.qd-report-section { margin: 10px 0; padding: 10px; background: rgba(255,255,255,0.03); border-radius: 6px; }

/* Nav buttons */
.qd-nav { display: flex; justify-content: space-between; padding-top: 6px; }

/* Score colors */
.score-high { color: var(--accent-green); }
.score-med { color: #ffc832; }
.score-low { color: #ff5050; }
.score-na { color: var(--text-dim); font-style: italic; }
.qd-score-note { font-size: 0.6em; color: var(--text-dim); margin-top: 2px; line-height: 1.2; }

/* Loading spinner */
.qd-loading { text-align: center; padding: 20px; color: var(--accent); }
.qd-loading::after { content: ''; display: inline-block; width: 16px; height: 16px; border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Real Quantum labels */
.real-quantum-badge { display: inline-block; font-size: 0.6em; padding: 2px 8px; border-radius: 10px; background: rgba(168,85,247,0.2); color: #a855f7; border: 1px solid rgba(168,85,247,0.3); animation: pulse-badge 2s ease-in-out infinite; margin-left: 6px; vertical-align: middle; }
@keyframes pulse-badge { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; box-shadow: 0 0 8px rgba(168,85,247,0.4); } }
