/* 【新增①】首次进入弹窗样式 */
#firstPopupMask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 10000;
}

#firstPopupBox {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86%;
  max-width: 360px;
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px 60px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.6;
  font-size: 15px;
  color: #333;
}

#firstPopupClose {
  position: absolute;
  right: 10px;
  top: 6px;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

#firstPopupBtn {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 26px;
  border: none;
  border-radius: 20px;
  background: #1677ff;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

/* 【新增】登录注册弹窗样式 */
#loginPopupMask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 10001;
}

#loginPopupBox {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86%;
  max-width: 320px;
  background: #fff;
  border-radius: 10px;
  padding: 25px 20px;
  box-sizing: border-box;
}

.login-form {
  display: block;
}

.register-form {
  display: none;
}

.login-title {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #333;
}

.login-input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #1677ff;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #1677ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 5px;
  margin-bottom: 15px;
}

.login-btn:hover {
  background: #0958d9;
}

.switch-text {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.switch-link {
  color: #1677ff;
  cursor: pointer;
  margin-left: 5px;
}

.switch-link:hover {
  text-decoration: underline;
}

.login-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 新增：退出确认弹窗样式 */
#logoutPopupMask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 10002;
}

#logoutPopupBox {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86%;
  max-width: 300px;
  background: #fff;
  border-radius: 10px;
  padding: 25px 20px;
  box-sizing: border-box;
}

.logout-title {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #333;
}

.logout-buttons {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.logout-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.logout-confirm {
  background: #ff4d4f;
  color: white;
}

.logout-confirm:hover {
  background: #d9363e;
}

.logout-cancel {
  background: #f0f0f0;
  color: #333;
}

.logout-cancel:hover {
  background: #d9d9d9;
}

.logout-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 【新增】消息提示样式 */
.message-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10003;
  display: none;
  pointer-events: none;
}

.message-toast.show {
  display: block;
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}