/* 通用基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #20359c, #a6c0fd);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

/* 登录容器 */
#login-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 20px;
  width: 100%;
  max-width: 360px;
  margin: auto;
}

/* 顶部切换按钮 */
#login-container > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

#login-container button {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 20px;
  background-color: #e0e0e0;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#login-container button:hover {
  background-color: #ccc;
  transform: scale(1.02);
}

#login-container button.active {
  background-color: #4a90e2;
  color: white;
}

#login-form {
  width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 200px;
}

/* 登录表单区域 */
.login-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: absolute;
  width: 100%;
  opacity: 0;
  visibility: hidden;
}

.login-section.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.login-section input,
.login-section select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  background-color: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.login-section input:focus,
.login-section select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.login-section button {
  background-color: #4a90e2;
  color: white;
  font-weight: bold;
  padding: 12px;
  margin-top: 5px;
  font-size: 16px;
}

.login-section button:hover {
  background-color: #357ab7;
}

/* 响应式适配 */
@media screen and (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  #login-container {
    padding: 15px;
  }
  
  #login-container button {
    padding: 10px;
    font-size: 13px;
  }
  
  .login-section input,
  .login-section select,
  .login-section button {
    padding: 10px;
    font-size: 14px;
  }
}

/* 适配超小屏幕设备 */
@media screen and (max-width: 320px) {
  #login-container {
    padding: 12px;
  }
  
  #login-container button {
    padding: 8px;
    font-size: 12px;
  }
  
  .login-section {
    gap: 12px;
  }
}

/* 处理软键盘弹出时的布局 */
@media screen and (max-height: 500px) {
  body {
    align-items: flex-start;
  }
  
  #login-container {
    margin-top: 10px;
  }
}

/* 优化触摸体验 */
@media (hover: none) {
  #login-container button:hover {
    transform: none;
  }
  
  .login-section input,
  .login-section select,
  .login-section button {
    touch-action: manipulation;
  }
}

.time-warning {
  color: red;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}
