
 body {
  min-height: 100vh;

  background:
    linear-gradient(
      rgba(244, 241, 234, 0.92),
      rgba(244, 241, 234, 0.92)
    ),
    url("./assets/background.jpg");

  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;

  font-family: Georgia, serif;
  text-align: center;
  padding: 40px;

}
#portada {
  display: block;
  max-width: 100%;
  width: 400px; /* más grande */
  margin: 15px auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#portada:hover {
  transform: scale(1.2);
}


    h1 {
        letter-spacing: 1px;
        font-family: Georgia, serif;
    }



   .div1{
           width: auto;
           background: rgba(145, 240, 205, 0.3);
            border: 1px solid;
            border-radius: 15px;
            padding: 10px;
     margin-left: 10%;
     margin-right: 10%;
       }

 .div11{
           width: auto;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid;
            border-radius: 15px;
            border-color: crimson;
            padding: 10px;
       }

     img{
          max-width: 100%;
         height: auto;
         box-shadow: 0 10px 30px rgba(0,0,0,0.4);
         border-radius: 15px;
         justify-content: center;
        align-items: center;
         margin: auto;
    }

   /* Barra superior */
.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;

}

/* Botón */
.btn-acceder {
  background:none;
  color: #0067fe;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
    margin-bottom: 4px;
}


.btn-acceder:hover {
  color: #ff0000;

}

/* Línea divisoria */
.divider {
  width: 50%;
  border: none;
  border-top: 1px solid #151111;
  margin: 0 auto;
    margin-bottom: 5px;
}

.portada{
    margin-bottom: 20px;
}

/* Modal */
.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); /* fondo semitransparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  position: relative;
}

/*registro lecturas*/
.registro-lectura {
  background: #1f2937;
  color: #e5e7eb;
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(0,0,0,.4);
}

.registro-lectura h2 {
  margin-bottom: 15px;
  text-align: center;
}

/* Buscador */
.buscador {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.buscador input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
}

.buscador button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #3b82f6;
  color: white;
}

/* Libro seleccionado */
.libro-seleccionado {
  display: flex;
  gap: 15px;
  background: #111827;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.libro-seleccionado img {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #374151;
}

/* Datos */
.datos-libro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}

.datos-libro label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #9ca3af;
}

.datos-libro input,
.datos-libro select {
  margin-top: 4px;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: #374151;
  color: white;
}

/* Acciones */
.acciones {
  display: flex;
  justify-content: space-between;
}

.btn-principal {
  background: linear-gradient(90deg, gold, orange);
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

.btn-secundario {
  background: transparent;
  border: 1px solid #6b7280;
  color: #d1d5db;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}

/*lector*/
body2 {
  background: #1b1f2a;
  font-family: 'Segoe UI', sans-serif;
  color: #eee;
}

.hud {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

.player-card {
  display: flex;
  gap: 20px;
  background: #252b3a;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid gold;
}

.xp-bar, .progress-bar {
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  height: 12px;
}

.xp-fill {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, gold, orange);
}

.progress-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #00ffaa, #00cc88);
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.panel {
  background: #252b3a;
  padding: 15px;
  border-radius: 12px;
}

button {
  background: #3b82f6;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  margin-top: 8px;
}

button.gold {
  background: linear-gradient(90deg, gold, orange);
  color: black;
}

/*resutlados busqueda*/
.resultados {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #111827;
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.resultados li {
  display: flex;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #374151;
}

.resultados li:hover {
  background: #1f2937;
}

.resultados img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.resultados .info {
  font-size: 14px;
}

.hidden {
  display: none;
}

.feed-logros {
  width: 100%; /* se adapta al div padre */
  height: 180px;
  overflow: hidden;
  background: #f0f4f8;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-right: 15px;
}

  .logro-feed {
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  color: white;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  animation: popup 0.8s forwards;

}

/* Animación “pop” + fade */
@keyframes popup {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

/* Colores según rareza */
.logro-normal { background: #f1c40f; }
.logro-raro { background: #2980b9; }
.logro-legendario { background: #9b59b6; }

/* Emoji por rareza */
.emoji-normal::before { content: "📦 "; }
.emoji-raro::before { content: "💎 "; }
.emoji-legendario::before { content: "🏆 "; }

.panel-comunidad {
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  background: #111;
  color: #fff;
  border: 2px solid #555;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  font-family: 'Segoe UI', sans-serif;
}

.ticker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: scrollUp 15s linear infinite;
}

.ticker-item {
  background: #232323;
  padding: 8px 12px;

  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: 0.9em;
  transition: transform 0.3s;
}

.ticker-item:hover {
  transform: scale(1.05);
}

.ticker-item .icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  display: inline-block;
}

.ticker-item.legendario { border-left: 4px solid gold; }
.ticker-item.raro { border-left: 4px solid violet; }
.ticker-item.comun { border-left: 4px solid #aaa; }

@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
#logrosComunidad {
    margin-top: 300px;
  margin: 0 auto;        /* centra horizontalmente */
  display: block;         /* asegúrate que se comporte como bloque */
}
@media (max-width: 768px) {

  body {
    padding: 15px;
    background-attachment: scroll;
    background-position: center;
  }

  .div1 {
    margin-left: 0;
    margin-right: 0;
  }

  #portada {
    width: 100%;
    max-width: 320px;
  }

  .panel-comunidad {
    width: 100%;
  }

  .libro-seleccionado {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .datos-libro {
    grid-template-columns: 1fr;
  }

  .panels {
    grid-template-columns: 1fr;
  }

  .top-bar {
    justify-content: center;
  }
}

.panel-actividad {
  width: auto;

  max-width: fit-content;
  justify-self: center;
  background: rgba(84, 168, 235, 0.52);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 50px;
  color: #eee;
}

#logro-dinamico {

  display: flex;

  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.5s ease;
}

.icono {
  font-size: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel-logros {
  max-width: auto;       /* o el ancho que quieras */
  height: auto;           /* altura fija */
  overflow: hidden;        /* esconder overflow */
  display: flex;
  flex-direction: column;  /* vertical */
  gap: 8px;

  padding: 8px;
  align-items: center;
  border-radius: 6px;
}
.panel-horizontal {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0;
}
.reto-card {
  border: 2px solid #2196f3;
  min-width: 180px;
  flex-shrink: 0;
}
#hallOfFame {
  margin: 30px auto;
justify-items: center;
  max-width: 300px;
  background: #0f172a;
  border-radius: 12px;
  padding: 16px;
  color: white;
}

#ranking .jugador {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #334155;
}

#ranking .jugador:last-child {
  border-bottom: none;
}

.jugador .nombre {
  font-weight: bold;
}

.jugador .stats {
  font-size: 0.85rem;
  opacity: 0.8;
}

.top1 { color: gold; }
.top2 { color: silver; }
.top3 { color: #cd7f32; } /* bronce */

.comentario-card{

  max-width:300px;

  background: rgba(84, 168, 235, 0.52);
  border-radius:8px;
  padding:12px;
  margin:10px auto;
  border-left:4px solid gold;
}



