/* ============================================================
   ITARA — Design System
   Inspired by WhichAI: light grey canvas, generous whitespace,
   vertical module cards, single bold accent word
   ============================================================ */

/* === TOKENS === */
:root {
  --bg:          #F0F0F4;
  --surface:     #FFFFFF;
  --surface-2:   #F7F7FA;
  --border:      rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);
  --text:        #0D0D14;
  --text-muted:  #6B6B7A;
  --text-faint:  #ADADBB;
  --accent:      #4F46E5;
  --accent-dark: #3730A3;
  --accent-glow: rgba(79,70,229,0.15);

  /* Module accent colors */
  --cyan:    #06B6D4;
  --cyan-bg: rgba(6,182,212,0.08);
  --violet:  #7C3AED;
  --violet-bg: rgba(124,58,237,0.08);
  --emerald: #059669;
  --emerald-bg: rgba(5,150,105,0.08);
  --amber:   #D97706;
  --amber-bg: rgba(217,119,6,0.08);

  --font-display: 'Cabinet Grotesk', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm:  0.375rem;
  --radius-md:  0.625rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t:    200ms;
}

[data-theme="dark"] {
  --bg:          #080810;
  --surface:     #0F0F1A;
  --surface-2:   #14141F;
  --border:      rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --text:        #F0F0F8;
  --text-muted:  #8888A0;
  --text-faint:  #50506A;
  --accent:      #00D4FF;
  --accent-dark: #00AACF;
  --accent-glow: rgba(0,212,255,0.15);
  --cyan:    #00D4FF;
  --cyan-bg: rgba(0,212,255,0.08);
  --violet:  #A78BFA;
  --violet-bg: rgba(167,139,250,0.08);
  --emerald: #34D399;
  --emerald-bg: rgba(52,211,153,0.08);
  --amber:   #FBB040;
  --amber-bg: rgba(251,176,64,0.08);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

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

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === TICKER BAR === */
.ticker-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 36px;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  border-right: 1px solid var(--border);
  height: 100%;
  flex-shrink: 0;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  gap: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-wrap:hover .ticker-inner { animation-play-state: paused; }

.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}

.tick-tag {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
}

.tick-tag.gpu     { background: rgba(6,182,212,0.1);   color: var(--cyan);    border: 1px solid rgba(6,182,212,0.2); }
.tick-tag.market  { background: rgba(124,58,237,0.1);  color: var(--violet);  border: 1px solid rgba(124,58,237,0.2); }
.tick-tag.talent  { background: rgba(5,150,105,0.1);   color: var(--emerald); border: 1px solid rgba(5,150,105,0.2); }
.tick-tag.launch  { background: rgba(217,119,6,0.1);   color: var(--amber);   border: 1px solid rgba(217,119,6,0.2); }

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(240, 240, 244, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t) var(--ease);
}

[data-theme="dark"] .nav {
  background: rgba(8, 8, 16, 0.85);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-beta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .nav-beta {
  border-color: rgba(0,212,255,0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.nav-icon-btn:hover {
  color: var(--text);
  background: var(--border);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 24px var(--accent-glow);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}

.btn-full {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* === HERO === */
.hero {
  min-height: calc(100dvh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 3rem;
}

.hero-inner {
  max-width: 800px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-line-main {
  display: block;
  color: var(--text);
}

.hero-line-accent {
  display: block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 60%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero-line-accent {
  background: linear-gradient(135deg, #00D4FF 0%, #A78BFA 60%, #F472B6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
}

/* === SEARCH BAR === */
.search-wrap {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md);
}

.search-icon {
  color: var(--text-faint);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.4rem 0;
}

.search-input::placeholder { color: var(--text-faint); }

.search-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}

.search-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.02);
}

[data-theme="dark"] .search-btn { color: #000; }

.search-hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.search-hint span {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  transition: opacity var(--t);
}

.search-hint span:hover { opacity: 0.75; }

/* === MODULE CARDS === */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 900px;
  margin-top: 1rem;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  justify-content: flex-start;
}

.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  border-radius: inherit;
  transition: opacity var(--t) var(--ease);
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Per-card accent colors */
.module-card[data-color="cyan"]:hover      { border-color: var(--cyan);    box-shadow: 0 16px 48px rgba(6,182,212,0.12); }
.module-card[data-color="violet"]:hover    { border-color: var(--violet);  box-shadow: 0 16px 48px rgba(124,58,237,0.12); }
.module-card[data-color="emerald"]:hover   { border-color: var(--emerald); box-shadow: 0 16px 48px rgba(5,150,105,0.12); }
.module-card[data-color="amber"]:hover     { border-color: var(--amber);   box-shadow: 0 16px 48px rgba(217,119,6,0.12); }

.module-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t) var(--ease);
}

.module-card[data-color="cyan"]    .module-icon { background: var(--cyan-bg);    color: var(--cyan); }
.module-card[data-color="violet"]  .module-icon { background: var(--violet-bg);  color: var(--violet); }
.module-card[data-color="emerald"] .module-icon { background: var(--emerald-bg); color: var(--emerald); }
.module-card[data-color="amber"]   .module-icon { background: var(--amber-bg);   color: var(--amber); }

.module-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.module-card[data-color="cyan"]    .module-label { color: var(--cyan); }
.module-card[data-color="violet"]  .module-label { color: var(--violet); }
.module-card[data-color="emerald"] .module-label { color: var(--emerald); }
.module-card[data-color="amber"]   .module-label { color: var(--amber); }

.module-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.module-arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  transition: background var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
  margin-top: auto;
}

.module-card:hover .module-arrow {
  transform: translateX(3px);
}

.module-card[data-color="cyan"]:hover    .module-arrow { background: var(--cyan-bg);    color: var(--cyan); }
.module-card[data-color="violet"]:hover  .module-arrow { background: var(--violet-bg);  color: var(--violet); }
.module-card[data-color="emerald"]:hover .module-arrow { background: var(--emerald-bg); color: var(--emerald); }
.module-card[data-color="amber"]:hover   .module-arrow { background: var(--amber-bg);   color: var(--amber); }

/* === NEXUS ROOT LABEL === */
.nexus-root {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.5rem;
}

/* === STATS STRIP === */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem 1.5rem;
}

