/* ═══════════════════════════════════════════
   HUMANFILTER — Global Styles
   Aesthetic: Dark brutalist / forensic terminal
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --surface2: #1a1a1e;
  --border: #2a2a30;
  --accent: #e8ff47;
  --accent-dim: rgba(232, 255, 71, 0.12);
  --accent-hover: #f0ff6e;
  --danger: #ff4757;
  --warn: #ffa502;
  --ok: #2ed573;
  --text: #f0f0f0;
  --muted: #888;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 6px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; }

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

/* ── NOISE TEXTURE OVERLAY ─────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── TYPOGRAPHY ────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── AUTH FORMS ────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  position: fixed;
  top: 24px;
  left: 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: -0.03em;
  z-index: 10;
}

.auth-brand span { color: var(--text); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.form-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 2px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

.form-card header {
  margin-bottom: 32px;
}

.form-card header h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.form-card header p {
  color: var(--muted);
  font-size: 14px;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--accent); }

.form-group label {
  position: absolute;
  left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
  transition: all 0.2s;
  background: var(--surface2);
  padding: 0 4px;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.captcha-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.captcha-box .captcha-q {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  font-weight: 500;
  min-width: 80px;
}

.captcha-box input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  outline: none;
  padding: 4px 0;
}

.captcha-box input:focus { border-bottom-color: var(--accent); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0b;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

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

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover { background: rgba(255, 71, 87, 0.2); }

.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.form-footer a { color: var(--accent); font-weight: 500; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

/* ── ALERTS ────────────────────────────────── */
.alert {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 14px;
  animation: slideIn 0.3s ease;
}

.alert-error { background: rgba(255, 71, 87, 0.1); border: 1px solid rgba(255, 71, 87, 0.3); color: var(--danger); }
.alert-success { background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.3); color: var(--ok); }

@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── NAV ───────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.nav-brand span { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  transition: all 0.2s;
  font-weight: 500;
}

.nav-link:hover { color: var(--text); background: var(--surface2); }

.nav-link.active { color: var(--accent); }

/* ── DASHBOARD ─────────────────────────────── */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
  position: relative;
  z-index: 1;
}

.dashboard-header {
  margin-bottom: 48px;
}

.dashboard-header .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(232, 255, 71, 0.2);
  margin-bottom: 16px;
}

.dashboard-header h1 { font-size: 36px; margin-bottom: 8px; }
.dashboard-header p { color: var(--muted); }

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 12px;
  vertical-align: middle;
}

.plan-badge.free { background: rgba(136, 136, 136, 0.15); color: var(--muted); border: 1px solid var(--border); }
.plan-badge.pro { background: rgba(232, 255, 71, 0.15); color: var(--accent); border: 1px solid rgba(232, 255, 71, 0.3); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover { border-color: rgba(232, 255, 71, 0.2); }

.card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.card-sub {
  font-size: 13px;
  color: var(--muted);
}

.usage-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.usage-bar-fill.warn { background: var(--warn); }
.usage-bar-fill.danger { background: var(--danger); }

/* ── TOKEN SECTION ─────────────────────────── */
.token-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.token-section h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.token-section p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.token-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.token-display code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  flex: 1;
  word-break: break-all;
  letter-spacing: 0.05em;
}

.token-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
  width: auto;
}

/* ── PRICING ───────────────────────────────── */
.pricing-page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.pricing-hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.pricing-hero h1 { font-size: 52px; margin-bottom: 16px; }
.pricing-hero p { color: var(--muted); font-size: 18px; max-width: 480px; margin: 0 auto; }

.pricing-grid {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 620px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-hero h1 { font-size: 36px; }
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
}

.pricing-card.featured {
  border-color: rgba(232, 255, 71, 0.4);
  background: linear-gradient(160deg, #131315 0%, #171a10 100%);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #0a0a0b;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 0 0 8px 8px;
}

.pricing-card .plan-name {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.pricing-card .price {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card .price-period {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 28px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.pricing-features li:last-child { border: none; }

.pricing-features li .check {
  color: var(--ok);
  font-size: 16px;
  flex-shrink: 0;
}

/* ── LEGAL PAGES ───────────────────────────── */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px;
  position: relative;
  z-index: 1;
}

.legal-page h1 {
  font-size: 40px;
  margin-bottom: 8px;
}

.legal-page .updated {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 48px;
  letter-spacing: 0.05em;
}

.legal-page h2 {
  font-size: 18px;
  margin: 36px 0 12px;
  color: var(--accent);
}

.legal-page p {
  color: #b0b0b0;
  margin-bottom: 16px;
  line-height: 1.75;
}

/* ── SUCCESS PAGE ──────────────────────────── */
.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.success-icon {
  width: 80px; height: 80px;
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 28px;
  animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-page h1 { font-size: 36px; margin-bottom: 12px; }
.success-page p { color: var(--muted); margin-bottom: 32px; }

/* ── GLOW DECORATIONS ──────────────────────── */
.glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.07;
  z-index: 0;
}

.glow-1 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: -100px; right: -100px;
}

.glow-2 {
  width: 300px; height: 300px;
  background: #47b8ff;
  bottom: -80px; left: -80px;
}
