/* ── Tokens ──────────────────────────────────────────────────────────────────── */
:root {
  --bg:          #09090f;
  --surface:     #12121c;
  --surface2:    #1c1c2e;
  --surface3:    #25253a;
  --border:      #2e2e45;
  --primary:     #7c8eff;
  --primary-dim: #4a5bcc;
  --success:     #4ade80;
  --warning:     #fbbf24;
  --danger:      #f87171;
  --text:        #e2e2f0;
  --text-dim:    #8888a8;
  --text-muted:  #55557a;
  --radius:      10px;
  --radius-lg:   16px;
  --transition:  0.18s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.main-content { flex: 1; }

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 12px; }
.nav-link {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--text); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dim); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-success { background: var(--success); color: #0a1a0a; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.card-value {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.card-unit {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-muted); }
.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 5px;
}
.form-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── Alerts ──────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: var(--danger); }
.alert-success { background: rgba(74,222,128,.12);  border: 1px solid rgba(74,222,128,.3);  color: var(--success); }

/* ── Grid stat ───────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Token display ───────────────────────────────────────────────────────────── */
.token-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.token-value {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--warning);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 2px 6px;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: color var(--transition);
}
.btn-copy:hover { color: var(--primary); }

/* ── Chart container ─────────────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 8px;
}

/* ── Progress bar ────────────────────────────────────────────────────────────── */
.progress-bar-bg {
  background: var(--surface3);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ── Hero (landing) ──────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 20px 60px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(124,142,255,.15);
  border: 1px solid rgba(124,142,255,.3);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-title span { color: var(--primary); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Features ────────────────────────────────────────────────────────────────── */
.features {
  padding: 60px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 40px;
  font-size: 0.95rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.feature-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1rem;
}
.feature-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── How it works ────────────────────────────────────────────────────────────── */
.how-it-works {
  padding: 60px 20px;
}
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 580px;
  margin: 0 auto;
}
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.step-content p  { font-size: 0.88rem; color: var(--text-dim); }

/* ── Pool banner ─────────────────────────────────────────────────────────────── */
.pool-banner {
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 60px 20px;
}
.pool-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--warning);
  margin: 8px 0;
}
.pool-label { color: var(--text-dim); font-size: 0.9rem; }

/* ── CTA section ─────────────────────────────────────────────────────────────── */
.cta-section {
  padding: 60px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── Auth pages ──────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.auth-sub {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 28px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Dashboard ───────────────────────────────────────────────────────────────── */
.dashboard {
  padding: 32px 20px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.dashboard-title { font-size: 1.4rem; font-weight: 700; }
.section-gap { margin-top: 32px; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── History table ───────────────────────────────────────────────────────────── */
.hist-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.hist-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.hist-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(46,46,69,.5);
  color: var(--text-dim);
}
.hist-table tr:last-child td { border-bottom: none; }
.hist-table .steps-val { font-weight: 600; color: var(--text); }
.badge-goal {
  background: rgba(74,222,128,.15);
  color: var(--success);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-brand { font-weight: 600; color: var(--text-dim); }
.footer-link { color: var(--text-muted); }
.footer-link:hover { color: var(--text-dim); }
.footer-sep { color: var(--border); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 50px 20px 40px; }
  .auth-box { padding: 24px; }
  .dashboard { padding: 20px 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
