@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@100;200;300;400;500;600;700;800&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto Condensed";
}
body {
  background: #0d0d0d;
  /* background-image: url(./img/bg-final.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 100vh;
  margin: 0;
  flex-direction: column;
}
.container {
  width: 90%;
  height: auto;
  padding: 20px;
  position: relative;
  border: 1px solid #ffffff3d;
  margin: 30px 0px 30px 0px;
}
.container .img {
  width: 140px;
  position: absolute;
  top: -60px;
  right: -90px;
  z-index: -1;
}
header {
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 3px 3px 5px #2a2929;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inicio {
  text-align: center;
  padding: 50px 0px;
  color: #fff;
  font-size: 35px;
}
.inicio input {
  display: block;
  width: 380px;
  margin: 10px auto;
  font-size: 28px;
  padding: 10px;
  border-radius: 50px;
  border: 0;
  text-align: center;
  margin-top: 30px;
}

.btn {
  background-color: #14a9ed;
  color: #fff;
  border: 0;
  padding: 10px;
  font-weight: bold;
  border-radius: 50px;
  margin-top: 30px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 28px;
  transition: 0.3s;
  width: 300px;
}
.btn-start {
  width: 380px;
  margin: 0;
}

.btn:hover {
  background-color: #2a2929;
}

.puntaje,
.jugador {
  display: flex;
  align-items: center;
}
.puntaje img,
.jugador img {
  width: 40px;
  z-index: 2;
}
.puntaje .puntos {
  width: 90px;
  padding: 5px;
  border-radius: 0 30px 30px 0;
  margin-left: -5px;
  z-index: 0;
  font-size: 20px;
}

.jugador .nombre {
  width: 90px;
  padding: 5px;
  border-radius: 30px 0px 0px 30px;
  margin-right: -5px;
  font-size: 20px;
}

/* SECCION MENU DEL JUEGO */
.menu {
  margin-top: 30px;
  color: #fff;
  text-align: center;
  font-size: 1.5rem;
}

.categorias {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  justify-content: space-evenly;
}

.categoria {
  background-color: white;
  width: 100%;
  height: 250px;
  border-radius: 15px;
  color: black;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.categoria .foto-categoria {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 15px;
}

.categoria h3 {
  font-size: 16px;
  color: black;
  text-transform: uppercase;
  padding: 10px 0px;
}

.categoria:hover {
  transform: scale(1.05);
  box-shadow: 0px 0px 15px #14a9ed;
}

/* PANTALLA DE PREGUNTAS */
.juego {
  color: #fff;
  margin-top: 30px;
  text-align: center;
}
.juego .pregunta {
  margin: 10px 0 30px 0;
  font-size: 28px;
}
.juego .opcion {
  display: block;
  width: 90%;
  margin: auto;
  border: 0;
  font-size: 16px;
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 20px;
  font-size: 28px;
  cursor: pointer;
}
.correcta {
  background-color: #00b369;
  color: white;
}
.incorrecta {
  background-color: #ff0b1e;
  color: white;
}
.no-events {
  pointer-events: none;
}

.efecto {
  animation: 1s zoom;
}
@keyframes zoom {
  0% {
    transform: scale(1);
    color: #fff;
    font-weight: bold;
  }
  40% {
    transform: scale(1.3);
    color: #14a9ed;
  }
  60% {
    transform: scale(1.3);
    color: #14a9ed;
  }
  100% {
    transform: scale(1);
    color: #fff;
    font-weight: normal;
  }
}

.desabilitada {
  filter: grayscale(0.9) opacity(0.7);
}

/* SECCION FINAL */
.bg-final {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.final {
  margin-top: 30px;
  text-align: center;
  color: #fff;
}
.final .medalla {
  position: relative;
  width: auto;
  margin-bottom: 10%;
}

.final .medalla .nombre {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
}
.final img {
  display: block;
  width: 400px;
  margin: auto;
}
.final .puntaje-final {
  font-size: 45px;
  color: #fff;
  display: inline-block;
}

/* Estilos del Ranking */
#ranking {
  margin-top: 2.5rem;
}

#ranking h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #f7c42d;
}

#ranking-list {
  list-style: none;
  padding: 0;
  text-align: left;
}

