/* ── Variables ── */
:root {
  --bg:         #0f0f1a;
  --bg-card:    #1a1a2e;
  --bg-card2:   #16213e;
  --border:     #2a2a4a;
  --accent:     #6366f1;
  --accent-h:   #4f46e5;
  --cyan:       #06b6d4;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim:   #64748b;
  --success:    #10b981;
  --error:      #ef4444;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,.45);
  --transition: .2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--text-muted); }

/* ── Layout helpers ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-title {
  text-align: center;
  margin-bottom: .75rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 3.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: .5rem 1rem;
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: .5rem 1.25rem; font-size: .875rem; }
.btn-full { width: 100%; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switcher {
  display: flex;
  gap: .25rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all var(--transition);
}
.lang-btn.active { background: var(--accent); color: #fff; }
.nav-burger { display: none; background: none; border: none; color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(99,102,241,.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 60%,  rgba(6,182,212,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 99px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-desc { font-size: 1.1rem; margin-bottom: 2rem; max-width: 460px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
}
.stat-num { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.hero-card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.hero-card-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.hero-card-dot:nth-child(1) { background: #ef4444; }
.hero-card-dot:nth-child(2) { background: #f59e0b; }
.hero-card-dot:nth-child(3) { background: var(--success); }
.hero-card-title { font-size: .85rem; color: var(--text-muted); margin-left: auto; }
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.card-row:last-child { border-bottom: none; }
.card-row-label { font-size: .85rem; color: var(--text-muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-green  { background: rgba(16,185,129,.15); color: var(--success); }
.badge-blue   { background: rgba(99,102,241,.15);  color: var(--accent); }
.badge-cyan   { background: rgba(6,182,212,.15);   color: var(--cyan); }

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(99,102,241,.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.feature-title { margin-bottom: .5rem; }
.feature-desc  { font-size: .9rem; }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card.popular {
  border-color: var(--accent);
  background: var(--bg-card2);
}
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 99px;
  white-space: nowrap;
}
.pricing-name { font-size: .85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.pricing-amount { font-size: 2.25rem; font-weight: 800; color: var(--text); line-height: 1; }
.pricing-amount sup { font-size: 1rem; font-weight: 600; vertical-align: top; margin-top: .35rem; }
.pricing-amount sub { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.pricing-original { font-size: .85rem; color: var(--text-dim); text-decoration: line-through; margin-top: .25rem; }
.pricing-save { font-size: .8rem; color: var(--success); font-weight: 600; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.pricing-features { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.75rem; }
.pricing-feature {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.pricing-feature svg { color: var(--success); flex-shrink: 0; }

/* ── FAQ ── */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 1rem;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-icon { flex-shrink: 0; transition: transform .25s; color: var(--text-muted); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ── Contacts ── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: border-color var(--transition);
}
.contact-card:hover { border-color: var(--accent); }
.contact-icon { font-size: 2rem; margin-bottom: 1rem; }
.contact-label { font-size: .8rem; color: var(--text-dim); margin-bottom: .25rem; }
.contact-val { font-size: .95rem; font-weight: 600; color: var(--text); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: .85rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ── Forms (auth pages) ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo a { font-size: 1.5rem; font-weight: 800; }
.auth-logo span { color: var(--accent); }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.auth-sub { text-align: center; font-size: .9rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--text-muted); }
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  color: var(--text);
  font-size: .95rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }
.form-error { font-size: .8rem; color: var(--error); margin-top: .35rem; display: none; }
.form-group.error .form-input { border-color: var(--error); }
.form-group.error .form-error { display: block; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1.25rem;
  display: none;
}
.alert-error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);   color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3);  color: #6ee7b7; }

/* ── Dashboard ── */
.dashboard-page { min-height: 100vh; }
.dashboard-main { padding: 3rem 0; }
.dashboard-header { margin-bottom: 2.5rem; }
.dashboard-header h1 { font-size: 1.75rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 700px) { .dashboard-grid { grid-template-columns: 1fr; } }
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.dash-card-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 1rem; font-weight: 700; }
.status-active { color: var(--success); font-weight: 700; font-size: 1.25rem; }
.status-none   { color: var(--text-dim); font-size: 1rem; }
.sub-expires { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
.history-list { display: flex; flex-direction: column; gap: .75rem; }
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.history-plan { font-weight: 600; }
.history-date { color: var(--text-dim); font-size: .8rem; }

/* ── Status pages ── */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.status-icon { font-size: 4rem; margin-bottom: 1.5rem; }
.status-page h1 { margin-bottom: 1rem; }
.status-page p { max-width: 400px; margin: 0 auto 2rem; }

/* ── Responsive ── */

/* Prevent horizontal scroll globally */
html, body { overflow-x: hidden; max-width: 100%; }

/* Tablet — ≤900px */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-visual  { display: none; }
  .hero-desc    { margin: 0 auto 2rem; max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats   { justify-content: center; }
  .hero-badge   { display: inline-flex; }
  .nav-links    { display: none; }
  .nav-burger   { display: block; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile — ≤600px */
@media (max-width: 600px) {
  /* Base */
  .container { padding: 0 1.25rem; }

  /* Typography */
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.35rem; }
  p  { font-size: .95rem; }

  /* Nav — на мобиле только лого + бургер */
  .nav-inner { padding: 0 1.25rem; height: 56px; }
  .nav-logo  { font-size: 1.05rem; }
  .nav-actions #auth-actions  { display: none !important; }
  .nav-actions #user-actions  { display: none !important; }
  .lang-switcher { display: none; }

  /* Hero */
  .hero { padding: 2.5rem 0 2rem; }
  .hero-inner { text-align: center; }
  .hero-badge { font-size: .75rem; margin: 0 auto 1.25rem; }
  .hero-title { margin-bottom: 1rem; }
  .hero-desc  { font-size: 1rem; margin-bottom: 1.5rem; }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
  }
  .hero-stats {
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
  }
  .stat-num { font-size: 1.5rem; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .feature-card  { padding: 1.5rem; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pricing-card { padding: 1.5rem; }
  .pricing-card.popular { margin-top: .5rem; }

  /* FAQ */
  .faq-question { padding: 1rem 1.25rem; font-size: .9rem; }
  .faq-answer   { padding: 0 1.25rem 1rem; }

  /* Contacts */
  .contacts-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: .75rem; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 1rem; }

  /* Auth pages */
  .auth-page { padding: 1.5rem 1rem; justify-content: flex-start; padding-top: 3rem; }
  .auth-card { padding: 1.75rem 1.25rem; }

  /* Dashboard */
  .dashboard-main { padding: 1.5rem 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-card { padding: 1.25rem; }
  .ref-code-row { flex-wrap: wrap; gap: .5rem; }
  .ref-code-row .btn { flex: 1; min-width: 110px; font-size: .8rem; }
  .ref-code { font-size: 1rem; }

  /* Legal pages */
  .legal-card { padding: 1.5rem 1.25rem; }

  /* Modal */
  .modal { padding: 1.5rem 1.25rem; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }

  /* Status pages */
  .status-page { padding: 2rem 1rem; }
  .status-icon { font-size: 3rem; }
}

/* ── Mobile nav open ── */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 1rem; color: var(--text-muted); }
.nav-mobile a:hover { color: var(--text); }

/* ── Loader ── */
.loader {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
