/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --kith-bg:          #0f0f0f;
  --kith-surface:     #1a1a1a;
  --kith-surface-2:   #2a2a2a;
  --kith-border:      #333333;
  --kith-text:        #f0f0f0;
  --kith-text-muted:  #888888;
  --kith-text-dim:    #555555;
  --kith-green:       #1db954;
  --kith-red:         #e03131;
  --kith-blue:        #4a9eff;

  --circle-1: #4A90D9;
  --circle-2: #7B68EE;
  --circle-3: #50C878;
  --circle-4: #FF8C42;
  --circle-5: #FF6B9D;
  --circle-6: #00CED1;
  --circle-7: #FFD700;
  --circle-8: #FF4444;

  --text-xs:   0.7rem;
  --text-sm:   0.8rem;
  --text-base: 0.95rem;
  --text-lg:   1.1rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 50%;
}

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

html, body {
  height: 100%;
  background: var(--kith-bg);
  color: var(--kith-text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ─── App container ──────────────────────────────────────────────────────── */
#app {
  min-height: 100vh;
  padding-bottom: 140px; /* clear nav bar + mic button */
}

/* ─── Page max-width (desktop centering) ────────────────────────────────── */
.page-content {
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Section label ─────────────────────────────────────────────────────── */
.section-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--kith-text-dim);
  margin-bottom: var(--space-sm);
}

/* ─── Sticky page header ─────────────────────────────────────────────────── */
.page-header {
  background: var(--kith-bg);
  padding: 16px 20px 12px;
  max-width: 100%;
}

.kith-wordmark {
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  color: var(--kith-text);
  font-weight: 700;
  margin-bottom: 10px;
}

.search-bar {
  width: 100%;
  height: 40px;
  background: var(--kith-surface);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-lg);
  padding: 0 16px;
  font-size: 0.9rem;
  color: var(--kith-text);
  outline: none;
  transition: border-color 0.2s;
}

.search-bar::placeholder { color: var(--kith-text-dim); }
.search-bar:focus { border-color: var(--kith-text-muted); }

/* ─── Login screen ───────────────────────────────────────────────────────── */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  gap: var(--space-lg);
  text-align: center;
}

.login-screen .kith-wordmark {
  font-size: var(--text-2xl);
  margin-bottom: 0;
}

.kith-tagline {
  color: var(--kith-text-muted);
  font-size: var(--text-base);
}

.login-desc {
  color: var(--kith-text-dim);
  font-size: var(--text-sm);
  max-width: 300px;
  line-height: 1.6;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #222;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}

.login-btn:hover { opacity: 0.9; }

/* ─── Loading / error / empty states ────────────────────────────────────── */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--kith-text-muted);
  font-size: var(--text-sm);
}

.error-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--kith-red);
  font-size: var(--text-sm);
  text-align: center;
}

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--kith-text-dim);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.empty-state a {
  color: var(--kith-green);
  text-decoration: none;
}

/* ─── Toast notification ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--kith-surface);
  border: 1px solid var(--kith-border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: var(--text-sm);
  color: var(--kith-text);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: 320px;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Pill buttons (filters) ─────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: var(--space-sm);
  padding: 0 20px 12px;
  flex-wrap: wrap;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--kith-border);
  color: var(--kith-text-muted);
  border-radius: var(--radius-lg);
  padding: 5px 14px;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill.active {
  background: var(--kith-green);
  border-color: var(--kith-green);
  color: #000;
  font-weight: 600;
}

.filter-pill:hover:not(.active) {
  border-color: var(--kith-text-muted);
  color: var(--kith-text);
}