#ranking-list li {
  font-size: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #444;
}

#ranking-list li:last-child {
  border-bottom: none;
}

#ranking-list li:hover {
  background-color: #555;
  cursor: pointer;
}

#mensaje {
  font-size: 18px;
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
  transition: color 0.3s ease;
}

/* Contenedor principal */
.container__final {
  display: flex;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  font-size: 2rem;
}

.container__final > * {
  flex: 1 1 50%;
}

@media (max-width: 768px) {
  .container__final {
    display: unset;
    flex-direction: column;
    width: 80%;
    gap: 1.5rem;
  }

  .container__final > * {
    flex: 1 1 100%;
  }

  #ranking {
    text-align: left;
  }
  .final img {
    width: 320px;
  }
  .final .medalla {
    position: relative;
    width: auto;
    margin-bottom: 2rem;
  }
}

/* Bordes degradados */
.border-deg {
  position: relative;
  display: inline-block;
  padding-bottom: 5px; /* espacio para el borde */
}

.border-deg::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px; /* grosor del borde */
  background: linear-gradient(90deg, #00e0ff, #ff00ff, #00ffff);
  border-radius: 2px;
}

/* Para la tabla */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 8px 0;
  text-align: left;
  position: relative;
}

/* Línea inferior degradada para cada fila */
th::after,
td::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #00e0ff, #810a81, #00ffff);
  opacity: 0.5;
}

/* Opcional: quitar la línea del último tr */
/* tbody tr:last-child td::after {
  content: none;
} */
@media (max-width: 768px) {
  .container {
    width: 90%;
  }
  .categorias {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .categoria {
    height: 150px;
  }

  body {
    height: auto;
  }
  .inicio input,
  .btn-start {
    width: 300px;
  }

  .juego .pregunta {
    font-size: 20px;
  }
  .juego .opcion {
    font-size: 20px;
  }
  #btn-comenzar {
    margin-bottom: 1.5rem;
  }
}

#imagen-pais {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 1px solid;
  object-fit: cover;
}

/* Botón de información */
.info-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background-color: #00b4d8;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 18px;
}

/* Fondo del modal */
.info-modal {
  display: none; /* 🔹 Oculto por defecto */
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

/* Contenido del modal */
.info-content {
  background-color: #fff;
  color: #000;
  border-radius: 12px;
  padding: 30px 40px;
  width: 100%;
  max-width: 750px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  position: relative;
  animation: fadeIn 0.3s ease-out;
  font-size: 1.6rem;
}

/* Título */
.info-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}

/* Lista */
.info-content ul {
  padding-left: 20px;
  line-height: 1.6;
}

/* Botón cerrar */
.close-info {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}

/* Animación de entrada */
@keyframes fadeIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.suscripcion {
  text-align: center;
  margin-top: 60px;
  color: #fff;
  font-family: "Arial", sans-serif;
}

.suscripcion h3 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.suscripcion p {
  font-size: 1.5rem;
  color: #ccc;
  margin-bottom: 15px;
}

.input_email {
  color: #000;
  background-color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  margin: 10px 5px 20px;
  letter-spacing: 1px;
  font-size: 25px;
  width: 450px;
  outline: none;
  text-align: center;
  transition: all 0.3s ease;
}

.input_email:focus {
  box-shadow: 0 0 5px #00bfff;
}

#btn-guardar-email,
#btn-exportar {
  background-color: #00bfff;
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: bold;
  font-size: 25px;
  padding: 12px 25px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#btn-guardar-email:hover,
#btn-exportar:hover {
  background-color: #0099cc;
}

#mensaje {
  margin-top: 10px;
  color: #00ff99;
  font-size: 14px;
}
/* Responsivo */
@media (max-width: 600px) {
  .info-content {
    width: 90%;
    padding: 20px;
    max-width: 90%;
  }
  .info-content {
    font-size: 1.2rem;
  }

  .input_email {
    width: 90%;
  }
}

.categoria.bloqueada {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(70%);
}

.categoria.completada {
  opacity: 0.6;
  filter: grayscale(50%);
}
