/* APAI Web — base styles (no inline styles in HTML) */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1a1d26;
  --muted: #5c6370;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --border: #e2e8f0;
  --stream-bg: #f8fafc;
  --stream-text: #1a1d26;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --danger: #f87171;
  --border: #334155;
  --stream-bg: #1e293b;
  --stream-text: #f1f5f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-header h1 {
  margin: 0;
  font-size: 1.25rem;
}

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 6%);
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.error-banner {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.error-banner[hidden] {
  display: none;
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.hidden {
  display: none !important;
}
