:root {
  --bg-primary: #0a0e17;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-input: rgba(255, 255, 255, 0.05);
  --text-primary: #f1f5f9;
  --text-muted: #64748b;
  --accent: #8b2cff;
  --accent-2: #d946ef;
  --accent-glow: rgba(139, 44, 255, 0.33);
  --danger: #ef4444;
  --success: #10b981;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(139, 44, 255, 0.22), transparent 34rem),
    radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.2), transparent 28rem),
    var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  animation: fade-up 320ms ease-out both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 1.65rem;
}

.logo {
  color: var(--accent);
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 0 9px var(--accent-glow));
}

.title {
  font-size: 2rem;
  letter-spacing: 0;
  font-weight: 700;
}

.title span {
  color: var(--accent);
}

.subtitle {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lang-switch {
  margin-top: 0.9rem;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #9fb0d8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.36rem 0.62rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.lang-btn.active {
  background: rgba(139, 44, 255, 0.24);
  color: #eef3ff;
}

.field {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 0.82rem 0.9rem 0.82rem 2.72rem;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

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

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.84rem 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 90ms ease, filter 120ms ease;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.2rem 0 1rem;
}

.terms-checkbox {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin-top: 0.12rem;
  accent-color: var(--accent);
}

.terms-label {
  margin: 0;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.4;
}

.terms-label a {
  color: #c4b5fd;
  text-decoration: none;
}

.terms-label a:hover {
  color: #eef3ff;
}

.status {
  margin-top: 0.9rem;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  padding: 0.64rem 0.78rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.status.err {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
}

.status.ok {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
}

.footer {
  margin-top: 1.2rem;
  padding-top: 0.95rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.77rem;
}

.footer a {
  color: #9fb0d8;
  text-decoration: none;
  transition: color 120ms ease;
}

.footer a:hover {
  color: #eef3ff;
}

@media (max-width: 480px) {
  body {
    overflow: auto;
  }

  .page {
    align-items: flex-start;
    padding: 2rem 1rem;
  }

  .login-card {
    padding: 1.5rem;
  }
}
