/* ===== 游戏页面通用样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --orange: #ff8a3d;
  --blue: #4a90e2;
  --ink: #33303e;
  --gray: #7a7585;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: linear-gradient(160deg, #fff2e0 0%, #ffe9f3 55%, #eaf4ff 100%);
  min-height: 100vh;
  color: var(--ink);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

/* 顶部返回栏 */
.game-top {
  width: 100%;
  max-width: 620px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(120, 90, 150, .12);
  transition: .2s;
}

.back-btn:hover { transform: translateX(-3px); color: var(--orange); }

.game-title { font-size: 20px; font-weight: 900; }

/* 数据栏 */
.stats {
  width: 100%;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  background: #fff;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(120, 90, 150, .10);
}

.stat-label { font-size: 12px; color: var(--gray); font-weight: 600; }

.stat-value { font-size: 22px; font-weight: 900; color: var(--orange); line-height: 1.3; }

/* 主按钮 */
.main-btn {
  padding: 13px 40px;
  border: none;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 138, 61, .38);
  transition: .2s;
}

.main-btn:hover { background: #f0711e; transform: translateY(-2px); }

.main-btn:disabled { background: #ddd; box-shadow: none; cursor: not-allowed; transform: none; }

/* 弹窗 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 22, 45, .55);
  backdrop-filter: blur(3px);
}

.overlay.show { display: flex; }

.modal {
  width: 100%;
  max-width: 340px;
  padding: 32px 26px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  animation: pop .28s cubic-bezier(.2, 1.4, .5, 1);
}

@keyframes pop {
  from { transform: scale(.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-emoji { font-size: 52px; margin-bottom: 10px; }
.modal h2 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.modal p { color: var(--gray); font-size: 15px; margin-bottom: 6px; }
.modal .modal-score { font-size: 34px; font-weight: 900; color: var(--orange); margin: 12px 0; }
.modal .modal-hint { font-size: 14px; color: var(--gray); margin-bottom: 22px; }
