:root {
  color: #eef7ff;
  background:
    radial-gradient(circle at 28% 18%, rgba(0, 229, 255, 0.2), transparent 24%),
    radial-gradient(circle at 72% 30%, rgba(255, 43, 214, 0.17), transparent 26%),
    linear-gradient(180deg, #080816 0%, #120824 48%, #050510 100%);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.login-body {
  min-height: 100vh;
}

.particles,
.login-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.login-glow {
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 229, 255, 0.22), transparent 28%),
    radial-gradient(circle at 54% 72%, rgba(255, 43, 214, 0.16), transparent 33%);
  filter: blur(8px);
}

.particle {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.85), rgba(255, 43, 214, 0.42), transparent 72%);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-110vh) scale(0.3); opacity: 0; }
}

.auth-card {
  position: relative;
  width: min(430px, calc(100% - 28px));
  margin: 28px auto;
  padding: 28px 24px 22px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 14, 38, 0.9), rgba(16, 8, 28, 0.92)),
    rgba(8, 8, 22, 0.9);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 36px rgba(0, 229, 255, 0.12),
    inset 0 0 28px rgba(255, 43, 214, 0.06);
  backdrop-filter: blur(14px);
}

.auth-logo {
  width: 168px;
  height: 168px;
  margin: -4px auto 6px;
  overflow: hidden;
  border-radius: 18px;
  background: #080b22;
  filter: drop-shadow(0 0 18px rgba(0, 229, 255, .2));
  -webkit-mask-image: radial-gradient(ellipse at center, #000 68%, rgba(0, 0, 0, .9) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 68%, rgba(0, 0, 0, .9) 78%, transparent 100%);
}

.auth-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: .96;
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 1.85rem;
  letter-spacing: 0;
  color: #f7fbff;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 800;
  text-shadow:
    0 0 14px rgba(0, 229, 255, 0.48),
    0 0 28px rgba(255, 43, 214, 0.3);
}

.auth-subtitle {
  margin: 6px 0 18px;
  text-align: center;
  color: #6eeeff;
  font-size: 0.95rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.auth-tab {
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #8defff;
  height: 46px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(255, 43, 214, 0.28));
  color: #ffffff;
  border-color: rgba(0, 229, 255, 0.56);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.16);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #93f6ff;
}

.input-wrapper {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
}

.input-icon {
  text-align: center;
  color: #ff4fd8;
}

.form-input {
  width: 100%;
  border: 0;
  outline: none;
  height: 48px;
  background: transparent;
  color: #eef7ff;
  padding: 0 14px 0 0;
}

.form-input::placeholder {
  color: rgba(238, 247, 255, 0.42);
}

.input-wrapper:focus-within {
  border-color: rgba(0, 229, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1), 0 0 18px rgba(255, 43, 214, 0.12);
}

.form-error {
  min-height: 20px;
  color: #ff7b7b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-submit {
  border: 0;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  color: #06101a;
  font-weight: 800;
  background: linear-gradient(135deg, #00e5ff, #ff2bd6);
  box-shadow: 0 10px 28px rgba(0, 229, 255, 0.24), 0 0 26px rgba(255, 43, 214, 0.2);
}

.auth-submit:hover {
  transform: translateY(-1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.auth-submit.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-submit.is-loading::before {
  width: 16px;
  height: 16px;
  content: "";
  border: 2px solid rgba(6, 16, 26, 0.3);
  border-top-color: #06101a;
  border-radius: 50%;
  animation: auth-submit-spin 700ms linear infinite;
}

@keyframes auth-submit-spin {
  to { transform: rotate(360deg); }
}

.auth-footer {
  margin: 18px 0 0;
  text-align: center;
  color: rgba(238, 247, 255, 0.62);
  font-size: 0.82rem;
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgba(3, 4, 14, 0.72);
  backdrop-filter: blur(8px);
}

.auth-modal-overlay.active {
  display: block;
}

.auth-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 41;
  display: none;
  width: min(340px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 17, 44, 0.98), rgba(22, 9, 36, 0.98)),
    rgba(8, 8, 22, 0.96);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.58),
    0 0 28px rgba(0, 229, 255, 0.18),
    inset 0 0 24px rgba(255, 43, 214, 0.08);
  padding: 24px 22px 20px;
  text-align: center;
}

.auth-modal.active {
  display: block;
  animation: authModalIn 0.22s ease;
}

@keyframes authModalIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.auth-modal-title {
  margin: 0 0 10px;
  color: #f7fbff;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.auth-modal-message {
  margin: 0 0 18px;
  color: rgba(238, 247, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.7;
}

.auth-modal-button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #06101a;
  font-weight: 800;
  background: linear-gradient(135deg, #00e5ff, #ff2bd6);
  box-shadow: 0 10px 24px rgba(0, 229, 255, 0.18);
}

@media (max-width: 520px) {
  .auth-card {
    width: calc(100% - 16px);
    margin: 16px auto;
    padding: 24px 16px 18px;
  }
}
.sms-code-row { display:grid; grid-template-columns:minmax(0,1fr) 118px; gap:10px; align-items:stretch; }
.sms-send-button { border:1px solid #42c7e8; border-radius:8px; background:rgba(41,92,125,.45); color:#9eefff; font-weight:700; cursor:pointer; }
.sms-send-button:disabled { opacity:.55; cursor:not-allowed; }
.registered-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 7, 25, .72); }
.registered-dialog { position: relative; width: min(360px, 100%); box-sizing: border-box; padding: 30px 24px 24px; border: 1px solid #42c7e8; border-radius: 14px; background: #17152d; color: #dff8ff; text-align: center; box-shadow: 0 12px 50px rgba(0, 0, 0, .5); font-size: 18px; }
.registered-close { position: absolute; right: 10px; top: 6px; border: 0; background: none; color: #9eefff; font-size: 26px; line-height: 1; cursor: pointer; }
.registered-login { margin-top: 18px; padding: 10px 28px; border: 0; border-radius: 8px; background: linear-gradient(90deg, #43c9ed, #d43bdd); color: #101328; font-weight: 700; cursor: pointer; }
