/* ── Design tokens (mirrored from the app) ──────────────────── */
:root {
  --bg-0:       #04040a;
  --bg-1:       #0d0d0f;
  --bg-2:       #131316;
  --bg-panel:   rgba(255,255,255,0.035);
  --bg-hover:   rgba(255,255,255,0.06);
  --border:     rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --accent:     #7c6af7;
  --accent-2:   #a89df8;
  --accent-dim: rgba(124,106,247,0.15);
  --text:       #e8e8ec;
  --text-dim:   #7a7a8a;
  --text-mute:  #4a4a55;
  --danger:     #ff7575;
  --good:       #1ed760;
  --gold:       #ffd564;
  --radius:     12px;
  --radius-sm:  7px;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-0);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,106,247,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(124,106,247,0.07) 0%, transparent 60%),
    linear-gradient(to bottom, #04040a 0%, #131316 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.2px;
}
.nav-brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #8b7bf9; border-color: #8b7bf9; }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text-dim);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }

.btn-accent-soft {
  background: var(--accent-dim);
  border-color: rgba(124,106,247,0.35);
  color: var(--accent);
}
.btn-accent-soft:hover { background: rgba(124,106,247,0.25); border-color: rgba(124,106,247,0.55); }

.btn-sm {
  height: 26px;
  padding: 0 9px;
  font-size: 10.5px;
}

.btn-block { width: 100%; }

/* ── Inputs ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.input {
  height: 38px;
  padding: 0 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.input::placeholder { color: var(--text-mute); }
.input:focus {
  border-color: rgba(124,106,247,0.55);
  background: rgba(255,255,255,0.06);
}

/* ── Cards / panels ────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-title {
  padding: 12px 18px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.panel-body { padding: 18px; }

/* ── Plan badges (matched to app) ──────────────────────────── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-radius: 3px;
  padding: 2.5px 7px;
  line-height: 1.4;
}
.plan-free {
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.plan-pro {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(124,106,247,0.35);
}
.plan-dev {
  color: var(--gold);
  background: rgba(255,213,100,0.09);
  border: 1px solid rgba(255,213,100,0.32);
}

/* ── Layout containers ──────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}
.page-content {
  padding: 56px 0 80px;
}

/* ─────────────────────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 auto 18px;
}
.auth-title {
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.auth-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}
.auth-link {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.15s;
}
.auth-link:hover { color: var(--accent-2); }
.auth-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-dim);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-mute);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─────────────────────────────────────────────────────────────
   ACCOUNT PAGE
───────────────────────────────────────────────────────────── */
.acc-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.acc-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.acc-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 22px;
}
.avatar-wrap {
  position: relative;
  margin-bottom: 14px;
}
.avatar-lg {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  user-select: none;
  overflow: hidden;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.avatar-edit:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.avatar-edit input { display: none; }
.avatar-edit svg { width: 13px; height: 13px; }

.acc-name-lg {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
}
.acc-email {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.acc-plan-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.acc-info-list {
  display: flex;
  flex-direction: column;
}
.acc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.acc-info-row:last-child { border-bottom: none; }
.acc-info-label {
  font-size: 12px;
  color: var(--text-dim);
}
.acc-info-value {
  font-size: 12.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.acc-info-value.mono {
  font-family: 'SF Mono', 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Token meter */
.token-meter {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}
.token-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.token-meter-num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.token-meter-num span { color: var(--text-dim); font-size: 14px; font-weight: 500; }
.token-meter-cap {
  font-size: 11.5px;
  color: var(--text-dim);
}
.token-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.token-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.token-meter-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-dim);
}
.token-cooldown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ─────────────────────────────────────────────────────────────
   INSTALL PAGE
───────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(124,106,247,0.3);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 22px;
}
.hero-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.05;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #fff 0%, #b4b4c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.55;
}
.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Download cards */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 56px;
}
.dl-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}
.dl-card:hover {
  background: var(--bg-hover);
  border-color: rgba(124,106,247,0.3);
  transform: translateY(-2px);
}
.dl-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(124,106,247,0.1);
  border: 1px solid rgba(124,106,247,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.dl-card-icon svg { width: 18px; height: 18px; }
.dl-card-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.dl-card-meta {
  font-size: 11.5px;
  color: var(--text-dim);
}
.dl-card-cta {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Features section */
.feat-section {
  padding: 64px 0 24px;
}
.feat-head {
  text-align: center;
  margin-bottom: 36px;
}
.feat-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.feat-sub {
  color: var(--text-dim);
  font-size: 13.5px;
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(124,106,247,0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.feat-icon svg { width: 16px; height: 16px; }
.feat-name {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}
.feat-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.55;
}

.foot {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 24px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-mute);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .acc-grid { grid-template-columns: 1fr; }
  .download-grid, .feat-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .nav { padding: 0 18px; }
  .container { padding: 0 18px; }
}
