:root {
  --bg: #05070d;
  --panel-bg: #0b0f1a;
  --panel-border: #1c2740;
  --field-bg: #11182b;
  --field-border: #2a3a5c;
  --text-primary: #ffffff;
  --text-muted: #8a93a6;
  --text-faint: #5c6680;
  --accent: #4f7cff;
  --accent-bright: #6f94ff;
  --accent-dim: #2a3a5c;
  --danger: #ff5468;
  --danger-bg: #2a121a;
  --success: #2fd07a;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, #0e1730 0%, #05070d 55%, #03040a 100%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.page {
  width: 100%;
  max-width: 460px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.brand img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(79, 124, 255, 0.6));
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-bright);
  text-transform: uppercase;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.progress {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.progress-step {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--accent-dim);
  transition: background 0.3s ease;
}

.progress-step.active,
.progress-step.done {
  background: var(--accent);
}

h1 {
  font-size: 22px;
  margin: 0 0 6px 0;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: var(--text-faint);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}

.code-input {
  letter-spacing: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.hint {
  font-size: 12px;
  color: var(--text-faint);
  margin: -12px 0 18px 0;
}

button.primary {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 0;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.35);
}

button.primary:hover { filter: brightness(1.08); }
button.primary:active { transform: translateY(1px); }
button.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.link-row {
  text-align: center;
  margin-top: 18px;
}

.link-row a, .link-row button.linklike {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.link-row a:hover, .link-row button.linklike:hover {
  color: var(--accent-bright);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.alert.error {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 84, 104, 0.4);
  color: #ffb4bd;
}

.alert.success {
  background: rgba(47, 208, 122, 0.1);
  border: 1px solid rgba(47, 208, 122, 0.4);
  color: #8df0b6;
}

.alert a { color: inherit; text-decoration: underline; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.center-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(47, 208, 122, 0.12);
  border: 1px solid rgba(47, 208, 122, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
}

.turnstile-wrap {
  margin-bottom: 18px;
  min-height: 65px;
  border-radius: 8px;
  overflow: hidden;
}

.resend {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}
