/* Reset sencillo */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050509;
  color: #f5f5f5;
}

/* Contenedor de menús */
.menu-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  text-align: center;
  padding: 1.5rem;
}

.game-title {
  font-size: 3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.5);
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  padding: 0.9rem 2.4rem;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #00c6a7;
  color: #050509;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 198, 167, 0.4);
  background: #00e6c3;
}

.btn-secondary {
  background: #232634;
  color: #f5f5f5;
}

.btn-secondary:hover {
  background: #32354a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.menu-footer {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Layout juego */
.game-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: radial-gradient(circle at top, #10131f, #020308);
}

/* Canvas centrado */
#gameCanvas {
  border: 2px solid #00c6a7;
  max-width: 100%;
}

/* HUD */
.hud {
  display: flex;
  gap: 2rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.hud-section span:first-child {
  font-weight: 600;
  margin-right: 0.4rem;
}

/* Pantalla selección de perfil */
.profile-select-container {
  min-height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  background: radial-gradient(circle at top, #111727, #020308);
}

.profile-subtitle {
  opacity: 0.85;
  max-width: 600px;
  text-align: center;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
}

.profile-card {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 1.2rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border 0.12s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  border-color: #00c6a7;
}

.profile-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.profile-card h2 {
  margin-bottom: 0.5rem;
}

.profile-card ul {
  list-style: none;
  font-size: 0.85rem;
  text-align: left;
  margin-top: 0.5rem;
}

/* Overlay de mensajes (narrador / eventos) */
.message-overlay {
  position: fixed;
  left: 50%;
  top: 10%;              /* arriba del canvas */
  transform: translateX(-50%);
  max-width: 80%;
  padding: 0.9rem 1.4rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 198, 167, 0.6);
  font-size: 1rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}

.message-overlay--visible {
  opacity: 1;
}
