:root {
  --bg: #07080d;
  --text: #edf1ff;
  --muted: #9ba5c4;
  --brand: #ff6a3d;
  --brand-2: #8b5cf6;
  --line: #1a2238;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, system-ui, sans-serif; background: radial-gradient(1200px 600px at 70% -10%, #1b2444 0%, transparent 55%), var(--bg); color: var(--text); }
.bg-glow { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(500px 300px at 15% 8%, rgba(255,106,61,.16), transparent 60%); }

/* Light Mode */
body.light {
  --bg: #f5f7ff;
  --text: #0a0f2e;
  --muted: #5a6380;
  --line: #dde2f0;
  background: #f5f7ff;
  color: #0a0f2e;
}
body.light .nav {
  background: rgba(245,247,255,0.85);
  border-bottom: 1px solid #dde2f0;
}
body.light .card,
body.light .panel {
  background: #ffffff;
  border-color: #dde2f0;
}
body.light input,
body.light select {
  background: #f0f2fa;
  border-color: #c8d0e8;
  color: #0a0f2e;
}
body.light .bg-glow {
  background: radial-gradient(500px 300px at 15% 8%, rgba(255,106,61,.08), transparent 60%);
}
body.light .lang-select {
  background: #e8ecf8;
  color: #0a0f2e;
  border-color: #c8d0e8;
}
body.light .tab {
  background: #e8ecf8;
  border-color: #c8d0e8;
  color: #5a6380;
}
body.light .tab.active {
  border-color: #6366f1;
  color: #0a0f2e;
  background: #fff;
}
body.light label {
  color: #3a4260;
}
body.light .btn-outline {
  border-color: #c8d0e8;
  color: #0a0f2e;
}
body.light .status {
  color: #5a6380;
}
body.light .footer {
  border-top-color: #dde2f0;
}
body.light .footer p,
body.light .footer a {
  color: #5a6380;
}
body.light .pricing-card {
  background: #ffffff;
  border-color: #dde2f0;
}
body.light .pricing-card.popular {
  border-color: var(--brand-2);
  background: linear-gradient(180deg, rgba(139,92,246,.06), #ffffff);
}
body.light .pricing-card ul li {
  border-bottom-color: rgba(0,0,0,.08);
}
body.light .plan-btn-outline {
  border-color: #c8d0e8;
  color: #0a0f2e;
}
body.light .how-table th {
  color: #3a4260;
  border-bottom-color: #dde2f0;
}
body.light .how-table td {
  border-bottom-color: rgba(0,0,0,.06);
}
body.light .how-table .formula-row td {
  background: rgba(255,106,61,.08);
}
body.light .extension-step {
  background: #ffffff;
  border-color: #dde2f0;
}
body.light .preview-stat {
  background: #f0f2fa;
  border-color: #dde2f0;
}
body.light .dashboard-preview {
  border-color: #dde2f0;
}
body.light .eyebrow {
  color: var(--brand);
}
body.light .card p {
  color: var(--muted);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.container { width: min(1100px, 92vw); margin: 0 auto; }
.nav { position: sticky; top: 0; backdrop-filter: blur(8px); background: rgba(7,8,13,.65); border-bottom: 1px solid rgba(255,255,255,.04); z-index: 10; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-weight: 800; }
.brand span { color: var(--brand); }
.nav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.nav-right { display: flex; gap: 10px; align-items: center; }
.lang-select { background:#0f1526; color:#d8e1ff; border:1px solid #2a3556; border-radius:10px; padding:8px 10px; }

.hero { padding: 90px 0 40px; }
.eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .12em; font-size: .75rem; }
h1 { font-size: clamp(2rem, 5vw, 3.7rem); margin: 10px 0; line-height: 1.06; }
.subtitle { color: var(--muted); max-width: 760px; }
.hero-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn { padding: 10px 16px; border-radius: 12px; font-weight: 600; border: 0; cursor: pointer; text-decoration: none; color: #fff; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.btn-outline { background: transparent; border: 1px solid #2a3556; color: var(--text); }
.section { padding: 34px 0; }
h2 { margin: 0 0 14px; }
.grid-3, .dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card, .panel { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); border-radius: 16px; }
.card { padding: 16px; }
.card p { color: var(--muted); }
.panel { padding: 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab { background: #10162a; border: 1px solid #233154; color: #c9d4f7; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.tab.active { border-color: #5b79d1; color: #fff; }
.form { display: none; gap: 10px; }
.form.active { display: grid; }
label { display: grid; gap: 6px; font-size: .92rem; color: #c5d1f3; }
input, select { background: #0a1020; border: 1px solid #243155; border-radius: 10px; color: #fff; padding: 10px; }
.status { color: #8ea1da; min-height: 20px; }
.hidden { display: none !important; }
.footer { border-top: 1px solid var(--line); margin-top: 24px; }
.footer p { color: #7f89ab; padding: 20px 0; margin: 0; }
.chart-card { display: flex; flex-direction: column; }
.chart-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px; max-height: 220px; }
.chart-wrap canvas { max-width: 200px; max-height: 200px; }
.status { min-height: 20px; margin-top: 8px; font-size: .9rem; }

/* Extension секция */
.extension-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.extension-step {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.extension-step .step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  margin: 0 auto 12px;
}
.extension-mockup {
  background: #0d1220;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  max-width: 320px;
  font-size: .85rem;
}
body.light .extension-mockup { background: #1a1f35; color: #edf1ff; }
.extension-mockup .mockup-row {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  color: #c5d1f3;
}
.extension-mockup .mockup-total {
  display: flex; justify-content: space-between;
  padding: 10px 0 0; font-weight: 700; font-size: .95rem;
  color: var(--brand);
}
.mockup-cta {
  margin-top: 10px; width: 100%; text-align: center; padding: 8px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 8px; font-size: .8rem; font-weight: 600;
  cursor: pointer; border: none; color: #fff;
}

/* Pricing карточки */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  position: relative;
}
.pricing-card.popular {
  border-color: var(--brand-2);
  background: linear-gradient(180deg, rgba(139,92,246,.08), rgba(255,255,255,0));
}
.pricing-card .popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 20px; padding: 3px 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; white-space: nowrap;
}
.pricing-card .plan-name { font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.pricing-card .plan-price { font-size: 2.8rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.pricing-card .plan-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-card .plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-card .plan-desc { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.pricing-card ul li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.pricing-card ul li::before { content: "✓"; color: #22c55e; font-weight: 700; }
.plan-btn { width: 100%; padding: 12px; border-radius: 12px; font-weight: 600; font-size: .95rem; cursor: pointer; border: none; text-decoration: none; display: block; text-align: center; }
.plan-btn-primary { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; }
.plan-btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }

/* How it works table */
.how-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .88rem; }
.how-table th { text-align: left; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.how-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04); }
.how-table tr:last-child td { border-bottom: none; }
.how-table .formula-row td { color: var(--brand); font-weight: 700; background: rgba(255,106,61,.05); }

/* Dashboard preview */
.dashboard-preview { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 20px; }
.preview-topbar { background: #0d1525; padding: 10px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
body.light .preview-topbar { background: #e8ecf8; }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
.preview-stat { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.preview-stat .label { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.preview-stat .value { font-size: 1.3rem; font-weight: 700; }
.preview-stat .delta { font-size: .75rem; color: #22c55e; }

.auth-heading { margin-bottom: 8px; }
.auth-heading h3 { margin: 0 0 4px; font-size: 1.3rem; }

@media (max-width: 900px) {
  .extension-steps, .pricing-grid { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .dashboard-grid { grid-template-columns: 1fr; }
  .nav nav { display: none; }
}
