:root {
  --green: #00ff85;
  --green-dim: rgba(0, 255, 133, 0.12);
  --bg: #111111;
  --card: #1b1b1b;
  --line: #2c2c2c;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --error: #ff6b6b;
  --radius: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(0, 255, 133, 0.10), transparent 70%),
    var(--bg);
}

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 32px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 28px;
}
.logo { height: 40px; width: auto; }

.lang {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 13px/1 Inter, sans-serif;
  padding: 8px 12px;
  cursor: pointer;
}
.lang:hover { color: var(--text); border-color: #444; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px;
}

.step { display: none; }
.step.active { display: block; animation: in 0.25s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead { margin: 0 0 22px; color: var(--muted); line-height: 1.5; font-size: 15px; }
.lead strong, .muted strong, .signed-in strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 16px; }

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  background: #121212;
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px;
  font: 500 16px/1.2 Inter, sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--green); }
input::placeholder { color: #555; }
.code-input, .otp-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  font: 700 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: transform 0.05s, opacity 0.15s;
}
.btn:active { transform: scale(0.99); }
.btn.primary { background: var(--green); color: #0b0b0b; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  font: 600 14px/1.4 Inter, sans-serif;
  cursor: pointer;
}
.link[disabled] { color: var(--muted); cursor: default; }

.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }
.signed-in { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.error {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.1);
  color: var(--error);
  font-size: 14px;
  line-height: 1.45;
}

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-dim);
  color: var(--green);
  margin-bottom: 18px;
}
.icon-badge.success { background: var(--green); color: #0b0b0b; }

.download {
  margin: 4px 0 22px;
  padding: 18px;
  border-radius: var(--radius);
  background: #151515;
  border: 1px solid var(--line);
}
.download-title { margin: 0 0 6px; font-weight: 700; font-size: 16px; }
.stores { display: grid; gap: 10px; }
.store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #000;
  border: 1px solid #333;
  color: #fff;
  text-decoration: none;
}
.store:hover { border-color: #555; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 11px; color: #bbb; }
.store b { font-size: 17px; font-weight: 600; }

.spinner {
  width: 32px;
  height: 32px;
  margin: 40px auto;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot { margin-top: auto; padding-top: 28px; text-align: center; color: #666; font-size: 12px; }
