:root {
  --bg-0: #050505;
  --bg-1: #0d0d0f;
  --bg-2: #15161a;
  --text-0: #ffffff;
  --text-1: #c9ccd3;
  --text-2: #8a8e98;
  --red-0: #ff2d2d;
  --red-1: #ff4d2e;
  --red-2: #c81818;
  --border: rgba(255, 255, 255, 0.08);
  --ok: #16c47f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(255, 45, 45, 0.18), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(200, 24, 24, 0.12), transparent 60%),
    linear-gradient(180deg, #0a0a0d 0%, #050507 100%);
  z-index: -2;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--red-1); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  padding: 20px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: 2px; }

.shell {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px) clamp(16px, 4vw, 32px) 48px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 32px);
}
.card + .card { margin-top: 16px; }

h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
h2 { font-size: 16px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-2); margin-bottom: 14px; font-weight: 700; }
p.sub { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }

label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.4px; text-transform: uppercase; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-0);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--red-1);
}
.field + .field { margin-top: 14px; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--red-1) 0%, var(--red-2) 100%);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  text-decoration: none;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 45, 45, 0.3); text-decoration: none; }
button:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-0);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); box-shadow: none; }

.alert {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(255, 45, 45, 0.08); border-color: rgba(255, 45, 45, 0.35); color: #ffb5b5; }
.alert-ok { background: rgba(22, 196, 127, 0.08); border-color: rgba(22, 196, 127, 0.35); color: #9bf0c8; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { min-width: 0; }
.spacer { flex: 1; }

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 45, 45, 0.12);
  border: 1px solid rgba(255, 77, 46, 0.35);
  color: #ffd5cc;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.muted { color: var(--text-2); }

pre.key {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-1);
  white-space: pre;
  overflow-x: auto;
  max-height: 280px;
}

footer {
  text-align: center;
  padding: 20px;
  color: var(--text-2);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
