* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
background: url('fondo7.jpg') no-repeat center center fixed;
  background-size: cover; /* ✅ Ocupa todo el fondo y escala bien */
  color: #f9e7e7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pantalla-inicio,
.pantalla-juego {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------- Pantalla Inicial ---------------- */

.contenedor-inicio {
  margin-top: 60px;
  text-align: center;
}

h1 {
  
  font-family: "Grenze Gotisch", serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  font-size: 5rem;
  margin-bottom: 20px;
  
}
h1{
  color: yellow;
}

label, select {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #aaa;
}

#jugar {
  padding: 15px 30px;
  font-size: 1.5rem;
  background-color: #ff5959;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

/* ---------------- Pantalla Juego ---------------- */

.hud {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 10px;
  font-size: 1.2rem;
  flex-wrap: wrap;
  gap: 10px;
}

.hud button {
  background: #ff5959;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
}

.grid {
  display: grid;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}

/* 🆕 Responsive grid */
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

@media (max-width: 599px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}

/* 🆕 Carta adaptable */
.carta {
  background-color: white;
  background-image: url('https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/items/poke-ball.png');
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 10px;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.carta.revelada {
  background-color: white;
}

.carta img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.carta.revelada img {
  display: block;
}
/* 🆕 Animación de nuevo récord */
.mensaje-record {
  background-color: gold;
  color: black;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  animation: bounce 1s ease infinite alternate;
}

.oculto {
  display: none;
}

@keyframes bounce {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* 🆕 Tabla de puntajes */
.tabla {
  background-color: rgba(255, 255, 255, 0.8);
  color: #222;
  padding: 10px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
  max-width: 400px;
  width: 90%;
}

.tabla h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

#lista-scores {
  list-style: none;
  padding: 0;
  margin: 0;
}

#lista-scores li {
  padding: 5px 0;
  border-bottom: 1px solid #ccc;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* oscurecer */
  z-index: -1;
}