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

html,
body {
  height: 100%;
  margin: 0;
  background: #fbfcff;
}

body {
  margin: 0;
  padding: 0;
  background-image: url("./bodybg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

.container {
  display: flex;
  height: 100%;
  width: 100%;
  padding: 0;
}

.left {
  flex: 4;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.right {
  flex: 6;
  border-radius: 42px 0px 0px 42px;
  background: #ffffff;
  box-shadow: 0px 4px 32px 0px rgba(0, 0, 0, 0.04);
  text-align: center;
  position: relative;
  background-image: url("./rightbg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-left: 10%;
}

.title {
  margin-top: 10%;
  font-size: 30px;
  font-weight: normal;
  line-height: 39px;
  text-align: center;
  letter-spacing: 0px;
  color: #0d114f;
  font-family: "DingTalk";
}

.title2 {
  font-size: 20px;
  margin-top: 30px;
  font-weight: normal;
  text-align: center;
  letter-spacing: 0px;
  color: #0d114f;
  font-family: "DingTalk";
}

.login-panel,
.login-panel > #step0Div,
.login-panel > #step1Div {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 520px;
}

.login-input {
  padding: 15px 20px;
  background: #ffffff;
  border: 2px solid #f5f6f7;
  border-radius: 30px;
  width: 100%;
  font-size: 14px;
}

.login-input::placeholder {
  color: #7d8fb3;
  opacity: 1;
}

.login-btn {
  width: 100%;
  height: 48px;
  border-radius: 100px;
  color: #fafafa;
  font-size: 16px;
  background: linear-gradient(100deg, #645cf1 18%, #b55ae4 84%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.aiman {
  position: absolute;
  width: 450px;
  left: 30%;
  top: 50%;
  transform: translateY(-50%);
}

.login-tip {
  margin-top: 20px;
  width: 100%;
  height: 30px;
  line-height: 30px;
  text-align: left;
  padding-left: 12px;
  font-size: 18px;
  color: #cc1414;
}

.vcode {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
  gap: 12px;
}

.vcode img {
  width: 150px;
  cursor: pointer;
}

a {
  color: #4767ff;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  color: #6457f9;
}

.zerob-header__logo {
  position: absolute;
  height: 50px;
  min-height: 50px;
  left: 30px;
  top: 30px;
}

.login-lang-switch {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(72, 78, 120, 0.14);
  color: #4767ff;
  font-size: 20px;
  transition: all 0.2s;
}

.login-lang-switch:hover {
  color: #6457f9;
  background: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 1500px) {
  .aiman {
    left: 15%;
  }
}

@media (max-width: 1200px) {
  .aiman {
    left: 12%;
  }
}

@media (max-width: 768px) {
  .aiman {
    left: 10%;
  }
}

@media (max-width: 480px) {
  .aiman {
    left: 5%;
  }
}

/* ======== 移动端只显示右侧 + logo ======== */
@media (max-width: 768px) {
  /* 整体布局改为单栏 */
  .container {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    padding-top: 100px;
  }

  /* 左侧隐藏 */
  .left {
    display: none;
  }

  /* 右侧独占全屏宽度 */
  .right {
    flex: none;
    width: 90%;
    margin: 20px 0 0 0;
    border-radius: 20px;
    box-shadow: none;
    background-size: cover;
    background-position: center;
    padding: 20px 0 40px;
  }

  /* 调整标题间距 */
  .title {
    margin-top: 0;
    font-size: 26px;
  }

  /* 登录面板尺寸缩小 */
  .login-panel {
    width: 90%;
    gap: 16px;
  }

  /* 输入框缩小 */
  .login-input {
    padding: 12px 18px;
    font-size: 14px;
  }

  /* 登录按钮高度缩小 */
  .login-btn {
    height: 44px;
    font-size: 15px;
  }

  /* 隐藏旁边人物大图 */
  .aiman {
    display: none;
  }

  /* logo 居上居左显示 */
  .zerob-header__logo {
    top: 20px;
    left: 20px;
    height: 40px;
  }

  .login-lang-switch {
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  body {
    background-size: cover !important;
    background-position: center !important;
  }
}

.characters-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 420px;
  overflow: visible;
}

.left-panel .footer-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: rgba(80, 70, 90, 0.7);
  z-index: 10;
  position: relative;
}

.left-panel .footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.left-panel .footer-links a:hover {
  color: #333;
}

/* Decorative blurs */
.left-panel::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 15%;
  width: 260px;
  height: 260px;
  background: rgba(180, 170, 200, 0.25);
  border-radius: 50%;
  filter: blur(80px);
}

.left-panel::before {
  content: "";
  position: absolute;
  bottom: 15%;
  left: 10%;
  width: 350px;
  height: 350px;
  background: rgba(200, 195, 210, 0.2);
  border-radius: 50%;
  filter: blur(100px);
}

/* Right Panel */
.right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 40px;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

/* Sparkle icon */
.sparkle-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sparkle-icon svg {
  width: 32px;
  height: 32px;
}

.form-header {
  text-align: center;
  margin-bottom: 36px;
}

.form-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 14px;
  color: #888;
}

/* Form fields */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-group .input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  height: 48px;
  border: none;
  border-bottom: 1.5px solid #e0e0e0;
  padding: 0 40px 0 0;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a2e;
  background: transparent;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-bottom-color: #5b21b6;
}

