* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  text-align: center;
  overflow: hidden;
  background-color: #5a5a5a;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', Roboto, Arial, sans-serif;
}

/* 验证前：仅灰底 + 弹窗，不露出下载页素材 */
body.gate-mode {
  background-color: #5a5a5a;
}

body:not(.gate-mode) {
  background-color: #333;
}

body.gate-mode .download-shell {
  display: none !important;
}

.download-shell[hidden] {
  display: none !important;
}

.main.bg-img {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 90%;
  top: 5%;
  background-image: url(/img/BG1.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-color: transparent;
}

.bg1-img {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(320px, 82vw);
  height: min(316px, 50vh);
  background-image: url(/img/BG2.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-color: transparent;
  z-index: 10;
}

.bg1-img img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.downloadBtn {
  position: fixed;
  left: 10%;
  right: 10%;
  bottom: 15%;
  max-width: 420px;
  margin: 0 auto;
  height: 56px;
  line-height: 56px;
  text-align: center;
  border-radius: 56px;
  color: #333333;
  font-weight: bold;
  background-color: #00ff83;
  z-index: 20;
  cursor: pointer;
  text-decoration: none;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.wx-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 999;
}

.wx-overlay .arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
}

.wx-overlay .text {
  position: absolute;
  width: 100%;
  top: 50%;
  font-size: 20px;
  text-align: center;
  color: #fff;
}

.wx-overlay .brower {
  position: absolute;
  bottom: 20%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.wx-overlay .brower-img {
  width: 60px;
  height: 60px;
}

.wx-overlay .brower-text {
  margin-top: 10px;
  color: #fff;
}

/* 安全验证弹层 */
.verification-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.5);
}

body.gate-mode .verification-backdrop {
  background-color: #5a5a5a;
}

.verification-backdrop[hidden] {
  display: none !important;
}

.verification-modal {
  width: min(350px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  padding: 15px;
  background: #4285f4;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

.modal-body {
  padding: 20px;
}

.verification-instruction {
  margin-bottom: 15px;
  color: #555;
  font-size: 14px;
  text-align: center;
}

.verification-canvas {
  position: relative;
  height: 200px;
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #ebebeb;
}

.puzzle-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.puzzle-bg {
  width: 100%;
  height: 100%;
  display: block;
}

.puzzle-piece {
  position: absolute;
  border: 2px dashed #4285f4;
  background-color: rgba(255, 255, 255, 0.82);
  cursor: move;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(66, 133, 244, 0.15);
  touch-action: none;
}

.puzzle-target {
  position: absolute;
  border: 3px solid #4285f4;
  background-color: rgba(66, 133, 244, 0.12);
  z-index: 5;
  pointer-events: none;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.25);
}

.fake-target {
  position: absolute;
  border: 2px solid #4285f4;
  background-color: rgba(66, 133, 244, 0.04);
  z-index: 4;
  pointer-events: none;
  box-sizing: border-box;
}

.verification-message {
  text-align: center;
  min-height: 20px;
  font-size: 13px;
  color: #f44336;
  margin-bottom: 10px;
}

.verification-success {
  color: #34a853;
  font-weight: bold;
}

.refresh-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}