/* ── Design tokens & reset ── */
:root {
  --bg:             #0d0d14;
  --panel-bg:       #13131f;
  --card-bg:        #1c1c2e;
  --border:         #242436;
  --text:           #e2e2f0;
  --text-muted:     #6e6e96;
  --accent:         #c084fc;
  --accent-hover:   #d8b4fe;
  --accent-dark:    #0d0d14;

  --tier-s: #ef4444;
  --tier-a: #f97316;
  --tier-b: #eab308;
  --tier-c: #22c55e;
  --tier-u: #4b5563;

  --card-w: 108px;
  --card-h: 162px;
  --radius: 10px;
  --radius-sm: 7px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.4;
}

/* ── Header ── */
.site-header {
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

#settings-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
#settings-btn:hover { color: var(--text); }

/* ── API Banner ── */
.api-banner {
  background: #1a1208;
  border-bottom: 1px solid #4a3210;
  color: #d4a444;
  font-size: 0.95rem;
  padding: 0.55rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.api-banner.hidden { display: none; }

.api-banner button {
  background: #d4a444;
  color: #1a1208;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn-danger {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-danger:hover { background: #ef4444; color: #fff; }

/* ── Theme Toggle Button ── */
#theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s, text-shadow 0.2s;
}
#theme-toggle:hover { color: var(--text); }
