* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: linear-gradient(180deg, #87a7c7 0%, #b8cdd9 50%, #4a5a30 100%);
  font-family: 'Microsoft YaHei', sans-serif;
  -webkit-user-select: none; user-select: none;
  touch-action: none;
  position: fixed; top: 0; left: 0;
}
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
canvas { display: block; cursor: none; position: relative; z-index: 1; }

.overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.overlay.hidden { display: none; }

.title {
  font-size: clamp(28px, 8vw, 60px); color: #f5e6c8;
  letter-spacing: 4px; text-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 40px rgba(255,180,60,0.3);
  margin-bottom: 10px; text-align: center;
}
.subtitle { font-size: clamp(12px, 3vw, 18px); color: #b09878; letter-spacing: 2px; margin-bottom: 40px; text-align: center; }

.btn {
  padding: 14px 20px; margin: 8px;
  width: 240px; max-width: 85vw;
  box-sizing: border-box;
  font-size: clamp(14px, 3.5vw, 18px); font-weight: bold;
  color: #fff; letter-spacing: 2px;
  border: 2px solid rgba(245,230,200,0.4);
  background: linear-gradient(180deg, #6b4f2a 0%, #3d2b14 100%);
  border-radius: 6px; cursor: pointer;
  box-shadow: 0 6px 30px rgba(0,0,0,0.6);
  transition: transform 0.15s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn:active { transform: scale(0.96); }
.btn.small { padding: 10px 28px; font-size: clamp(14px, 3vw, 16px); }

.stats { color: #f5e6c8; font-size: clamp(14px, 3.5vw, 22px); margin: 8px 0; text-align: center; line-height: 1.7; }
.stats .big { color: #ffd479; font-size: 1.5em; font-weight: bold; }

.level-badge {
  font-size: clamp(36px, 10vw, 80px); color: #ffd479;
  font-weight: bold; text-shadow: 0 0 40px rgba(255,212,121,0.5); letter-spacing: 6px;
}

.hint { margin-top: 24px; color: #9a8a6a; font-size: clamp(11px, 2.5vw, 14px); letter-spacing: 1px; text-align: center; }

/* 成就弹窗动画 */
@keyframes achSlideIn {
  from { transform: translateX(-50%) translateY(-30px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes achGlow {
  0%, 100% { box-shadow: 0 4px 30px rgba(255,212,121,0.4); }
  50% { box-shadow: 0 4px 50px rgba(255,212,121,0.7); }
}
