* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 100px; /* 1rem = 100px */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #fea20d 0, #fff 50%, #fff);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0.2rem;
}

.container {
  width: 100%;
  align-items: center;
  justify-content: center;
  display: flex;
}

.login-wrapper {
  width: 100%;
  display: none; /* 默认隐藏 */
  align-items: center;
  justify-content: center;
}

.login-wrapper.show {
  display: flex;
}

.logout-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: none; /* 默认隐藏 */
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.logout-message.show {
  display: flex;
}

.logout-content {
  text-align: center;
  /* background: #ffffff; */
  border-radius: 0.16rem;
  /* box-shadow: 0 0.08rem 0.32rem rgba(0, 0, 0, 0.15); */
  padding: 0.6rem 0.4rem;
  width: 5.5rem;
  width: 100%;
  margin: 30% auto;
}

.logout-text {
  font-size: 0.38rem;
  color: #333;
  margin: 0;
  line-height: 1.5;
  font-weight: 600;
}

.login-box {
  background: #ffffff;
  border-radius: 0.16rem;
  box-shadow: 0 0.08rem 0.32rem rgba(0, 0, 0, 0.15);
  padding: 0.4rem 0.3rem;
  width: 100%;
  max-width: 5.5rem;
}

.login-title {
  text-align: center;
  font-size: 0.36rem;
  color: #333;
  margin-bottom: 0.3rem;
  font-weight: 600;
  letter-spacing: 0.01rem;
}

.login-form {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.form-group:last-of-type {
  margin-bottom: 0.2rem;
}

.form-group label {
  display: block;
  font-size: 0.28rem;
  color: #666;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  height: 0.88rem;
  padding: 0 0.3rem;
  font-size: 0.28rem;
  border: 0.02rem solid #e0e0e0;
  border-radius: 0.08rem;
  outline: none;
  transition: border-color 0.3s;
  background: #fff;
  -webkit-appearance: none;
}

.form-group input:focus {
  border-color: #f9ae3d;
}

.form-group input::placeholder {
  color: #999;
  font-size: 0.28rem;
}

.error-message {
  color: #ff4444;
  font-size: 0.24rem;
  margin-top: 0.1rem;
  display: none;
  line-height: 1.4;
}

.success-message {
  color: #52c41a;
  font-size: 0.28rem;
  margin-top: 0.2rem;
  text-align: center;
  display: none;
  line-height: 1.4;
  font-weight: 500;
}

.login-btn {
  width: 100%;
  height: 0.88rem;
  margin-top: 0rem;
  background: #f9ae3d;
  color: #ffffff;
  font-size: 0.32rem;
  border: none;
  border-radius: 0.08rem;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.1s;
  font-weight: 500;
  -webkit-appearance: none;
  outline: none;
}

.login-btn:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 轻提示弹窗 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.toast-content {
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.24rem 0.4rem;
  border-radius: 0.12rem;
  font-size: 0.28rem;
  line-height: 1.5;
  text-align: center;
  max-width: 5rem;
  word-wrap: break-word;
  box-shadow: 0 0.08rem 0.32rem rgba(0, 0, 0, 0.3);
}

.toast-success .toast-content {
  background: rgba(0, 0, 0, 0.7);
}

.toast-error .toast-content {
  background: rgba(0, 0, 0, 0.7);
}

.toast-info .toast-content {
  background: rgba(0, 0, 0, 0.7);
}

/* 移动端优化 */
@media screen and (max-width: 750px) {
  body {
    padding: 0.15rem;
  }

  .login-box {
    padding: 0.35rem 0.25rem;
    box-sizing: border-box;
    width: 92%;
    max-width: inherit;
    margin-left: 4%;
    margin-right: 4%;
  }

  .toast-content {
    max-width: 4.5rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.28rem;
  }
  .logout-text2 {
    font-size: 0.28rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
    margin-top: 0.6rem;
  }
}
