/* ─── GAME PLAYER OVERLAY ─── */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
}

.player-canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.player-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── PLAYER HUD ─── */
.player-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.player-hud > * {
  pointer-events: auto;
}

.hud-exit {
  position: absolute;
  top: 12px;
  left: 12px;
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 12, 20, 0.85);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.hud-title-bar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.hud-game-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: rgba(8, 12, 20, 0.7);
  padding: 4px 12px;
  border-radius: 8px;
}

.hud-env-label {
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  margin-top: 2px;
}

.hud-lives {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}

.hud-heart {
  font-size: 18px;
}

.hud-heart.filled {
  color: var(--red);
}

.hud-heart.empty {
  color: var(--muted);
  opacity: 0.4;
}

.hud-explored {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  background: rgba(8, 12, 20, 0.7);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ─── INVENTORY BAR ─── */
.hud-inventory {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 44px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.inventory-item {
  flex-shrink: 0;
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}

/* ─── CHOICE BUTTONS ─── */
.hud-choices {
  position: absolute;
  bottom: 68px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  width: 100%;
  height: 48px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 160ms ease;
}

.choice-btn:active {
  border-color: var(--accent);
}

/* ─── PLAYER LOADING / TRANSITION ─── */
.player-fade {
  position: absolute;
  inset: 0;
  background: #000;
  transition: opacity 600ms ease;
  z-index: 20;
  pointer-events: none;
}

.player-title-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  background: rgba(0, 0, 0, 0.8);
}

.player-title-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: white;
  text-align: center;
  padding: 0 32px;
}

/* Continue modal */
.continue-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 25;
}

.continue-modal-card {
  width: 300px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.continue-modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.continue-modal-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

.continue-modal-btn.primary {
  background: var(--accent);
  color: white;
}

.continue-modal-btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
