:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --accent: #34d399;
  --danger: #f87171;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #3b82f6;
  --accent: #10b981;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  transition: background 0.3s ease, color 0.3s ease;
}

.theme-selector-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
}

.theme-selector {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

[data-theme="light"] .theme-selector {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-selector:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-selector:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}

.chat {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px;
  overflow-y: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .chat {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  line-height: 1.4;
  white-space: pre-wrap;
}

.bubble strong {
  font-weight: 600;
}

.bubble em {
  font-style: italic;
}

.bot {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .bot {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.user {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  margin-left: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .user {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.input-form {
  display: flex;
  gap: 8px;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  outline: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] .input {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.input::placeholder {
  color: var(--muted);
}

.json-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

.quick-actions {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.quick-action-btn {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  outline: none;
}

[data-theme="light"] .quick-action-btn {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.quick-action-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-1px);
}

[data-theme="light"] .quick-action-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.quick-action-btn:active {
  background: rgba(96, 165, 250, 0.12);
  transform: translateY(0);
}

[data-theme="light"] .quick-action-btn:active {
  background: rgba(59, 130, 246, 0.08);
}

.quick-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}



