:root {
      --bg: #f7f8ff;
      --panel: #ffffff;
      --line: #e4e8f5;
      --text: #0f1720;
      --muted: #5d6488;
      --cyan: #7c3aed;
      --violet: #8b5cf6;
      --radius: 16px;
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; }
    body {
      min-height: 100vh;
      font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
      color: var(--text);
      background: linear-gradient(180deg, #f7f8ff 0%, #eff2fe 100%);
      display: flex;
      flex-direction: column;
    }
    .wrap {
      flex: 1;
      display: grid;
      place-items: center;
      padding: 42px 16px 22px;
    }
    .card {
      width: min(460px, 100%);
      border-radius: var(--radius);
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: 0 18px 46px rgba(35, 40, 85, 0.08);
      padding: 24px;
    }
    .login-brand { text-align: center; }
    .login-logo-wrap {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 14px;
      min-height: 52px;
    }
    .brand-dot {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: linear-gradient(130deg, var(--violet), var(--cyan));
      box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
    }
    .brand-logo {
      display: none;
      width: 48px;
      height: 48px;
      border-radius: 12px;
      object-fit: cover;
      box-shadow: 0 0 20px rgba(20, 240, 255, 0.25);
    }
    .title-mecha {
      margin: 0 0 10px;
      text-align: center;
      line-height: 1.35;
    }
    /* 机甲风：渐变金属感 + 轻微光晕（中文用 Noto 黑体加字距） */
    .title-mecha .site-title-text {
      display: inline-block;
      font-family: "Noto Sans SC", sans-serif;
      font-weight: 900;
      font-size: clamp(20px, 4.2vw, 28px);
      letter-spacing: 0.16em;
      text-indent: 0.1em;
      background: linear-gradient(135deg, #6c63ff, #8f87ff);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      filter: none;
    }
    .sub {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }
    .tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 16px;
    }
    .tab {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #f7f8ff;
      color: #5d6488;
      padding: 9px 6px;
      font-size: 12px;
      cursor: pointer;
      line-height: 1.35;
    }
    .tab.active {
      border-color: #ddd6fe;
      color: #6d28d9;
      background: #f8fafc;
      box-shadow: none;
      font-weight: 700;
    }
    .panel { display: none; }
    .panel.active { display: block; }
    .register-panel,
    .forgot-panel { display: block; }
    .field {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }
    .field:first-of-type { margin-top: 0; }
    label { font-size: 13px; color: #5d6488; font-weight: 600; }
    input {
      width: 100%;
      border: 1px solid #e4e8f5;
      border-radius: 10px;
      background: #ffffff;
      color: var(--text);
      padding: 12px 12px;
      font-size: 14px;
      outline: none;
    }
    input:focus { border-color: #c4b5fd; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); }
    .row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
    .btn {
      width: 100%;
      border: 1px solid transparent;
      border-radius: 11px;
      padding: 12px 14px;
      margin-top: 16px;
      font-size: 14px;
      cursor: pointer;
      background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
      color: #ffffff;
      font-weight: 700;
    }
    .btn:hover { filter: brightness(1.06); }
    .btn-code {
      width: 108px;
      height: 42px;
      margin: 0;
      background: #f7f8ff;
      border: 1px solid #ddd6fe;
      color: #6d28d9;
      font-weight: 600;
      border-radius: 10px;
      cursor: pointer;
      font-size: 12px;
    }
    .captcha-line {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }
    .captcha-line .captcha-input-slot {
      flex: 1;
      min-width: 100px;
    }
    .captcha-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .captcha-img {
      height: 40px;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      border: 1px solid var(--line);
      background: #f7f8ff;
    }
    .captcha-img svg { display: block; height: 40px; width: auto; }
    .link-refresh {
      background: none;
      border: none;
      color: #6d28d9;
      font-size: 13px;
      cursor: pointer;
      padding: 4px;
      white-space: nowrap;
    }
    .options-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 12px;
      font-size: 13px;
      color: var(--muted);
    }
    .options-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 400; color: var(--muted); }
    .options-row input[type="checkbox"] { width: auto; margin: 0; }
    .link-forgot {
      background: none;
      border: none;
      color: #6d28d9;
      cursor: pointer;
      font-size: 13px;
      padding: 0;
    }
    .register-hint {
      text-align: center;
      margin: 16px 0 0;
      font-size: 14px;
      color: var(--muted);
    }
    .link-inline {
      background: none;
      border: none;
      color: #6d28d9;
      cursor: pointer;
      font-size: 14px;
      padding: 0;
      font-weight: 600;
      text-decoration: underline;
      text-underline-offset: 3px;
    }
    .link-back {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 13px;
      cursor: pointer;
      margin-bottom: 8px;
      padding: 0;
    }
    .forgot-extra {
      text-align: center;
      margin-top: 12px;
      font-size: 13px;
      color: #9cc3db;
    }
    .msg {
      margin-top: 12px;
      padding: 9px 10px;
      border-radius: 10px;
      font-size: 12px;
      display: none;
    }
    .msg.show { display: block; }
    .msg.ok {
      border: 1px solid #bbf7d0;
      color: #166534;
      background: #ecfdf5;
    }
    .msg.err {
      border: 1px solid #fecaca;
      color: #b91c1c;
      background: #fef2f2;
    }
    footer.foot {
      flex-shrink: 0;
      width: 100%;
      padding: 16px 16px 28px;
      text-align: center;
      font-size: 12px;
    }
    .foot-links {
      margin-bottom: 0;
    }
    .foot a { color: #6d28d9; cursor: pointer; text-decoration: none; }
    .foot a:hover { color: #7c3aed; }
    .sep { margin: 0 8px; color: #94a3b8; }
    .foot-copy {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      line-height: 1.7;
      color: var(--muted);
      font-size: 12px;
      max-width: 520px;
      margin-left: auto;
      margin-right: auto;
    }
    .foot-copy > div {
      color: #64748b;
    }
    .foot-copy > div + div {
      margin-top: 6px;
      font-size: 11px;
      color: #94a3b8;
    }
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(15, 23, 32, 0.45);
      backdrop-filter: blur(4px);
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .modal-overlay.open { display: flex; }
    .modal-box {
      width: min(520px, 100%);
      max-height: min(80vh, 640px);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      border-radius: 14px;
      border: 1px solid var(--line);
      background: #ffffff;
      box-shadow: 0 24px 60px rgba(32, 37, 76, 0.12);
    }
    .modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      font-weight: 700;
      color: var(--text);
    }
    .modal-close {
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }
    .modal-body {
      padding: 16px;
      overflow-y: auto;
      font-size: 14px;
      line-height: 1.75;
      color: #334155;
      white-space: pre-wrap;
      word-break: break-word;
    }
    @media (max-width: 400px) {
      .tabs { grid-template-columns: 1fr; }
    }
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }
    .auth-home-link {
      position: fixed;
      top: 16px;
      left: 16px;
      z-index: 100;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 10px;
      border: 1px solid #e4e8f5;
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(12px);
      color: #5b648f;
      font-size: 13px;
      text-decoration: none;
      font-weight: 600;
      box-shadow: 0 4px 20px rgba(32, 37, 76, 0.08);
    }
    .auth-home-link:hover {
      border-color: #ddd6fe;
      color: #6d28d9;
      background: #fff;
    }