.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   MODAL SYSTEM
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fade-in 0.2s var(--ease) forwards;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 16, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Waitlist modal box */
.modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(79,70,229,0.05);
  animation: slide-up 0.3s var(--ease) forwards;
}

.modal-box::-webkit-scrollbar { display: none; }

.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.modal-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  transition: color var(--t), background var(--t);
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-field {
  margin-bottom: 1rem;
}

.modal-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.label-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
  margin-left: 4px;
}

.modal-field input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.modal-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Interest chips */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.modal-privacy {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.75rem;
}

/* Success state */
.modal-success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  gap: 0.75rem;
}

.success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(5,150,105,0.1);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.modal-success-wrap h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.modal-success-wrap p { color: var(--text-muted); font-size: 0.9rem; }

.already-access {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.5rem;
}

.link-btn {
  color: var(--accent);
  font-weight: 600;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ============================================================
   UNIFIED AUTH SYSTEM (Sign In + Sign Up)
   ============================================================ */

/* Backdrop */
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 16, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Auth card — shared container */
.auth-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.3s var(--ease) forwards;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.auth-card::-webkit-scrollbar { display: none; }

/* Wider card for sign-up (interests grid needs more space) */
.auth-card-signup {
  max-width: 460px;
}

/* Logo */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Heading / sub */
.auth-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Google OAuth button */
.btn-oauth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  margin-bottom: 0.5rem;
}

.btn-oauth:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Fields */
.auth-field {
  text-align: left;
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-faint);
  pointer-events: none;
  flex-shrink: 0;
}

.auth-input-wrap input,
.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="password"] {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.auth-input-wrap input:focus,
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Date input (no left icon) */
.auth-date-input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  font-family: var(--font-body);
}
.auth-date-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Password wrap */
.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-pw-wrap input {
  padding-right: 3rem !important;
}

.pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  line-height: 0;
  padding: 0.25rem;
  transition: color var(--t);
}
.pw-toggle:hover { color: var(--text); }

/* Error box */
.auth-error {
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.2);
  color: #dc2626;
  font-size: 0.85rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  text-align: left;
  line-height: 1.4;
}
[data-theme="dark"] .auth-error { color: #f87171; }

/* Hint text */
.auth-hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* Submit button */
.auth-submit {
  margin-top: 0.5rem;
}

/* Switch line */
.auth-switch {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- SIGN UP SPECIFIC ---- */

/* Progress dots */
.signup-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.75rem;
}

.prog-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--border-strong);
  transition: background var(--t) var(--ease), width var(--t) var(--ease);
}

.prog-dot.active {
  background: var(--accent);
  width: 24px;
}

/* Step visibility */
.signup-step { display: none; }
.signup-step.active { display: block; }

/* Avatar */
.su-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.su-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  overflow: hidden;
}

.su-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.su-avatar-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--surface);
  transition: background var(--t);
}
.su-avatar-btn:hover { background: var(--accent-dark); }

/* Username input with @ prefix */
.su-username-wrap {
  position: relative;
}

.auth-at-prefix {
  position: absolute;
  left: 0.875rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.su-username-wrap input {
  padding-left: 2rem !important;
  padding-right: 3rem !important;
}

.su-reroll-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  padding: 0.25rem;
  transition: color var(--t);
}
.su-reroll-btn:hover { color: var(--accent); }

/* Google note */
.su-google-note {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.875rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 1rem;
}

/* Step icon */
.su-step-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

/* Gender grid */
.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.gender-btn {
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.gender-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.gender-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 600;
}

/* Interests grid */
.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  padding-right: 2px;
}

.interests-grid::-webkit-scrollbar { width: 4px; }
.interests-grid::-webkit-scrollbar-track { background: transparent; }
.interests-grid::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9999px; }

.interest-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition: all var(--t) var(--ease);
}

.interest-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.interest-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.interest-emoji {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.interest-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.interest-tags {
  font-size: 0.7rem;
  color: var(--text-faint);
  line-height: 1.3;
}

.interests-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* Notifications toggle row */
.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.notif-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.notif-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.notif-desc {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 1px;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 9999px;
  cursor: pointer;
  transition: background var(--t) var(--ease);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--t) var(--ease);
}

.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Perks box */
.perks-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.perks-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.perks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.perks-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.perks-list li svg { color: var(--emerald); flex-shrink: 0; }

/* T&C checkbox */
.toc-row {
  margin-bottom: 1rem;
}

.toc-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}

.toc-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* Signup nav (back/continue buttons) */
.signup-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.signup-back-btn {
  font-size: 0.875rem;
  padding: 0.45rem 0.875rem;
}

/* signin-error kept as alias */
.signin-error {
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.2);
  color: #dc2626;
  font-size: 0.85rem;
  padding: 0.6rem 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  text-align: left;
  line-height: 1.4;
}
[data-theme="dark"] .signin-error { color: #f87171; }

/* === SPINNER === */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin { animation: spin 0.7s linear infinite; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .module-card {
    aspect-ratio: auto;
    min-height: 180px;
  }

  .stats-inner {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .stat-divider { display: none; }

  .stat-item {
    flex: 0 0 calc(50% - 0.75rem);
    padding: 0;
  }

  .nav-links { display: none; }

  .modal-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .modules-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-title { font-size: 2.25rem; }
}
