/* Theme CSS variables driven by data-theme */
:root {
  --bg: #f7f7f7;
  --fg: #1a1a1a;
  --surface: #ffffff;
  --text: var(--fg);
  --muted: #6b7280;
  --primary: #10b981; /* emerald-ish */
  --shadow: 0 2px 8px rgba(0,0,0,.05);
  --radius: 12px;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --fg: #e6e6e6;
  --surface: #14182a;
  --text: var(--fg);
  --muted: #94a3b8;
  --primary: #38bdf8;
  --shadow: 0 8px 20px rgba(0,0,0,.5);
}

[data-theme="light"] {
  --bg: #f7f7f7;
  --fg: #1a1a1a;
  --surface: #ffffff;
  --text: var(--fg);
  --muted: #6b7280;
  --primary: #10b981;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

.card {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1rem;
}

/* 3-state theme switch UI */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--muted);
  background: var(--surface);
}
.theme-switch button, .theme-switch .icon {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
}
.theme-switch .icon { font-size: 1.1rem; }
.theme-switch .active {
  background: var(--primary);
  color: #fff;
}
.theme-switch .theme-os {
  min-width: 46px;
  text-align: center;
}
.theme-switch .sunIcon { line-height: 1; }
.theme-switch .moonIcon { line-height: 1; }

#themeBadge {
  margin-left: 8px;
  font-weight: bold;
}
