body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafb;
  color: #333;
}

/* 浮动按钮 */
#beforeAfterBtn {
 width:300px;
  bottom: 20px;
  right: 20px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
  z-index: 9999;
}
#beforeAfterBtn:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

/* 遮罩 */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}

/* 浮层容器 */
#loginFrame {
  display: none;
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1080px;
  height: 780px;
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  z-index: 10001;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* 关闭按钮 */
#closeBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  z-index: 2000; /* 确保高于 iframe */
  padding: 2px 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
#closeBtn:hover {
  background: #e74c3c;
  color: #fff;
}

/* iframe 自适应 */
#loginIframe {
  width: 100%;
  height: 100%;
    top: 60%;
  border: none;
  display: block;
}

/* 小屏幕优化 */
@media (max-width: 600px) {
  #beforeAfterBtn {
    bottom: 15px;
    right: 15px;
    padding: 10px 18px;
    font-size: 15px;
  }

  #loginFrame {
    width: 94%;
    height: 85%;
    top: 60%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
  }

  #closeBtn {
    top: 8px;
    right: 8px;
    font-size: 22px;
  }
}