/* Сайт активации подписок по CDK-кодам — тёмная тема, RU/EN */

:root {
  --bg: #0a0f1a;
  --card: rgba(16, 24, 39, 0.8);
  --card-border: #1f2b3e;
  --input-bg: #0b1220;
  --input-border: #26344b;
  --text: #e7edf6;
  --muted: #8b9bb4;
  --accent1: #10a37f;
  --accent2: #0ea5e9;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 12% -5%, rgba(16, 163, 127, 0.16), transparent 60%),
    radial-gradient(720px 520px at 96% 0%, rgba(14, 165, 233, 0.16), transparent 60%);
}

.mono { font-family: ui-monospace, Consolas, "Cascadia Mono", monospace; }
.hidden { display: none !important; }

/* ---------- шапка ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  position: relative;
  z-index: 1;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

nav { display: flex; gap: 18px; align-items: center; }

.linklike {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.92rem;
  font-family: inherit;
  padding: 0;
}
.linklike:hover { color: var(--text); }

.lang-switch {
  display: flex;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 13px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
}

/* ---------- каркас ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 20px 40px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

h1 { font-size: 1.5rem; margin: 0.15em 0 0.4em; }
h2 { font-size: 1.2rem; margin: 0.15em 0 0.6em; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

.center { text-align: center; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.actions { margin-top: 20px; }

/* ---------- поля ---------- */

.field-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 18px 0 8px;
}

.input {
  flex: 1;
  min-width: 0;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent2); }
.input::placeholder { color: #55688a; }

.textarea {
  width: 100%;
  resize: vertical;
  font-family: ui-monospace, Consolas, "Cascadia Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ---------- кнопки ---------- */

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.05s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
}
.btn.primary:disabled { opacity: 0.6; cursor: default; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--muted);
}
.btn.ghost:hover { color: var(--text); }

/* ---------- уведомления ---------- */

.error-box {
  background: rgba(127, 29, 29, 0.25);
  border: 1px solid rgba(127, 29, 29, 0.6);
  color: #fca5a5;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin-top: 16px;
  word-break: break-word;
}
.error-box .err-code {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #d38b8b;
}

.warn-box {
  background: rgba(120, 53, 15, 0.25);
  border: 1px solid rgba(146, 64, 14, 0.6);
  color: #fcd34d;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin-top: 16px;
}

/* ---------- шаги ---------- */

.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 22px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.step .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #33415c;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex: none;
}
.step.active { color: var(--text); font-weight: 600; }
.step.active .dot {
  border-color: var(--accent2);
  color: var(--accent2);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
}
.step.done .dot {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border-color: transparent;
  color: #fff;
}
.step-line { width: 42px; height: 1.5px; background: var(--input-border); margin: 0 10px; flex: none; }

/* ---------- тариф ---------- */

.plan-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.15), rgba(14, 165, 233, 0.15));
  border: 1px solid rgba(16, 163, 127, 0.4);
  color: #7ee2c8;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.plan-badge.small { font-size: 0.85rem; padding: 4px 12px; }
.plan-line { margin: 0 0 4px; }

/* ---------- прогресс ---------- */

.progress {
  height: 10px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 10px;
}
.progress.slim { margin-top: 14px; }
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width 0.8s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 1.6s infinite;
}
@keyframes shine {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--input-border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 6px auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-line { font-size: 1.05rem; font-weight: 600; margin: 6px 0 0; }

/* ---------- результат ---------- */

.res-icon { font-size: 2.7rem; margin: 4px 0 8px; }

/* ---------- FAQ / инструкция ---------- */

details {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: rgba(11, 18, 32, 0.45);
}
details:last-child { margin-bottom: 0; }
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}
details[open] summary { margin-bottom: 8px; }
details p { margin: 0; font-size: 0.93rem; }

.howto ol { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.93rem; }
.howto li { margin-bottom: 6px; }
.howto a { color: var(--accent2); }

/* ---------- статус по коду ---------- */

.status-card {
  margin-top: 18px;
  border-top: 1px dashed var(--input-border);
  padding-top: 18px;
}

.pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill.ok   { background: rgba(16, 163, 127, 0.15); color: var(--ok);   border: 1px solid rgba(16, 163, 127, 0.45); }
.pill.err  { background: rgba(127, 29, 29, 0.25);  color: var(--danger); border: 1px solid rgba(127, 29, 29, 0.55); }
.pill.warn { background: rgba(120, 53, 15, 0.25);  color: var(--warn);  border: 1px solid rgba(146, 64, 14, 0.55); }
.pill.info { background: rgba(14, 165, 233, 0.15); color: #7dd3fc;      border: 1px solid rgba(14, 165, 233, 0.45); }

/* ---------- подвал ---------- */

footer {
  padding: 16px 24px 28px;
  color: #5b6b85;
  font-size: 0.8rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
footer p { margin: 4px 0; }

/* ---------- адаптив ---------- */

@media (max-width: 540px) {
  .card { padding: 20px; }
  .site-header { padding: 14px 16px; }
  .step-line { width: 18px; margin: 0 6px; }
  .step .lbl { display: none; }
  .step.active .lbl { display: inline; }
}
