:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0f1f3a;
  --bg-tertiary: #162a4a;
  --bg-input: #122240;
  --bg-hover: #1e3355;
  --text-primary: #e4e4ef;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #1e3355;
  --error: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --font-size-base: 13px;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-input: #f1f3f5;
  --bg-hover: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --accent: #1d4ed8;
  --accent-hover: #2563eb;
  --border: #dee2e6;
  --font-size-base: 13px;
}

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

body {
  width: 380px;
  height: 500px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo { width: 24px; height: 24px; border-radius: 4px; }

.title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.text-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.text-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.model-bar {
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.select-sm {
  flex: 1;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  outline: none;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.primary-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.primary-btn:hover { background: var(--accent-hover); }

.input-area {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.input-wrapper {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
}

.input-wrapper:focus-within { border-color: var(--accent); }

#user-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

#user-input::placeholder { color: var(--text-muted); }

.send-btn {
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover { background: var(--accent-hover); }