.form-group input::placeholder {
  color: #ccc;
}

.form-group input[type="password"]:not(:placeholder-shown) {
  font-family: inherit;
  letter-spacing: 2px;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 6px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #333;
}

/* Remember & Forgot */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #5b21b6;
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: #5b21b6;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.forgot-link:hover {
  opacity: 0.8;
}

/* Buttons */
.btn-login {
  position: relative;
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: 1.5px solid #1a1a2e;
  background: #1a1a2e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 14px;
  transition: all 0.3s;
}

.btn-login .btn-text {
  display: inline-block;
  transition: all 0.3s;
}

.btn-login .btn-hover-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #5b21b6;
  color: #fff;
  opacity: 0;
  transition: all 0.3s;
  border-radius: 25px;
}

.btn-login:hover .btn-text {
  transform: translateX(40px);
  opacity: 0;
}

.btn-login:hover .btn-hover-content {
  opacity: 1;
}

.btn-google {
  position: relative;
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: 1.5px solid #e0e0e0;
  background: #f5f5f5;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
}

.btn-google .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
}

.btn-google .btn-hover-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #5b21b6;
  color: #fff;
  opacity: 0;
  transition: all 0.3s;
  border-radius: 25px;
}

.btn-google:hover .btn-text {
  transform: translateX(40px);
  opacity: 0;
}

.btn-google:hover .btn-hover-content {
  opacity: 1;
}

.google-icon {
  width: 18px;
  height: 18px;
}

/* Sign up link */
.signup-link {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: 32px;
}

.signup-link a {
  color: #1a1a2e;
  font-weight: 600;
  text-decoration: none;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* ============ ANIMATED CHARACTERS ============ */
.characters-scene {
  position: relative;
  width: 480px;
  height: 360px;
}

/* Character base styles */
.character {
  position: absolute;
  bottom: 0;
  transition: all 0.7s ease-in-out;
  transform-origin: bottom center;
}

/* Purple rectangle */
.char-purple {
  left: 60px;
  width: 170px;
  height: 370px;
  background: #6c3ff5;
  border-radius: 10px 10px 0 0;
  z-index: 1;
}

/* Black rectangle */
.char-black {
  left: 220px;
  width: 115px;
  height: 290px;
  background: #2d2d2d;
  border-radius: 8px 8px 0 0;
  z-index: 2;
}

/* Orange semi-circle */
.char-orange {
  left: 0;
  width: 230px;
  height: 190px;
  background: #ff9b6b;
  border-radius: 115px 115px 0 0;
  z-index: 3;
}

/* Yellow rounded */
.char-yellow {
  left: 290px;
  width: 135px;
  height: 215px;
  background: #e8d754;
  border-radius: 68px 68px 0 0;
  z-index: 4;
}

/* Eyes container */
.eyes {
  position: absolute;
  display: flex;
  transition: all 0.7s ease-in-out;
}

/* Eyeball (white with pupil) */
.eyeball {
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.15s ease;
  overflow: hidden;
}

/* Pupil */
.pupil {
  border-radius: 50%;
  background: #2d2d2d;
  transition: transform 0.1s ease-out;
}

/* Bare pupil (no white eyeball) */
.bare-pupil {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2d2d2d;
  transition: transform 0.7s ease-in-out;
}

/* Yellow mouth */
.yellow-mouth {
  position: absolute;
  width: 50px;
  height: 4px;
  background: #2d2d2d;
  border-radius: 2px;
  transition: all 0.7s ease-in-out;
}

/* Shake-head: smooth left-right oscillation on face parts */
@keyframes shakeHead {
  0%,
  100% {
    translate: 0 0;
  }
  10% {
    translate: -9px 0;
  }
  20% {
    translate: 7px 0;
  }
  30% {
    translate: -6px 0;
  }
  40% {
    translate: 5px 0;
  }
  50% {
    translate: -4px 0;
  }
  60% {
    translate: 3px 0;
  }
  70% {
    translate: -2px 0;
  }
  80% {
    translate: 1px 0;
  }
  90% {
    translate: -0.5px 0;
  }
}

.eyes.shake-head,
.yellow-mouth.shake-head,
.orange-mouth.shake-head {
  animation: shakeHead 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Sad mouth (curved down) for orange character on error */
.orange-mouth {
  position: absolute;
  width: 28px;
  height: 14px;
  border: 3px solid #2d2d2d;
  border-top: none;
  border-radius: 0 0 14px 14px;
  opacity: 0;
  transition: all 0.7s ease-in-out;
}

.orange-mouth.visible {
  opacity: 1;
}

/* Error styles */
.error-msg {
  display: none;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 10px;
  margin-bottom: 16px;
}

.form-group input.error {
  border-bottom-color: #dc2626;
}

.form-group label.error-label {
  color: #dc2626;
}
