/* ==========================================================================
   AI Playground — Dark Neon Theme (matches WaveParticle)
   ========================================================================== */

:root {
  --cyan: #00e5cc;
  --cyan-dim: rgba(0, 229, 204, 0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --deep-bg: #0a0a0f;
  --mid-bg: #111118;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e2e2e8;
  --text-dim: #8b8b99;
  --danger: #ef4444;
  --success: #22c55e;
  --warn: #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--deep-bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-gradient {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-white { color: #fff; }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-brand { display: flex; align-items: baseline; gap: 0.5rem; }
.nav-sub { font-size: 0.7rem; color: var(--text-dim); }
.nav-actions { display: flex; align-items: center; gap: 0.25rem; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.625rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s;
}
.nav-btn:hover {
  color: var(--cyan);
  background: var(--surface);
  border-color: var(--border);
}
.nav-btn-label { font-weight: 500; }

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.25rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: linear-gradient(135deg, var(--cyan), #00b8a3);
  color: var(--deep-bg);
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 229, 204, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon:hover { color: var(--cyan); border-color: var(--cyan); }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }

.kbd-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
  padding: 0.15rem 0.4rem;
  margin-left: 0.25rem;
  color: inherit;
  opacity: 0.7;
}

/* ==========================================================================
   Main layout
   ========================================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  height: calc(100vh - 53px);
}

/* ==========================================================================
   Prompt section (left)
   ========================================================================== */

.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.prompt-group {
  display: flex;
  flex-direction: column;
}

/* Collapsible */
.collapsible-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 100%;
  text-align: left;
}
.collapsible-toggle .label { margin-bottom: 0; cursor: pointer; }
.collapsible-toggle:hover .label { color: var(--text); }

.collapse-arrow {
  transition: transform 0.2s;
  color: var(--text-dim);
  flex-shrink: 0;
}
.collapsible.open .collapse-arrow {
  transform: rotate(90deg);
}

.collapsible-content {
  padding-top: 0.375rem;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}
.label-row .label { margin-bottom: 0; }

/* History dropdown */
.history-dropdown { position: relative; }

.history-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.history-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  width: 340px;
  max-height: 400px;
  background: var(--mid-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-top: 0.25rem;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.history-list {
  max-height: 340px;
  overflow-y: auto;
}

.history-empty {
  padding: 1.5rem;
  text-align: center;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.history-item:hover { background: var(--surface-hover); }
.history-item:last-child { border-bottom: none; }

.history-item-content {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.history-preview {
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-time {
  margin-top: 0.15rem;
}

.history-delete {
  flex-shrink: 0;
  width: 24px !important;
  height: 24px !important;
  opacity: 0.4;
}
.history-delete:hover { opacity: 1; }

.label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 0.375rem;
}
.label-hint { font-weight: 400; opacity: 0.6; }

.textarea, .input-field {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
}
.textarea:focus, .input-field:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 204, 0.1);
}
.textarea-sm { min-height: 70px; }
.textarea-lg { min-height: 120px; resize: none; overflow-y: auto; }

.params-row {
  display: flex;
  gap: 1rem;
}
.param { flex: 1; }
.param-control { display: flex; align-items: center; gap: 0.5rem; }
.param-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  min-width: 2rem;
  text-align: center;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 229, 204, 0.4);
}
.slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  border: none;
}

.input-sm {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  width: 100%;
}
.input-sm:focus { outline: none; border-color: var(--cyan); }

/* Templates */
.templates-bar {
  display: flex;
  gap: 0.5rem;
}

.select-template {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}
.select-template:focus { outline: none; border-color: var(--cyan); }
.select-template option, .select-template optgroup {
  background: var(--mid-bg);
  color: var(--text);
}

.char-count {
  text-align: right;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.25rem;
  opacity: 0.7;
}

.quick-actions {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Response panels (right)
   ========================================================================== */

.panels-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem;
  overflow-y: auto;
  align-content: flex-start;
}

.response-panel {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 300px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.panel-header {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.panel-header .btn-icon.btn-sm {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.panel-header .btn-icon.btn-sm:hover { opacity: 1; }
.panel-header .panel-retry:hover { color: var(--cyan); border-color: var(--cyan); }
.panel-header .panel-remove:hover { color: var(--danger); border-color: var(--danger); }

.select-provider, .select-model {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}
.select-provider:focus, .select-model:focus {
  outline: none;
  border-color: var(--cyan);
}
.select-provider option, .select-model option {
  background: var(--mid-bg);
  color: var(--text);
}

.panel-status {
  font-size: 0.75rem;
  padding: 0 0.25rem;
  min-height: 1.2em;
}
.status-ok { color: var(--success); }
.status-error { color: var(--danger); }
.status-warn { color: var(--warn); }
.status-timing {
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
}

/* Time comparison bar */
.time-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.time-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.time-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--purple);
  transition: width 0.6s ease;
}

.time-bar-fastest {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 229, 204, 0.4);
}

.time-bar-error {
  background: var(--danger);
}

