/* QAI Playground styles */
* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232838; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #313850; background-clip: padding-box; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; color: #94a3b8;
  cursor: pointer; transition: background .15s, color .15s; user-select: none;
}
.nav-item:hover { background: #161a26; color: #e2e8f0; }
.nav-item.active { background: #6366f1; color: #fff; }
.nav-item.active .nav-icon { color:#fff; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color:#4b5568; padding: 14px 10px 5px; font-weight: 700; }

.view { padding: 24px; max-width: 1100px; margin: 0 auto; }

.card { background:#11141d; border:1px solid #232838; border-radius:16px; }
.field-label { font-size:12px; font-weight:600; color:#94a3b8; margin-bottom:6px; display:block; }
.inp {
  width:100%; background:#0a0c12; border:1px solid #232838; border-radius:10px;
  padding:10px 12px; color:#e2e8f0; font-size:14px; outline:none; transition:border .15s;
}
.inp:focus { border-color:#6366f1; }
textarea.inp { resize:vertical; min-height:90px; font-family:inherit; }
select.inp { cursor:pointer; }

.btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:#6366f1; color:#fff; font-weight:600; font-size:14px;
  padding:10px 18px; border-radius:10px; cursor:pointer; transition:background .15s; border:none;
}
.btn-primary:hover { background:#5457e5; }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; }
.btn-ghost {
  display:inline-flex; align-items:center; gap:7px; background:#161a26; border:1px solid #232838;
  color:#cbd5e1; font-size:13px; padding:8px 14px; border-radius:9px; cursor:pointer; transition:.15s;
}
.btn-ghost:hover { border-color:#3a4260; background:#1c2130; color:#fff; }

.chip {
  font-size:12px; padding:5px 11px; border-radius:999px; border:1px solid #232838;
  background:#0a0c12; color:#94a3b8; cursor:pointer; transition:.15s; white-space:nowrap;
}
.chip:hover { border-color:#6366f1; color:#c7d2fe; }
.chip.active { background:#6366f1; border-color:#6366f1; color:#fff; }

.output {
  background:#0a0c12; border:1px solid #232838; border-radius:12px; padding:16px;
  font-size:14px; line-height:1.6; white-space:pre-wrap; word-break:break-word;
  min-height:60px; color:#e2e8f0;
}
.output code, .mono { font-family:'JetBrains Mono', monospace; }

.spinner { width:16px; height:16px; border:2px solid rgba(255,255,255,.25); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dot-pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }

.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity:0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.term {
  background:#05070c; border:1px solid #232838; border-radius:12px; padding:14px;
  font-family:'JetBrains Mono', monospace; font-size:13px; line-height:1.55; color:#8fefc0;
  min-height:120px; max-height:340px; overflow-y:auto; white-space:pre-wrap;
}
.badge { font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; }
.badge-green { background:rgba(34,197,94,.12); color:#4ade80; }
.badge-red { background:rgba(239,68,68,.12); color:#f87171; }
.badge-amber { background:rgba(245,158,11,.12); color:#fbbf24; }
.badge-blue { background:rgba(34,211,238,.12); color:#22d3ee; }

.toast-item { display:flex; align-items:center; gap:10px; background:#161a26; border:1px solid #232838; color:#e2e8f0; padding:12px 16px; border-radius:12px; font-size:14px; min-width:240px; }

.mic-btn-sm {
  display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px;
  border-radius:10px; background:#161a26; border:1px solid #232838; color:#94a3b8; cursor:pointer; transition:.15s; flex-shrink:0;
}
.mic-btn-sm:hover { color:#fff; border-color:#3a4260; }
.mic-active { background:#ef4444 !important; border-color:#ef4444 !important; color:#fff !important; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%,100%{ box-shadow:0 0 0 0 rgba(239,68,68,.5);} 50%{ box-shadow:0 0 0 6px rgba(239,68,68,0);} }

.mini-btn {
  display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px;
  border-radius:8px; background:#161a26; border:1px solid #232838; color:#94a3b8; cursor:pointer; transition:.15s;
}
.mini-btn:hover { color:#fff; border-color:#3a4260; background:#1c2130; }

.model-search { position:relative; }
.model-list { max-height:230px; overflow-y:auto; }
.model-opt { padding:8px 12px; font-size:13px; cursor:pointer; border-radius:8px; display:flex; justify-content:space-between; gap:10px; }
.model-opt:hover { background:#161a26; }
.model-opt.sel { background:#6366f1; color:#fff; }

.grid-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }

@media (max-width: 1024px) {
  #sidebar { position:fixed; inset:0 auto 0 0; z-index:40; transform:translateX(-100%); transition:transform .25s; }
  #sidebar.open { transform:none; }
}
