:root {
  --overlay-dim: 0.35;
  --login-radius: 12px;
  --login-shadow: 0 24px 48px rgba(0,0,0,0.8);
  font-family: "Inter", system-ui, sans-serif;
}

.login-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, var(--overlay-dim));
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 50; overflow-y: auto;
  animation: lc-overlay-in 0.3s ease both;
}
@keyframes lc-overlay-in { from { opacity: 0; } to { opacity: 1; } }

.login-card {
  width: min(440px, 88%);
  border-radius: var(--login-radius);
  background: #141414;
  color: #f5f5f5;
  box-shadow: var(--login-shadow);
  padding: 36px 32px;
  border: 1px solid rgba(255,107,0,0.3);
  position: relative; overflow: hidden;
  animation: lc-card-pop 0.35s cubic-bezier(0.34,1.36,0.64,1) both;
  font-family: "Inter", sans-serif;
}
@keyframes lc-card-pop {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card h2 {
  margin: 0 0 .25rem;
  font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fff, #ff8533);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.login-muted { margin: 0 0 1.4rem; font-size: .92rem; color: #999; line-height: 1.55; }

.login-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.login-field label { font-size: .85rem; font-weight: 600; color: #f5f5f5; display: block; margin-bottom: 4px; }
.login-field > input {
  width: 100%; padding: 12px 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: #0a0a0a; font-size: 0.95rem;
  font-family: "Inter", sans-serif; color: #f5f5f5;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-field > input:focus { border-color: #ff6b00; box-shadow: 0 0 0 3px rgba(255,107,0,0.15); }
.login-field > input::placeholder { color: #666; }

.login-phone-row { display: flex; gap: .6rem; align-items: stretch; }
.login-country {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 70px; width: 70px; padding: 12px 6px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: #1a1a1a; font-weight: 600; color: #999;
  white-space: nowrap; font-family: "Inter", sans-serif; font-size: 0.95rem;
  cursor: default; user-select: none;
}
.login-phone-row input {
  flex: 1; min-width: 0; padding: 12px 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: #0a0a0a; font-size: 0.95rem;
  font-family: "Inter", sans-serif; color: #f5f5f5;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-phone-row input:focus-visible,
.login-phone-row input:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,0.15); outline: none;
}
.login-phone-row input::placeholder { color: #666; }

.login-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 8px; }
.login-actions button {
  flex: 1; min-width: 120px; padding: 14px 20px;
  border-radius: 8px; border: none;
  font-weight: 700; font-size: 1rem; font-family: "Inter", sans-serif;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.login-actions button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.login-primary {
  background: #ff6b00; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important;
}
.login-primary:hover:not(:disabled) { background: #ff8533; }
.login-primary:active:not(:disabled) { transform: scale(0.98); }
.login-ghost { background: transparent; color: #999 !important; border: 1px solid rgba(255,255,255,0.1) !important; }
.login-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.05); color: #f5f5f5 !important; }

.login-error { margin: 0 0 1rem; padding: 12px 14px; border-radius: 8px; background: rgba(255,100,120,0.08); color: #ffb4b4; border: 1px solid rgba(255,100,120,0.3); font-size: .86rem; }

.login-loading { text-align: center; padding: 12px 0; color: #999; font-size: .92rem; }
.login-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #ff6b00;
  margin: 0 auto 1rem; animation: login-spin .9s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-timer { font-variant-numeric: tabular-nums; font-size: 1.25rem; font-weight: 700; margin: .5rem 0 0; color: #ff6b00; }

.login-success { text-align: center; }
.login-success-icon { font-size: 2.5rem; margin-bottom: .25rem; }

.login-card .code-input {
  width: 100%; padding: 14px 18px; letter-spacing: .5em; text-align: center;
  font-size: 1.2rem; font-variant-numeric: tabular-nums; font-weight: 600;
  font-family: "Inter", sans-serif; color: #f5f5f5;
  background: #0a0a0a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; margin-bottom: 12px;
}
.code-input:focus { border-color: #ff6b00; box-shadow: 0 0 0 3px rgba(255,107,0,0.15); }
.code-input::placeholder { color: #444; letter-spacing: .35em; }

.login-tos, .login-card > p:last-child { margin: 18px 0 0; font-size: .78rem; color: #999; text-align: center; }
.login-tos a, .login-card > p:last-child a { color: #ff6b00; text-decoration: none; }
.login-tos a:hover, .login-card > p:last-child a:hover { text-decoration: underline; }