.time-bar-badge {
  font-size: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 229, 204, 0.2);
  white-space: nowrap;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  min-height: 100px;
  max-height: calc(100vh - 260px);
  padding: 0.5rem 0;
}

.panel-placeholder {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 1rem;
}

.response-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
  word-wrap: break-word;
}
.response-text pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.response-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.inline-code {
  background: rgba(0, 229, 204, 0.1);
  border: 1px solid rgba(0, 229, 204, 0.2);
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
  color: var(--cyan);
}
.response-text strong { color: #fff; }

.error-text {
  color: var(--danger);
  font-size: 0.85rem;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.375rem;
  word-wrap: break-word;
}

/* Pinned response */
.pinned-response {
  border: 1px solid rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.06);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.pinned-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  background: rgba(168, 85, 247, 0.08);
}

.pinned-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--purple);
  flex: 1;
}

.pinned-body {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
  max-height: 150px;
  overflow-y: auto;
  color: var(--text-dim);
}

.footer-actions {
  display: flex;
  gap: 0.375rem;
}

.btn-active {
  color: var(--purple) !important;
  border-color: var(--purple) !important;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.token-info {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Loading
   ========================================================================== */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Settings modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal {
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-lg { max-width: 550px; }
.modal-xl { max-width: 900px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-row .label { margin-bottom: 0.25rem; }

.key-input-row {
  display: flex;
  gap: 0.5rem;
}
.key-input { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }

.settings-extra {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.modal-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* Diff view */
.diff-selectors {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.diff-select-group { flex: 1; }
.diff-select-group .label { margin-bottom: 0.25rem; }
.diff-select-group select { width: 100%; }
.diff-vs {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  padding-bottom: 0.4rem;
}

.diff-output {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 50vh;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.7;
}

.diff-labels {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.diff-label {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 0.25rem;
}
.diff-label-a {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.diff-label-b {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.diff-content { word-wrap: break-word; }

.diff-same { color: var(--text); }
.diff-add {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-radius: 2px;
  padding: 0 2px;
}
.diff-remove {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  text-decoration: line-through;
  border-radius: 2px;
  padding: 0 2px;
}

.diff-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}
.diff-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.diff-sample {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.diff-add-sample { background: rgba(34, 197, 94, 0.3); }
.diff-remove-sample { background: rgba(239, 68, 68, 0.3); }
.diff-same-sample { background: rgba(255, 255, 255, 0.15); }

/* ==========================================================================
   Toast notifications
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--mid-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Welcome overlay
   ========================================================================== */

.welcome-modal {
  max-width: 420px;
  text-align: center;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.welcome-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.625rem 0.75rem;
  background: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-step-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan-dim);
  color: var(--cyan);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ==========================================================================
   Preset dropdown
   ========================================================================== */

.preset-dropdown { position: relative; }

.preset-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  width: 260px;
  background: var(--mid-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-top: 0.375rem;
}

.preset-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.preset-item:hover { background: var(--surface-hover); }
.preset-item:last-child { border-bottom: none; }

/* ==========================================================================
   Light theme
   ========================================================================== */

body.light {
  --cyan: #0891b2;
  --cyan-dim: rgba(8, 145, 178, 0.12);
  --purple: #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.1);
  --deep-bg: #f8f9fb;
  --mid-bg: #ffffff;
  --surface: rgba(0, 0, 0, 0.03);
  --surface-hover: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.12);
  --text: #1a1a2e;
  --text-dim: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #d97706;
}

body.light .nav {
  background: rgba(255, 255, 255, 0.95);
}

body.light .glass-panel {
  background: rgba(255, 255, 255, 0.7);
}

body.light .textarea,
body.light .input-field,
body.light .input-sm,
body.light .select-provider,
body.light .select-model,
body.light .select-template,
body.light .chat-input {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

body.light .select-provider option,
body.light .select-model option,
body.light .select-template option,
body.light .select-template optgroup {
  background: #fff;
  color: var(--text);
}

body.light .response-text pre {
  background: rgba(0, 0, 0, 0.04);
}

body.light .inline-code {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
}

body.light .response-text strong { color: #111; }

body.light .btn-primary {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff;
}

body.light .kbd-hint {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

body.light .history-menu,
body.light .preset-menu {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body.light .modal {
  background: #fff;
}

body.light .toast {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body.light .diff-output {
  background: rgba(0, 0, 0, 0.03);
}

body.light .pinned-response {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.04);
}

body.light .pinned-header {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.1);
}

body.light .error-text {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.15);
}

body.light .welcome-step {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .prompt-section {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 50vh;
  }
  .panels-section {
    flex-direction: column;
  }
  .response-panel {
    flex: 1 1 100%;
    min-width: unset;
    max-height: 60vh;
  }
  .nav-btn-label { display: none; }
  .nav-btn { padding: 0.35rem; }
  .history-menu { width: 280px; right: -2rem; }
  .preset-menu { right: auto; left: 0; width: 220px; }
  .diff-selectors { flex-wrap: wrap; }
  .params-row { flex-direction: column; gap: 0.5rem; }
}
