  :root {
      --primary: #6d4aff;
      --primary-hover: #5b38e8;
      --primary-soft: #f0ecff;

      --text: #1b1633;
      --muted: #756f8d;
      --line: #e4def5;

      --card: rgba(255, 255, 255, 0.96);
      --input: #fbfaff;
      --footer: #a49db8;

      --shadow: 0 28px 70px rgba(80, 54, 170, 0.16);
    }

    html[data-theme="dark"] {
      --primary: #8b6cff;
      --primary-hover: #9b82ff;
      --primary-soft: rgba(139, 108, 255, 0.16);

      --text: #f7f4ff;
      --muted: #b5accd;
      --line: rgba(255, 255, 255, 0.12);

      --card: rgba(25, 20, 43, 0.92);
      --input: rgba(255, 255, 255, 0.06);
      --footer: #8f86a8;

      --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    }

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

    body {
      min-height: 100vh;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at 18% 18%, rgba(109, 74, 255, 0.16), transparent 32%),
        radial-gradient(circle at 82% 76%, rgba(109, 74, 255, 0.12), transparent 34%),
        linear-gradient(135deg, #fbfaff 0%, #f3efff 52%, #ffffff 100%);
      transition: background 0.25s ease, color 0.25s ease;
    }

    html[data-theme="dark"] body {
      background:
        radial-gradient(circle at 18% 18%, rgba(139, 108, 255, 0.24), transparent 34%),
        radial-gradient(circle at 82% 76%, rgba(87, 60, 180, 0.18), transparent 36%),
        linear-gradient(135deg, #080611 0%, #120e24 52%, #171128 100%);
    }

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

    .header {
      height: 76px;
      padding: 0 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: transparent;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: var(--text);
    }

    .logo {
      width: 40px;
      height: 40px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 19px;
      font-weight: 900;
      background: linear-gradient(145deg, var(--primary), #4f38c9);
      box-shadow: 0 12px 26px rgba(109, 74, 255, 0.28);
    }

    .brand-name {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.04em;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .lang-link,
    .login-link {
      color: var(--muted);
      text-decoration: none;
      font-size: 14px;
      font-weight: 700;
      transition: color 0.18s ease;
    }

    .lang-link:hover,
    .login-link:hover {
      color: var(--primary);
    }

    .theme-toggle {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.46);
      color: var(--text);
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: 0.2s ease;
    }

    html[data-theme="dark"] .theme-toggle {
      background: rgba(255, 255, 255, 0.06);
    }

    .theme-toggle:hover {
      background: var(--primary-soft);
      color: var(--primary);
    }

    .theme-icon {
      width: 11px;
      height: 11px;
      display: block;
    }

    .main {
      flex: 1;
      display: grid;
      place-items: center;
      padding: 36px 20px 70px;
    }

    .register-wrap {
      width: 100%;
      max-width: 460px;
    }

    .register-card {
      width: 100%;
      background: var(--card);
      border: 1px solid rgba(109, 74, 255, 0.12);
      border-radius: 28px;
      padding: 38px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(18px);
    }

    html[data-theme="dark"] .register-card {
      border-color: rgba(255, 255, 255, 0.1);
    }

    .title {
      text-align: center;
      margin-bottom: 30px;
    }

    .title h1 {
      font-size: 32px;
      line-height: 1.16;
      letter-spacing: -0.07em;
      margin-bottom: 10px;
    }

    .title p {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.7;
    }

    .form-group {
      margin-bottom: 18px;
    }

    .form-group label {
      display: block;
      margin-bottom: 8px;
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .account-row {
      display: grid;
      grid-template-columns: 1fr auto 145px;
      gap: 10px;
      align-items: center;
    }

    .at {
      color: var(--muted);
      font-weight: 900;
      font-size: 16px;
    }

    input,
    select {
      width: 100%;
      height: 52px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--input);
      outline: none;
      padding: 0 15px;
      color: var(--text);
      font-size: 15px;
      transition: 0.2s ease;
    }

    select {
      cursor: pointer;
      appearance: none;
      background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
      background-position:
        calc(100% - 18px) 22px,
        calc(100% - 13px) 22px;
      background-size: 5px 5px, 5px 5px;
      background-repeat: no-repeat;
      padding-right: 34px;
    }

    input::placeholder {
      color: #aaa3bc;
    }

    html[data-theme="dark"] input::placeholder {
      color: #8c849d;
    }

    input:focus,
    select:focus {
      border-color: var(--primary);
      background-color: rgba(255, 255, 255, 0.95);
      box-shadow: 0 0 0 4px rgba(109, 74, 255, 0.11);
    }

    html[data-theme="dark"] input:focus,
    html[data-theme="dark"] select:focus {
      background-color: rgba(255, 255, 255, 0.09);
    }

    .password-box {
      position: relative;
    }

    .password-box input {
      padding-right: 52px;
    }

    .password-eye {
      width: 30px;
      height: 30px;
      border: none;
      background: transparent;
      color: var(--muted);
      display: grid;
      place-items: center;
      cursor: pointer;
      border-radius: 9px;
      transition: 0.18s ease;
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
    }

    .password-eye:hover {
      color: var(--primary);
      background: var(--primary-soft);
    }

    .password-eye svg {
      width: 18px;
      height: 18px;
      display: block;
    }

    .email-preview {
      margin-top: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      background: var(--primary-soft);
      color: var(--primary);
      font-size: 13px;
      font-weight: 800;
      word-break: break-all;
    }

    .action-buttons {
      margin-top: 8px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .primary-btn,
    .quick-btn {
      width: 100%;
      height: 54px;
      border-radius: 16px;
      font-size: 15px;
      font-weight: 900;
      cursor: pointer;
      transition: 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .primary-btn {
      border: none;
      background: linear-gradient(135deg, var(--primary), #7c5cff);
      color: #ffffff;
    }

    .primary-btn:hover {
      background: linear-gradient(135deg, var(--primary-hover), #6d4aff);
      transform: translateY(-1px);
      box-shadow: 0 20px 42px rgba(109, 74, 255, 0.36);
    }

    .quick-btn {
      border: 1px solid rgba(109, 74, 255, 0.22);
      background: var(--primary-soft);
      color: var(--primary);
    }

    .quick-btn:hover {
      border-color: rgba(109, 74, 255, 0.36);
      background: rgba(109, 74, 255, 0.16);
      transform: translateY(-1px);
    }

    html[data-theme="dark"] .quick-btn {
      background: rgba(139, 108, 255, 0.12);
      border-color: rgba(139, 108, 255, 0.24);
    }

    button:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      transform: none !important;
    }

    .bottom-text {
      margin-top: 26px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.7;
    }

    .bottom-text a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 800;
    }

    .footer {
      text-align: center;
      color: var(--footer);
      font-size: 13px;
      padding-bottom: 24px;
    }

    .toast {
      position: fixed;
      left: 50%;
      top: 28px;
      transform: translateX(-50%) translateY(18px);
      opacity: 0;
      pointer-events: none;
      padding: 12px 18px;
      border-radius: 999px;
      background: #1b1633;
      color: white;
      font-size: 14px;
      box-shadow: 0 16px 40px rgba(27, 22, 51, 0.22);
      transition: 0.25s ease;
      z-index: 99;
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    @media (max-width: 640px) {
      .header {
        height: auto;
        padding: 22px;
      }

      .brand-name {
        font-size: 18px;
      }

      .login-link {
        display: none;
      }

      .main {
        padding: 24px 16px 48px;
      }

      .register-card {
        padding: 30px 22px;
        border-radius: 24px;
      }

      .title h1 {
        font-size: 29px;
      }

      .account-row {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .at {
        display: none;
      }
    }