.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 560px at 15% -10%, rgba(99, 102, 241, 0.2), transparent 62%),
    radial-gradient(900px 520px at 112% 112%, rgba(236, 72, 153, 0.09), transparent 60%),
    #0a0a0a;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 5vw, 64px);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.login-back {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.2s ease;
}

.login-back:hover {
  color: var(--text-bright);
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 56px;
}

.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 38px 34px 30px;
  border: 1px solid #262626;
  border-radius: 18px;
  background: #121212;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.7), transparent);
}

.login-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-sub {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- 登录方式切换 ---------- */
.login-tabs {
  display: flex;
  gap: 6px;
  margin-top: 22px;
  padding: 4px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: #171717;
}

.login-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #8b8b9b;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.login-tab:hover {
  color: var(--text-bright);
}

.login-tab.is-active {
  background: rgba(99, 102, 241, 0.18);
  color: var(--text-bright);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.login-panel[hidden],
.login-hint[hidden] {
  display: none;
}

.login-panel .login-form {
  margin-top: 20px;
}

.login-form {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  color: var(--text-muted);
  font-size: 12px;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #2e2e2e;
  border-radius: 9px;
  background: #191919;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: #5f5f5f;
}

.login-input:focus {
  border-color: var(--el-color-primary);
  background: #1d1d24;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.login-code-row {
  display: flex;
  gap: 10px;
}

.login-code-row .login-input {
  flex: 1;
  min-width: 0;
}

.login-code-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #2e2e2e;
  border-radius: 9px;
  background: #191919;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.login-code-btn:hover:not([disabled]) {
  border-color: var(--el-color-primary);
  color: var(--text-bright);
}

.login-code-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #8b8b9b;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.login-agree input {
  margin: 3px 0 0;
  accent-color: var(--el-color-primary);
  flex-shrink: 0;
}

.login-devcode {
  color: #34d399;
  font-size: 12px;
}

.login-devcode[hidden] {
  display: none;
}

.login-error {
  display: none;
  color: #f87171;
  font-size: 12px;
}

.login-error.is-on {
  display: block;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  padding: 12px 20px;
}

.login-submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.login-switch {
  margin-top: 2px;
  color: #8b8b9b;
  font-size: 12px;
  text-align: center;
}

.login-switch a {
  color: var(--el-color-primary);
  transition: color 0.2s ease;
}

.login-switch a:hover {
  color: var(--text-bright);
}

.login-hint {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px dashed #2f2f3c;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
  color: #8b8b9b;
  font-size: 12px;
  line-height: 1.6;
}

.login-legal {
  margin-top: 22px;
  color: var(--text-subtle);
  font-size: 11px;
  text-align: center;
  line-height: 1.7;
}

/* ---------- 滑块验证 ---------- */
.captcha-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.66);
}

.captcha-mask[hidden] {
  display: none;
}

.captcha-dialog {
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid #2b2b2b;
  border-radius: 14px;
  background: #161616;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.captcha-close {
  padding: 0;
  border: none;
  background: none;
  color: #8b8b9b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.captcha-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  background: #101010;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.captcha-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.captcha-piece {
  position: absolute;
  left: 0;
  top: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.captcha-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141414;
  color: #8b8b9b;
  font-size: 12px;
}

.captcha-loading[hidden] {
  display: none;
}

.captcha-bar {
  position: relative;
  height: 44px;
  margin-top: 12px;
  border: 1px solid #2e2e2e;
  border-radius: 9px;
  background: #191919;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.captcha-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: rgba(99, 102, 241, 0.18);
}

.captcha-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b8b9b;
  font-size: 12px;
  pointer-events: none;
}

.captcha-handle {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.5);
  color: #fff;
  font-size: 14px;
  cursor: grab;
}

.captcha-handle:active {
  cursor: grabbing;
}

.captcha-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  margin-top: 12px;
  font-size: 12px;
}

.captcha-refresh {
  padding: 0;
  border: none;
  background: none;
  color: #8b8b9b;
  font-size: 12px;
  cursor: pointer;
}

.captcha-refresh:hover {
  color: var(--text-bright);
}

.captcha-error {
  color: #f87171;
  text-align: right;
}

@media (max-width: 480px) {
  .login-card {
    padding: 30px 22px 24px;
  }
  .login-title {
    font-size: 21px;
  }
}
