:root {
  --bg: #0f1216;
  --bg-grad-1: #1b2330;
  --bg-grad-2: #0f1216;
  --card: #171b22;
  --card-border: #262c36;
  --text: #e8ecf1;
  --muted: #9aa4b2;
  --accent: #4f8cff;
  --accent-hover: #6aa0ff;
  --error: #ff6b6b;
  --ok: #43d17a;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-grad-1), transparent 60%),
    var(--bg-grad-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent), #8a5cff);
  color: #fff;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  margin: 0;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--card-border);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 12px;
}

h2 {
  font-size: 16px;
  margin: 0 0 4px;
}

.lead {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(67, 209, 122, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67, 209, 122, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(67, 209, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 209, 122, 0); }
}

hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 26px 0 22px;
}

.muted { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

form { display: flex; flex-direction: column; }

label {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 6px;
}

input {
  background: #10141a;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

button {
  margin-top: 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

button:hover { background: var(--accent-hover); }
button:active { transform: translateY(1px); }

.error {
  color: var(--error);
  font-size: 13px;
  margin: 12px 0 0;
}

footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.welcome {
  text-align: center;
  padding: 8px 0;
}

.welcome .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(67, 209, 122, 0.15);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.welcome button {
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
}
