/* Game page shell */

.game-main {
  padding: clamp(1rem, 4vw, 2rem);
  max-width: 56rem;
  margin: 0 auto;
  flex: 1;
}

.game-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.game-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.game-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Character select */
.character-select {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.char-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  min-width: 8rem;
  border: 2px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.char-option:hover {
  border-color: rgba(178, 130, 94, 0.5);
}

.char-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.char-option[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(178, 130, 94, 0.25);
}

.char-preview {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.char-preview--raccoon {
  background: url("../assets/game/raccoon.svg") center / 70% no-repeat,
    linear-gradient(145deg, #6d6d6d 40%, #3a3a3a);
  border: 3px solid #f0f0f0;
}

.char-preview--fox {
  background: url("../assets/game/fox.svg") center / 70% no-repeat,
    linear-gradient(145deg, rgba(232, 160, 90, 0.35) 50%, #c45c2a);
}

.game-stage-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 48px rgba(44, 36, 32, 0.08);
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid var(--surface-border);
}

.game-hud strong {
  color: var(--text);
  font-weight: 500;
}

.game-hint {
  font-size: 0.85rem;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(44, 36, 32, 0.45);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.game-overlay[hidden] {
  display: none;
}

.game-overlay-card {
  max-width: 22rem;
  padding: 1.75rem;
  text-align: center;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.game-overlay-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.game-overlay-card p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.game-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hidden {
  display: none !important;
}
