*, *::after, *::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  background-color: #ecf0f3;
  color: #a0a5a8;
}

.main {
  position: relative;
  width: 1000px;
  min-width: 1000px;
  min-height: 600px;
  height: 600px;
  padding: 25px;
  background-color: #ecf0f3;
  box-shadow: 10px 10px 10px #d1d9e6, -10px -10px 10px #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .main {
    transform: scale(0.7);
  }
}

@media (max-width: 1000px) {
  .main {
    transform: scale(0.6);
  }
}

@media (max-width: 800px) {
  .main {
    transform: scale(0.5);
  }
}

@media (max-width: 600px) {
  .main {
    transform: scale(0.4);
  }
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  width: 600px;
  height: 100%;
  padding: 25px;
  background-color: #ecf0f3;
  transition: 1.25s;
}

.form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.form__input {
  width: 350px;
  height: 40px;
  margin: 4px 0;
  padding-left: 25px;
  font-size: 13px;
  letter-spacing: 0.15px;
  border: none;
  outline: none;
  font-family: "Montserrat", sans-serif;
  background-color: #ecf0f3;
  transition: 0.25s ease;
  border-radius: 8px;
  box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
}

.form__input:focus {
  box-shadow: inset 4px 4px 4px #d1d9e6, inset -4px -4px 4px #f9f9f9;
}

.form__span {
  margin-top: 30px;
  margin-bottom: 12px;
}

.form__link {
  color: #181818;
  font-size: 15px;
  margin-top: 25px;
  border-bottom: 1px solid #a0a5a8;
  line-height: 2;
  cursor: pointer;
  text-decoration: none;
}

.form__link:hover {
  border-bottom-color: #4B70E2;
  color: #4B70E2;
}

.form__remember {
  display: flex;
  align-items: center;
  margin-top: 15px;
  font-size: 13px;
}

.form__remember input {
  margin-right: 8px;
  cursor: pointer;
}

.form__remember label {
  cursor: pointer;
  color: #181818;
}

.title {
  font-size: 34px;
  font-weight: 700;
  line-height: 3;
  color: #181818;
}

.description {
  font-size: 14px;
  letter-spacing: 0.25px;
  text-align: center;
  line-height: 1.6;
}

.button {
  width: 180px;
  height: 50px;
  border-radius: 25px;
  margin-top: 50px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.15px;
  background-color: #4B70E2;
  color: #f9f9f9;
  box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #f9f9f9;
  border: none;
  outline: none;
  cursor: pointer;
  transition: 0.25s;
}

.button:hover {
  box-shadow: 6px 6px 10px #d1d9e6, -6px -6px 10px #f9f9f9;
  transform: scale(0.985);
}

.button:active {
  box-shadow: 2px 2px 6px #d1d9e6, -2px -2px 6px #f9f9f9;
  transform: scale(0.97);
}

/* 容器位置 */
.a-container {
  z-index: 100;
  left: calc(100% - 600px);
}

.b-container {
  left: calc(100% - 600px);
  z-index: 0;
}

.switch {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 400px;
  padding: 50px;
  z-index: 200;
  transition: 1.25s;
  background-color: #ecf0f3;
  overflow: hidden;
  box-shadow: 4px 4px 10px #d1d9e6, -4px -4px 10px #f9f9f9;
}

.switch__circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background-color: #ecf0f3;
  box-shadow: inset 8px 8px 12px #d1d9e6, inset -8px -8px 12px #f9f9f9;
  bottom: -60%;
  left: -60%;
  transition: 1.25s;
}

.switch__circle--t {
  top: -30%;
  left: 60%;
  width: 300px;
  height: 300px;
}

.switch__container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: absolute;
  width: 400px;
  padding: 50px 55px;
  transition: 1.25s;
}

.switch__button {
  cursor: pointer;
}

.switch__button:hover {
  box-shadow: 6px 6px 10px #d1d9e6, -6px -6px 10px #f9f9f9;
  transform: scale(0.985);
  transition: 0.25s;
}

.switch__button:active,
.switch__button:focus {
  box-shadow: 2px 2px 6px #d1d9e6, -2px -2px 6px #f9f9f9;
  transform: scale(0.97);
  transition: 0.25s;
}

/* 动画类 */
.is-txr {
  left: calc(100% - 400px);
  transition: 1.25s;
  transform-origin: left;
}

.is-txl {
  left: 0;
  transition: 1.25s;
  transform-origin: right;
}

.is-z200 {
  z-index: 200;
  transition: 1.25s;
}

.is-hidden {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  transition: 1.25s;
}

.is-gx {
  animation: is-gx 1.25s;
}

@keyframes is-gx {
  0%, 10%, 100% {
    width: 400px;
  }
  30%, 50% {
    width: 500px;
  }
}

.error-message {
  background-color: #ffe5e5;
  color: #d32f2f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13px;
  width: 350px;
  box-shadow: inset 2px 2px 4px rgba(211, 47, 47, 0.1);
}

.error-message p {
  margin: 4px 0;
}

/* 注册通道切换胶囊 */
.register-channel-toggle {
  display: flex;
  width: 350px;
  height: 50px;
  background-color: #ecf0f3;
  border-radius: 25px;
  padding: 4px;
  box-shadow: inset 3px 3px 6px #d1d9e6, inset -3px -3px 6px #f9f9f9;
  margin-bottom: 30px;
  position: relative;
}

.channel-toggle-btn {
  flex: 1;
  height: 42px;
  border-radius: 21px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  outline: none;
  cursor: pointer;
  background-color: transparent;
  color: #a0a5a8;
  transition: all 0.3s ease;
  font-family: "Montserrat", sans-serif;
  position: relative;
  z-index: 1;
}

.channel-toggle-btn:hover:not(.active) {
  color: #4B70E2;
}

.channel-toggle-btn.active {
  background-color: #4B70E2;
  color: #f9f9f9;
  box-shadow: 4px 4px 8px #d1d9e6, -4px -4px 8px #f9f9f9;
}

.channel-toggle-btn:active {
  transform: scale(0.98);
}

/* 表单提示文字 */
.form__hint {
  display: block;
  width: 350px;
  font-size: 11px;
  color: #7a8085;
  margin-top: -2px;
  margin-bottom: 8px;
  padding-left: 10px;
  line-height: 1.4;
}

/* 密码输入框容器 */
.password-input-wrapper {
  position: relative;
  width: 350px;
  margin: 4px 0;
}

.password-input-wrapper .form__input {
  width: 100%;
  padding-right: 45px;
  margin: 0;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0a5a8;
  transition: color 0.3s ease;
  outline: none;
}

.password-toggle:hover {
  color: #4B70E2;
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle svg {
  display: block;
}

/* 验证码容器 */
.captcha-wrapper {
  width: 350px;
  margin: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.captcha-wrapper > div {
  width: 100%;
}

/* 适配阿里云验证码样式 */
.captcha-wrapper #nc_1_wrapper,
.captcha-wrapper .nc-container {
  width: 100% !important;
}

.captcha-wrapper .nc_scale {
  background-color: #ecf0f3 !important;
  box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9 !important;
  border: none !important;
  border-radius: 8px !important;
}

/* 注册表单容器 */
.register-form {
  width: 100%;
  position: relative;
}

/* 表单切换动画 - 滑动效果 */
@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-30px);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(30px);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.register-form.slide-out-left {
  animation: slideOutLeft 0.3s ease-out forwards;
}

.register-form.slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.register-form.slide-out-right {
  animation: slideOutRight 0.3s ease-out forwards;
}

.register-form.slide-in-left {
  animation: slideInLeft 0.3s ease-out forwards;
}
