/* ============================================================
 * game.css — 游戏屏内 UI
 * HUD / next-hold 框 / 宠物信息 / 宠物选择栏 / 遮罩
 * ============================================================ */

:root {
  --morandi-blue:   #88a7b3;
  --morandi-yellow: #c9b88a;
  --morandi-mauve:  #a890a0;
  --morandi-sage:   #9caa92;
  --morandi-terra:  #b08a82;
  --morandi-indigo: #7d83a3;
  --morandi-ochre:  #c4a577;
  --panel-bg: #1a1a1d;
  --hud-text: #e8e4e0;
  --hud-dim: #8a847e;
}

/* ---- HUD ---- */
.hud-block {
  background: linear-gradient(145deg, #2a2724, #1f1d1a);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.06);
  width: 100%;
}
.hud-label {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--hud-dim);
  font-weight: 600;
}
.hud-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--hud-text);
  font-family: "Courier New", monospace;
  line-height: 1.1;
  margin-top: 2px;
}
.hud-value.small { font-size: 14px; color: var(--morandi-ochre); }

.preview-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.preview-block .hud-label { align-self: flex-start; padding-left: 2px; }

/* ---- 宠物信息 ---- */
.pet-name {
  position: absolute;
  top: 4px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--hud-text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  z-index: 2;
}
.pet-stage {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--morandi-ochre);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  z-index: 2;
}
.pet-xp-bar {
  position: absolute;
  bottom: 3px; left: 6px; right: 6px;
  height: 3px;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  overflow: hidden;
  z-index: 2;
}
.pet-xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--morandi-sage), var(--morandi-yellow));
  transition: width 0.4s ease;
  border-radius: 2px;
}

/* ---- 宠物选择栏 ---- */
.pet-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 6px;
  background: linear-gradient(145deg, #2a2724, #1f1d1a);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}
.pet-btn {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  touch-action: none;
}
.pet-btn:hover { background: rgba(255,255,255,0.1); }
.pet-btn.active {
  border-color: var(--morandi-ochre);
  background: rgba(196,165,119,0.15);
  box-shadow: 0 0 6px rgba(196,165,119,0.4);
}
.pet-thumb {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.pet-btn .lock-icon {
  position: absolute;
  font-size: 12px;
  filter: grayscale(1);
}

/* ---- 遮罩层 ---- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,9,12,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.2s;
  backdrop-filter: blur(2px);
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.overlay-content {
  text-align: center;
  padding: 16px;
}
.overlay-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--morandi-ochre);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 10px;
}
.overlay-sub {
  font-size: 12px;
  color: var(--hud-text);
  line-height: 1.7;
  letter-spacing: 0.5px;
}
.overlay-sub .hint-overlay {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  color: var(--hud-dim);
  letter-spacing: 1px;
}

/* ---- 响应式 HUD ---- */
@media (max-width: 720px) {
  .hud-block { padding: 6px 8px; }
  .hud-value { font-size: 16px; }
  .pet-col .small-bezel { margin: 0 auto; }
  .pet-selector { grid-template-columns: repeat(6, 1fr); }
}
