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

  :root {
    color-scheme: light;
    --bg: #f3f4f8;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-hover: rgba(255, 255, 255, 0.96);
    --border: rgba(20, 20, 32, 0.08);
    --border-hover: rgba(20, 20, 32, 0.16);
    --text: #16161d;
    --muted: #5c5c6a;
    --dim: #8b8b9a;
    --cyan: #0891b2;
    --radius: 16px;
    --input-bg: rgba(255, 255, 255, 0.92);
    --blob-a: rgba(124, 108, 240, 0.14);
    --blob-b: rgba(34, 211, 238, 0.10);
  }

  html.dark {
    color-scheme: dark;
    --bg: #08080d;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text: #ececf1;
    --muted: #8b8b9a;
    --dim: #5c5c6a;
    --cyan: #22d3ee;
    --input-bg: rgba(0, 0, 0, 0.25);
    --blob-a: rgba(124, 108, 240, 0.16);
    --blob-b: rgba(34, 211, 238, 0.08);
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    overflow-x: hidden;
  }

  body::before,
  body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
  }

  body::before {
    width: 420px;
    height: 420px;
    background: var(--blob-a);
    top: -140px;
    right: -100px;
  }

  body::after {
    width: 320px;
    height: 320px;
    background: var(--blob-b);
    bottom: -120px;
    left: -80px;
  }

  .theme-toggle {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
  }

  .auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
  }

  .auth-brand {
    text-align: center;
    margin-bottom: 24px;
  }

  .auth-logo {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
  }

  .auth-title {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
  }

  .auth-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
  }

  .field {
    margin-bottom: 16px;
  }

  .field label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
  }

  .field input:focus {
    border-color: rgba(34, 211, 238, 0.45);
  }

  .btn-primary {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
  }

  .btn-primary:hover { opacity: 0.92; }
  .btn-primary:active { transform: scale(0.98); }
  .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

  .auth-error {
    margin-top: 12px;
    font-size: 13px;
    color: #f87171;
    text-align: center;
  }

  .auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
  }

  .auth-footer a {
    color: var(--cyan);
    text-decoration: none;
  }

  .auth-footer a:hover { text-decoration: underline; }

  .back-home {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
  }

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