:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-2: #273449;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #34d399;
  --accent-2: #10b981;
  --danger: #f87171;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-2);
}

h1 { font-size: 20px; }
h1 span { color: var(--accent); }
h2 { font-size: 16px; margin: 20px 0 10px; }

.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-2);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

form { display: flex; flex-direction: column; gap: 10px; }
hr { border: none; border-top: 1px solid var(--card-2); margin: 16px 0; }

input {
  background: var(--bg);
  border: 1px solid var(--card-2);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  font-size: 15px;
}

button {
  background: var(--accent-2);
  color: #052e22;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
button:active { transform: scale(0.98); }

.link {
  background: none;
  color: var(--accent);
  padding: 6px;
  min-height: 0;
  font-weight: 500;
}

.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  border-style: dashed;
  padding: 24px 16px;
}
.upload input { display: none; }
.upload-icon { font-size: 32px; }

.quota, .queue { font-size: 14px; }
.offline {
  background: #78350f;
  color: #fcd34d;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.status { min-height: 20px; font-size: 14px; color: var(--accent); margin: 6px 0; }

.history { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.history li { background: var(--card); border: 1px solid var(--card-2); border-radius: 14px; padding: 12px 14px; }
.history .when { font-size: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.history .del { color: var(--danger); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--card-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}
.chip b { color: var(--accent); }

footer {
  text-align: center;
  padding: 14px;
  margin-top: auto;
}

/* ---------- Карты ---------- */

.card-title { margin: 0 0 10px; }

.cards-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

select {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--card-2);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  font-size: 15px;
}

.cards-add { flex-direction: row; }
.cards-add input { flex: 1; min-width: 0; }
.cards-add button { white-space: nowrap; padding: 12px 16px; }

.link.danger { color: var(--danger); }

/* ---------- Расчёт ---------- */

.calc { width: 100%; }

.verdict {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}
.verdict-line b { color: var(--accent); margin-right: 4px; }
.card-hit { color: var(--accent); font-weight: 600; }

/* ---------- История ---------- */

.chip.bad { color: var(--danger); }

.linkchip {
  cursor: pointer;
  min-height: 0;
  font-size: 13px;
  color: var(--text);
  background: var(--card-2);
  border-radius: 999px;
  padding: 5px 12px;
}

.history .detail { margin-top: 8px; }

/* ---------- Шапка со ссылками ---------- */

.home { text-decoration: none; color: inherit; font-weight: 700; font-size: 20px; }
.home span { color: var(--accent); }
.topnav { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Лендинг ---------- */

.hero { text-align: center; padding: 40px 0 8px; }
.hero h2 { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
.hero h2 b { color: var(--accent); }
.hero .muted { max-width: 460px; margin: 0 auto 20px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.hero-actions button { padding: 12px 20px; }
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--card-2);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  background: var(--card);
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step h3 { font-size: 15px; margin: 8px 0 6px; }
.step p { font-size: 13px; }
.step-num {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-2);
  color: #052e22;
  font-weight: 700;
}

.video-card video { width: 100%; border-radius: 10px; background: #000; margin-top: 8px; }
.video-card h3, .step h3 { margin-top: 0; }
.landing-links { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Код для входа ---------- */

.code-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.code-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--accent);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Подписка ---------- */

.sub-active { color: var(--accent); }
.sub-inactive { color: #fbbf24; }
#payBox { text-align: center; margin-top: 12px; }
#payBox img { width: 260px; height: 260px; background: #fff; border-radius: 12px; padding: 8px; }

/* ---------- Статические страницы ---------- */

.checklist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checklist li::before { content: '✕ '; color: var(--danger); font-weight: 700; }
.howto { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.requisites { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.requisites dt { color: var(--muted); }
.requisites dd { margin: 0; font-weight: 600; }
