/* Dark is the default theme, applied both when no data-theme attribute is
   present and when it is set to "dark". */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --open: #22c55e;
  --closed: #64748b;
  --border: #334155;
  --shadow-card: rgba(0, 0, 0, 0.4);
  --shadow-float: rgba(0, 0, 0, 0.5);
  --tooltip-bg: #0b1220;
  --backdrop: rgba(15, 23, 42, 0.7);
  --forced: rgba(245, 158, 11, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --open: #16a34a;
  --closed: #64748b;
  --border: #cbd5e1;
  --shadow-card: rgba(15, 23, 42, 0.06);
  --shadow-float: rgba(15, 23, 42, 0.18);
  --tooltip-bg: #ffffff;
  --backdrop: rgba(15, 23, 42, 0.45);
  --forced: #d97706;
}

[data-theme="amoled"] {
  color-scheme: dark;
  --bg: #000000;
  --card-bgbak: #090d12ff;
  --card-bg: #000000;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #073c92ff;
  --open: #22c55e;
  --closed: #64748b;
  --border: #334155;
  --shadow-card: rgba(0, 0, 0, 0.4);
  --shadow-float: rgba(0, 0, 0, 0.5);
  --tooltip-bg: #0b1220;
  --backdrop: rgba(0, 0, 0, 0.4);
  --forced: rgba(245, 158, 11, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.container {
  width: 100%;
  max-width: 480px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px var(--shadow-card);
}

.setting-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow-float);
  animation: toast-in 0.2s ease;
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--open);
}

.toast--error::before {
  background: #ef4444;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

.toast--hide {
  animation: toast-out 0.2s ease forwards;
}
