/* ============================================================
   QuizDaily — main.css
   Design tokens + reset + shared components
   ============================================================ */

:root {
  /* Brand */
  --brand:       #6C63FF;
  --brand-dark:  #4F46E5;
  --brand-light: #EEF2FF;

  /* Neutrals */
  --bg:          #0F0E17;
  --bg-card:     #1A1828;
  --bg-input:    #221F36;
  --border:      #2E2B45;
  --text-1:      #F4F0FF;
  --text-2:      #A09BC0;
  --text-3:      #6B667F;

  /* Semantic */
  --green:       #22C55E;
  --red:         #EF4444;
  --yellow:      #FACC15;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;

  /* Font */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Transition */
  --t: 0.18s ease;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Typography ---- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--r-md);
  padding: 12px 24px;
  cursor: pointer;
  transition: background var(--t), transform var(--t), opacity var(--t);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-1); }

.btn-google {
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  width: 100%;
}
.btn-google:hover { background: #f1f1f1; }

.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--r-lg); }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  transition: color var(--t), background var(--t);
}
.btn-icon:hover { color: var(--text-1); background: var(--bg-card); }

/* ---- Input ---- */
.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--t);
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--text-3); }

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-1);
}
.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Topic pill ---- */
.topic-pill, .q-topic-pill {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
