:root {
  --ink: #1c1917;
  --ink-soft: #57534e;
  --muted: #78716c;
  --line: #e7e5e4;
  --input-bg: #fafaf9;
  --white: #ffffff;
  --error-bg: #fef2f2;
  --error-text: #dc2626;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: #ea580c;
  --hero-bg: linear-gradient(165deg, #D0E1F9 0%, #FFFFFF 48%, #FCE4EC 100%);
  --focus-ring: rgba(234, 88, 12, 0.14);
  --btn-bg: linear-gradient(135deg, #292524 0%, #44403c 100%);
  --btn-shadow: 0 8px 24px rgba(28, 25, 23, 0.18);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #fafaf9;
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

@media (min-width: 520px) {
  body {
    background: #f5f5f4;
  }

  .auth-shell {
    margin-top: 24px;
    margin-bottom: 24px;
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(28, 25, 23, 0.08);
    overflow: hidden;
  }
}

/* —— 顶部品牌区 —— */
.auth-hero {
  position: relative;
  padding: 48px 28px 56px;
  flex-shrink: 0;
  min-height: 240px;
  background: var(--hero-bg);
  color: var(--ink);
  overflow: hidden;
}

.auth-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}

.auth-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208, 225, 249, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
}

.auth-hero-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.2);
}

.auth-hero-brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.auth-hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  position: relative;
}

.auth-hero-sub {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
}

/* —— 表单主体 —— */
.auth-body {
  flex: 1;
  padding: 12px 28px 32px;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.auth-card-mobile {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--error-bg);
  color: var(--error-text);
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid #fecaca;
}

.auth-error.show {
  display: block;
}

.auth-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* —— 表单字段 —— */
.auth-field-block {
  margin-bottom: 22px;
}

.auth-field-block label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  padding: 0 44px 0 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input-wrap input:focus {
  border-color: #fdba74;
  background: var(--white);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auth-input-wrap input::placeholder {
  color: #a8a29e;
}

.auth-input-clear {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #e7e5e4;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.auth-input-clear:hover {
  background: #d6d3d1;
  color: var(--ink);
}

.auth-input-clear[hidden] {
  display: none;
}

.auth-code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.auth-code-row .auth-input-wrap {
  flex: 1;
}

.auth-code-row input {
  padding-right: 16px;
}

.auth-sms-btn {
  flex-shrink: 0;
  min-width: 108px;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #fdba74;
  border-radius: 12px;
  background: var(--white);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s, border-color 0.2s;
}

.auth-sms-btn:hover:not(:disabled) {
  background: #fff7ed;
}

.auth-sms-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
}

.auth-sms-btn.is-counting {
  border-color: var(--line);
  color: var(--muted);
  background: #f5f5f4;
}

/* —— 主按钮 —— */
.auth-btn-primary {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: none;
  border-radius: 9999px;
  background: var(--btn-bg);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.auth-btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.24);
  transform: translateY(-1px);
}

.auth-btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.16);
}

.auth-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* —— 链接 —— */
.auth-link-row {
  text-align: center;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-link {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-field-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.banned-page .auth-hero-title,
.banned-page .auth-hero-sub {
  display: none;
}

.banned-card {
  text-align: center;
}

.banned-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
}

.banned-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.banned-message {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.banned-account {
  margin: -8px 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.banned-details {
  margin-bottom: 24px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}

.banned-details p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.banned-details p:last-child {
  margin-bottom: 0;
}

.banned-details strong {
  color: var(--ink);
  font-weight: 600;
}

.banned-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

/* 极验官方浮层置于页面最上层，避免被 auth-shell 等遮挡 */
body > .geetest_panel,
body > .geetest_popup_wrap,
body > .geetest_holder,
body > div[class*='geetest'] {
  z-index: 10000 !important;
}
