* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: transparent;
  min-height: 100vh;
  color: #222;
  overflow-x: hidden;
}

/* 随机背景层：由 main.js 设置 background-image */
.bg-layer {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
  transition: opacity 0.4s ease;
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.1), rgba(0,0,0,0.55));
  pointer-events: none;
}

/* ====== 面板：单页 SPA 切换 ====== */
.panel {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.panel.active {
  display: flex;
}

/* ====== 模态框 ====== */
.modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.modal.wide {
  max-width: 720px;
}
.modal-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.modal-title {
  margin: 8px 0 12px;
  font-size: 24px;
  color: #333;
}
.modal-text {
  margin: 0 0 22px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

/* ====== 按钮 ====== */
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.btn {
  padding: 10px 26px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 6px 14px rgba(59,130,246,.35);
}
.btn-primary:hover { background: #2563eb; }
.btn-secondary {
  background: #e5e7eb;
  color: #333;
}
.btn-secondary:hover { background: #d1d5db; }
.btn-success {
  background: #10b981;
  color: #fff;
  box-shadow: 0 6px 14px rgba(16,185,129,.35);
}
.btn-success:hover { background: #059669; }
.btn-semi {
  background: #f59e0b;
  color: #fff;
  box-shadow: 0 6px 14px rgba(245,158,11,.35);
  text-decoration: none;
}
.btn-semi:hover { background: #d97706; }

/* ====== 图2：日期选择 ====== */
.date-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}
.date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 130px;
}
.date-col label {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
.date-col select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  outline: none;
}
.date-col select:focus {
  border-color: #3b82f6;
}

/* ====== 滚动格（通用） ====== */
.spinner {
  user-select: none;
  width: 100%;
  padding: 10px 12px;
  font-size: 22px;
  font-weight: 700;
  color: #111;
  background: #fffbe8;
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}
.spinner.paused {
  background: #ecfdf5;
  border-color: #10b981;
  border-style: solid;
}

/* ====== 图3：人机验证 ====== */
.captcha-row {
  margin: 14px 0 6px;
}
.captcha-label {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}
.digit-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.digit-row .digit {
  width: 54px;
  height: 64px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: "Courier New", monospace;
}
.digit-row.target .digit {
  background: #111827;
  color: #fbbf24;
  box-shadow: inset 0 0 0 2px #374151;
}
.digit-row.spinner-row .digit {
  background: #fffbe8;
  color: #111;
  border: 2px dashed #f59e0b;
  cursor: pointer;
  user-select: none;
}
.digit-row.spinner-row .digit.paused {
  background: #ecfdf5;
  border-color: #10b981;
  border-style: solid;
}

/* ====== 通用 Toast ====== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 90%;
  text-align: center;
  transition: opacity .2s;
}
.toast.hidden { display: none; }

/* ====== 图4：资深玩家验证 ====== */
.slider-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}
.slider-row input[type="range"] {
  flex: 1 1 320px;
  min-width: 200px;
  accent-color: #3b82f6;
}
.slider-row input[type="number"] {
  width: 180px;
  padding: 10px 12px;
  font-size: 15px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  outline: none;
  text-align: center;
}
.slider-row input[type="number"]:focus { border-color: #3b82f6; }
.status-line {
  min-height: 22px;
  margin: 10px 6px 4px;
  font-size: 14px;
  color: #555;
  text-align: center;
  word-break: break-all;
}

/* ====== 图6：主菜单 ====== */
.menu-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.menu-btn {
  padding: 14px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s ease, box-shadow .15s ease, filter .15s ease;
}
.menu-btn:hover { filter: brightness(1.07); }
.menu-btn:active { transform: translateY(1px); }
.menu-btn.install { background: #10b981; }
.menu-btn.launch  { background: #f59e0b; }
.menu-btn.hot     { background: #ef4444; }
.menu-btn.friend  { background: #3b82f6; }

@media (max-width: 520px) {
  .modal { padding: 24px 18px; }
  .digit-row .digit { width: 44px; height: 54px; font-size: 22px; }
  .date-col { min-width: 100px; }
  .menu-btn-grid { grid-template-columns: 1fr; }
}
