/* =====================
   FUENTE Y RESETS (PRIORIDAD PRIMERO)
===================== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
    background: 
        url('gracieabrams.jpg') repeat;
    background-size: 200px 200px, 300px 300px, 250px 250px;
    background-position: 0 0, 50px 50px, 100px 100px;
    animation: moverFondo 10s linear infinite;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  position: relative;
}

@keyframes moverFondo {
    0% { background-position: 0 0, 50px 50px, 100px 100px; }
    100% { background-position: 200px 200px, 250px 250px, 300px 300px; }
}

/* Logo centrado */
.logo {
  max-width: 350px;
  margin: 20px auto;
  display: block;
  filter: drop-shadow(0 0 10px gold);
  animation: glow 1.5s ease-in-out infinite alternate;
  cursor: pointer;
  transition: transform 0.3s ease;
  content: url("logo.png"); /* Imagen normal */
}

.logo:hover {
  transform: scale(1.1);
}


@keyframes glow {
    from { filter: drop-shadow(0 0 10px pink); }
    to { filter: drop-shadow(0 0 20px pink); }
}
.game-container {
  text-align: center;
  max-width: 600px;
  margin-top 0px;
  background-color: transparent; /* Fondo transparente */
  padding: 30px;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}
.progress-bar-container {
  width: 80%;
  height: 10px;
  background-color: #444;
  border-radius: 8px;
  margin: 20px auto;
  position: relative;
}

.progress-bar {
  height: 100%;
  background-color: #78c3e9;
  border-radius: 8px;
  width: 100%;
  transition: width 10s linear;
}

#audio {
  display: none;
}
.input-container {
  width: 100%;
  max-width: 500px;
  position: relative;
  margin: 10px 0; /* Margin ajustado para mantener consistencia */
}

.input-container-rapid {
  margin: 20px auto 40px auto; /* Agregar un margen de 40px abajo */
  position: relative;
  width: 80%;
  transform: translateX(0%); /* Mover más hacia la izquierda */
}

input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #555;
  border-radius: 8px;
  outline: none;
  background-color: #2c2c2c;
  color: #ffffff;
  transition: border-color 0.3s ease;
  box-sizing: border-box; /* Para que el padding no incremente el tamaño total */
}

input::placeholder {
  color: #777; /* Placeholder más claro */
}

input[disabled] {
  background-color: #444; /* Fondo más claro para cajas deshabilitadas */
}

input:focus {
  border-color: #78c3e9;
}
h1 {
  color: #ff4081;
  font-size: 3em;
  margin-bottom: 20px;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 5px 0 0 0;
  background: #333;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 10;
}

li {
  padding: 10px;
  cursor: pointer;
}

li:hover, .selected {
  background-color: #444;
}
.buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;   /* Centra horizontalmente */
  justify-content: center; /* Centra verticalmente dentro del contenedor */
  gap: 20px;
}

.button {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.button img {
  display: block;
  max-width: 250px;   /* tamaño fijo más controlado */
  height: auto;
  margin: 0 auto;     /* asegura que quede centrado */
  transition: transform .15s ease, filter .15s ease;
}

.button img:hover { 
  transform: scale(1.05); 
  filter: drop-shadow(0 0 15px white);
}

/* Hover personalizado para cada botón */
.start img {
  content: url("botonstart.png");
}
.start img:hover {
  transform: scale(1.1);
}
.play img {
  content: url("botonplayagain.png");
}
.play img:hover {
  transform: scale(1.1);
}
#score, #high-score, #result-container {
    color: white;
    text-shadow: 
        -1px -1px 2px black,
         1px -1px 2px black,
        -1px  1px 2px black,
         1px  1px 2px black;
}
.flash-success {
  animation: flash-success 0.5s;
}

.flash-error {
  animation: flash-error 0.5s;
}

@keyframes flash-success {
  from { background-color: rgba(46, 107, 59, 0.6); }
  to { background-color: transparent; }
}

@keyframes flash-error {
  from { background-color: #dc3545; }
  to { background-color: transparent; }
}
.hidden {
    display: none !important;
}


