:root {
  --bg: #0f1115;
  --card: #171a21;
  --text: #e8e8ea;
  --muted: #9aa0a6;
  --accent: #ff4d4f;
  --ok: #10b981;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 800px at 50% -20%, #1f2330 0%, #0f1115 60%) fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.wrap { width: min(92vw, 420px); }

.card {
  background: var(--card);
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  display: grid;
  gap: 10px;
}

h1 { margin: 0 0 6px; font-size: 1.6rem; }

label { font-size: .9rem; color: var(--muted); }

input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a2f3a;
  background: #0f141b;
  color: var(--text);
  outline: none;
}

input:focus { border-color: #4f5770; }

button {
  margin-top: 6px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:disabled { opacity: .65; cursor: not-allowed; }

.error {
  min-height: 1.5em;
  color: #ffd166;
  margin: 6px 0 0;
}

/* Fake loader spinner */
.loader {
  width: 26px;
  height: 26px;
  border: 3px solid #2b3140;
  border-top-color: var(--ok);
  border-radius: 50%;
  margin: 8px auto 0;
  animation: spin .9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Shake animation on failure */
.card.shake {
  animation: shake .45s ease;
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
