:root {
  --bg: #070a12;
  --card: #0e1424;
  --border: rgba(120, 140, 255, 0.14);
  --text: #e8ecff;
  --muted: #8b93b8;
  --accent: #6c7cff;
  --accent2: #a855f7;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(108,124,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,124,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.glow {
  position: fixed; border-radius: 50%; filter: blur(80px); opacity: 0.35; pointer-events: none; z-index: 0;
}
.glow-1 { width: 320px; height: 320px; background: var(--accent); top: -80px; left: -60px; }
.glow-2 { width: 280px; height: 280px; background: var(--accent2); bottom: -60px; right: -40px; }

.shell {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto; padding: 28px 18px 48px;
}

.brand {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 22px;
}
.logo { display: flex; gap: 14px; align-items: center; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.35rem; color: #fff;
  box-shadow: 0 8px 28px rgba(108,124,255,0.35);
}
.brand h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.brand .ver {
  font-size: 0.75rem; font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  vertical-align: super;
}
.tag { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.status-pills { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill {
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.04em;
}
.pill-muted { color: var(--muted); background: rgba(255,255,255,0.03); }
.pill-ok { color: var(--success); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.pill-warn { color: var(--warning); border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.08); }
.pill-err { color: var(--danger); border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.card h2 { font-size: 1.1rem; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin-bottom: 20px; }

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted);
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.35);
  color: var(--text); font-size: 1rem; font-family: var(--mono);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: rgba(108,124,255,0.55);
  box-shadow: 0 0 0 3px rgba(108,124,255,0.15);
}
.field input::placeholder { color: #4a5270; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font); font-weight: 600;
  font-size: 0.92rem; border-radius: 12px; padding: 12px 18px;
  transition: transform 0.12s, opacity 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  width: 100%; margin-top: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; box-shadow: 0 10px 28px rgba(108,124,255,0.3);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }

.btn-ghost {
  background: rgba(255,255,255,0.05); color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger {
  background: rgba(248,113,113,0.12); color: var(--danger);
  border: 1px solid rgba(248,113,113,0.3);
}

.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

.process { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.process-status {
  font-size: 0.9rem; font-weight: 500; margin-bottom: 14px;
  color: var(--accent);
}

.code-box {
  text-align: center; padding: 18px; border-radius: 14px;
  background: rgba(108,124,255,0.08); border: 1px dashed rgba(108,124,255,0.35);
  margin-bottom: 16px;
}
.code-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.code {
  font-family: var(--mono); font-size: 1.85rem; font-weight: 700;
  letter-spacing: 0.18em; margin: 10px 0 14px; color: #fff;
  text-shadow: 0 0 24px rgba(108,124,255,0.45);
}

.steps { margin-bottom: 16px; }
.steps ol {
  padding-left: 18px; color: var(--muted); font-size: 0.84rem; line-height: 1.65;
}
.steps strong { color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.alert {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  font-size: 0.86rem; line-height: 1.45;
}
.alert-error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #fecaca; }
.alert-success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: #a7f3d0; }
.alert-info { background: rgba(108,124,255,0.1); border: 1px solid rgba(108,124,255,0.25); color: #c7d2fe; }

.foot {
  margin-top: 28px; text-align: center; font-size: 0.78rem; color: var(--muted); line-height: 1.5;
}
.foot .muted { opacity: 0.7; margin-top: 6px; }

@media (max-width: 420px) {
  .code { font-size: 1.5rem; letter-spacing: 0.12em; }
  .brand { flex-direction: column; }
  .status-pills { flex-direction: row; align-items: center; }
}
