/* ═══════════════════════════════════════════════
   零域 ZEROX · 登录 / 注册 / 申诉
   与官网一致的深空科技设计语言
   ═══════════════════════════════════════════════ */

:root {
  --bg: #07090f;
  --bg-2: #0b0e17;
  --bg-3: #10141f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-2: #a3aac2;
  --text-3: #6b7288;
  --primary: #6d7cff;
  --cyan: #4de3ff;
  --green: #3df5a6;
  --red: #ff5d7a;
  --grad: linear-gradient(100deg, #6d7cff 0%, #9d6bff 45%, #4de3ff 100%);
  --font-cn: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: "Space Grotesk", "Noto Sans SC", sans-serif;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  line-height: 1.7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { list-style: none; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─────────── 背景 ─────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(109, 124, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 124, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: 0; border-radius: 50%;
  filter: blur(120px); pointer-events: none;
}
.bg-glow--1 {
  width: 560px; height: 560px; top: -180px; left: -120px;
  background: rgba(109, 124, 255, 0.18);
}
.bg-glow--2 {
  width: 480px; height: 480px; bottom: -160px; right: -100px;
  background: rgba(77, 227, 255, 0.1);
}

.back-home {
  position: fixed; top: 26px; left: 30px; z-index: 10;
  font-size: 14px; color: var(--text-3);
  transition: color 0.25s;
}
.back-home:hover { color: var(--text); }

/* ─────────── 布局 ─────────── */
.auth-wrap {
  position: relative; z-index: 2;
  display: flex;
  width: min(980px, calc(100% - 40px));
  min-height: 620px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(13, 16, 26, 0.72);
  backdrop-filter: blur(24px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ─────────── 表单卡 ─────────── */
.auth-card {
  flex: 1 1 480px;
  padding: 52px 56px 40px;
  display: flex;
  flex-direction: column;
}

.auth-logo {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 38px;
}
.auth-logo svg { width: 42px; height: 42px; border-radius: 12px; }
.auth-logo span { font-family: var(--font-en); font-weight: 700; font-size: 20px; }
.auth-logo em {
  font-style: normal; margin-left: 6px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.auth-pane { display: none; flex-direction: column; flex: 1; }
.auth-pane.active { display: flex; animation: paneIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes paneIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

.auth-pane h1 { font-size: 30px; font-weight: 700; letter-spacing: 0.5px; }
.auth-sub { color: var(--text-3); font-size: 14px; margin: 8px 0 28px; }

/* ─────────── 表单控件 ─────────── */
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.field__box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field__box:focus-within {
  border-color: rgba(109, 124, 255, 0.7);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.14);
}
.field__box > svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.field__box input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 14px 0;
}
.field__box input::placeholder { color: var(--text-3); }
.field.invalid .field__box { border-color: rgba(255, 93, 122, 0.7); }
.field__err {
  display: block; min-height: 18px;
  font-size: 12px; color: var(--red);
  margin-top: 5px; opacity: 0; transform: translateY(-3px);
  transition: opacity 0.25s, transform 0.25s;
}
.field.invalid .field__err { opacity: 1; transform: none; }

.field__eye { color: var(--text-3); display: flex; padding: 4px; transition: color 0.2s; }
.field__eye:hover { color: var(--text); }
.field__eye svg { width: 19px; height: 19px; }

.field__box--code input { flex: 1; }
.code-btn {
  flex-shrink: 0;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  padding: 8px 14px; border-radius: 9px;
  border: 1px solid rgba(109, 124, 255, 0.4);
  transition: background 0.25s;
  white-space: nowrap;
}
.code-btn:hover:not(:disabled) { background: rgba(109, 124, 255, 0.14); }
.code-btn:disabled { color: var(--text-3); border-color: var(--border); cursor: not-allowed; }

.textarea {
  width: 100%; resize: vertical;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 13px 16px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.textarea:focus {
  border-color: rgba(109, 124, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.14);
}
.textarea::placeholder { color: var(--text-3); }

/* ─────────── 行内工具 ─────────── */
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2px 0 22px;
}
.remember {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.remember input { display: none; }
.remember i {
  width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: inline-block; position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.remember input:checked + i {
  background: var(--primary);
  border-color: var(--primary);
}
.remember input:checked + i::after {
  content: ""; position: absolute;
  left: 4.5px; top: 1.5px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.link-btn {
  font-size: 13px; color: var(--primary); font-weight: 500;
  transition: color 0.2s;
}
.link-btn:hover { color: var(--cyan); }

/* ─────────── 按钮 ─────────── */
.btn-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  font-size: 16px; font-weight: 700; letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(100deg, #5a6bff, #8d5bff);
  box-shadow: 0 8px 30px rgba(109, 124, 255, 0.4);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, filter 0.25s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(77, 227, 255, 0.4); filter: brightness(1.08); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-submit .spin {
  width: 17px; height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0 16px;
  color: var(--text-3); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.btn-secondary {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transition: background 0.25s, border-color 0.25s;
}
.btn-secondary:hover { background: var(--surface-2); border-color: rgba(109, 124, 255, 0.6); }

.appeal-entry {
  margin-top: auto;
  padding-top: 26px;
  font-size: 13px; color: var(--text-3);
  text-align: center;
  transition: color 0.2s;
}
.appeal-entry b { color: var(--primary); font-weight: 600; }
.appeal-entry:hover b { color: var(--cyan); }

.auth-agree { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 14px; }
.pane-switch { margin-top: 22px; align-self: center; }

/* ─────────── 右侧卖点 ─────────── */
.auth-side {
  flex: 1 1 420px;
  padding: 60px 52px;
  background:
    radial-gradient(ellipse 90% 70% at 80% 10%, rgba(109, 124, 255, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(109, 124, 255, 0.1), rgba(77, 227, 255, 0.04));
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
}
.auth-side h2 { font-size: 34px; font-weight: 900; line-height: 1.35; margin-bottom: 30px; }
.auth-side li {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-2); font-size: 15px;
  padding: 9px 0;
}
.auth-side li i {
  font-style: normal;
  width: 22px; height: 22px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 12px; color: var(--green);
  background: rgba(61, 245, 166, 0.12);
  border: 1px solid rgba(61, 245, 166, 0.3);
}
.auth-side__stats {
  display: flex; gap: 34px;
  margin-top: 42px; padding-top: 30px;
  border-top: 1px solid var(--border);
}
.auth-side__stats b {
  display: block;
  font-family: var(--font-en);
  font-size: 24px; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.auth-side__stats span { font-size: 12px; color: var(--text-3); }

/* ─────────── Toast ─────────── */
.toast-wrap {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(16, 20, 31, 0.92);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; align-items: center; gap: 9px;
}
.toast--ok { border-color: rgba(61, 245, 166, 0.5); }
.toast--ok::before { content: "✓"; color: var(--green); font-weight: 700; }
.toast--err { border-color: rgba(255, 93, 122, 0.5); }
.toast--err::before { content: "✕"; color: var(--red); font-weight: 700; }
.toast.out { animation: toastOut 0.3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ─────────── 响应式 ─────────── */
@media (max-width: 900px) {
  .auth-side { display: none; }
  .auth-wrap { min-height: auto; }
  .auth-card { padding: 42px 30px 32px; }
  body { align-items: flex-start; padding: 70px 0 30px; }
}

:root[data-theme="light"] { --bg:#f4f7fb; --bg-2:#eaf0f7; --bg-3:#fff; --surface:rgba(255,255,255,.88); --surface-2:rgba(226,234,245,.92); --border:rgba(34,52,78,.13); --border-strong:rgba(34,52,78,.22); --text:#172238; --text-2:#52627a; --text-3:#748198; --primary:#5265dc; --cyan:#168fb0; --grad:linear-gradient(100deg,#5265dc 0%,#7752cc 48%,#168fb0 100%); }
:root[data-theme="light"] .auth-wrap { background:rgba(255,255,255,.82); box-shadow:0 28px 80px rgba(52,74,108,.18); }
.theme-toggle { position:fixed; top:22px; right:24px; z-index:20; width:auto; min-width:78px; padding:8px 12px; border:1px solid var(--border); background:var(--surface); border-radius:10px; }
.theme-toggle__icon { font-size:17px; line-height:1; }
.theme-toggle__label { font-size:12px; }
