/* RESET BÁSICO */
* {
  box-sizing: border-box;
}

/* BODY */
body {
  background-color: #fef6e4;
  background-image:
    radial-gradient(circle, #ffda77 10%, transparent 10%),
    radial-gradient(circle, #77ddff 10%, transparent 10%);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  font-family: 'Fredoka One', Arial, sans-serif;
  text-align: center;
  margin: 0;
}


/* HERO HEADER */
.hero {
  width: 100%;
  height: 250px;
  background-image: url("./assets/img/manitoscreativasheader2.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

/* OVERLAY */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(88, 88, 88, 0.35);
}

/* CONTENIDO HERO */
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.hero-content h1 {
  font-size: 1.8rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  font-family: 'Baloo 2', Arial, sans-serif;
}


/* BLOQUES */
.bloque {
  margin: 30px auto;
  max-width: 600px;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

.oculto {
  opacity: 0;
  transform: translateY(50px);
  pointer-events: none;
  display: none;
}

.letra.seleccionada {
  background-color: #ff6b6b;
  transform: scale(1.1);
}

.bloque.animar {
  animation: bounceIn 0.5s forwards;
}

#inicio {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

button {
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
}
.pantalla {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #000000;
  text-align: center;
}

button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
}

.correcto {
  background-color: #22c55e !important;
  color: white;
  transform: scale(1.1);
  transition: 0.2s;
}

.incorrecto {
  background-color: #ef4444 !important;
  color: white;
  transform: scale(0.9);
  transition: 0.2s;
}


@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }

  60% {
    opacity: 1;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* LETRAS */
.letras {
  margin: 20px 0;
}

.letra {
  font-size: 48px;
  padding: 20px;
  margin: 10px;
  border-radius: 20px;
  border: none;
  background: rgb(228, 152, 12);
  cursor: pointer;
}

.letra:active {
  transform: scale(0.9);
}

.letra.seleccionada {
  background-color: #ff6b6b;
  transform: scale(1.1);
}

/* BOTÓN SIGUIENTE */
.btn-siguiente {
  font-size: 24px;
  padding: 15px 30px;
  border-radius: 20px;
  border: none;
  background: #da360d;
  color: white;
  cursor: pointer;
}

/* BOTÓN AUDIO */
.btn-audio {
  font-size: 22px;
  padding: 15px 25px;
  margin: 20px;
  border-radius: 20px;
  border: none;
  background: #ffcc00;
  cursor: pointer;
}

/* MENSAJES */
#mensaje {
  font-size: 18px;
  margin: 20px 0;
}

/* Acierto: pulso verde */
.correcta-feedback {
  animation: pulsoCorrecto 0.5s;
}

@keyframes pulsoCorrecto {
  0% {
    transform: scale(1);
    background-color: #28a745;
  }

  50% {
    transform: scale(1.2);
    background-color: #28a745;
  }

  100% {
    transform: scale(1);
    background-color: #28a745;
  }
}

/* Error: sacudida roja */
.error-feedback {
  animation: sacudirError 0.5s;
}

@keyframes sacudirError {
  0% {
    transform: translateX(0);
    background-color: #dc3545;
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
    background-color: #dc3545;
  }
}


.boton-pulsante {
  padding: 15px 25px;
  background-color: #ffd700;
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 1.3rem;
  cursor: pointer;
  display: block;
  margin: 10px auto;
  /* Centrado horizontal */
  animation: pulsar 1s infinite alternate;
}

@keyframes pulsar {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

#barra-progreso {
  width: 100%;
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  margin: 10px 0;
}

#progreso {
  height: 100%;
  width: 0%;
  background: #4caf50;
  border-radius: 10px;
  transition: width 0.3s;
}

#ranking-lista {
  list-style: none;
  padding: 0;
  font-size: 18px;
}

#ranking-lista li {
  background: #f5f5f5;
  margin: 6px 0;
  padding: 8px;
  border-radius: 8px;
}

#ranking li {
  background: white;
  padding: 10px;
  margin: 8px 0;
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

#ranking li:hover {
  transform: scale(1.03);
}


/* RESPONSIVE HERO */
@media (max-width: 768px) {
  .hero {
    height: 40vh;
    /* padding-bottom: 15px; */
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }
}