* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    width: 100%;
    height: 100px;
    background-color: #493D9E;
    font-size: 24px;
    color: white;
}

#headerLogueado,
#headerAnonimo {
    min-height: 100px;
    align-items: center;
    justify-content: center;
}

.logo__header {
    width: 65px;
    height: 65px;
    margin-right: 25px;
}

.flecha {
    width: 23px;
    height: 23px;
    margin-left: 10px;
    margin-right: 37px;
}

.boton__biblioteca {
    text-decoration: none;
    margin-right: 60px;
    color: white;
}

.boton__header,
.boton__buscar {
    all: unset;
}

.textarea__header {
    width: 461px;
    height: 41px;
    border-radius: 12px;
    margin-right: 10px;
    resize: none;
}

.imagen__lupa {
    width: 41px;
    height: 41px;
    margin-right: 25px;
}

.registrarse__header {
    text-decoration: none;
    color: white;
    margin-left: 40px;
}

.menu-movil {
    display: none;
    /* oculto por defecto */
    position: fixed;
    top: 60px;
    /* ajusta según tu header */
    right: 15px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    width: 200px;
    padding: 15px;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.menu-movil.activo {
    display: flex;
}

.menu__toggle {
    display: none;
    /* por defecto oculto */

    top: 20px;
    right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}


.presentacion {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 67px;
    padding-bottom: 88px;
}

.presentacion__texto {
    font-size: 40px;
    width: 595px;
    height: 264px;
    padding-left: 88px;

}

.botones__presentacion__contenedor {
    display: flex;
    justify-content: center;
    line-height: 77px;


}

.botones__presentacion {
    display: inline-block;
    width: 300px;
    height: 77px;
    background-color: #493D9E;
    color: white;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    font-size: 32px;
}

.botones__presentacion2 {
    display: inline-block;
    width: 300px;
    height: 77px;
    background-color: #493D9E;
    color: white;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    font-size: 32px;
    margin-left: 195px;
}

.linea__separadora__contenedor {
    display: flex;
    justify-content: center;
}

.linea__separadora {
    margin-top: 40px;
    width: 1300px;
    background-color: #493D9E;
}


.secciones {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    padding-bottom: 50px;
}

.titulo__secciones {
    margin-left: 86px;
    font-size: 40px;
}

.enlace__secciones {
    margin-right: 116px;
    font-size: 32px;
    text-decoration: none;
    color: black;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1200px;
}

#galeriaGenero {
    margin: 0 120px;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 🎯 5 columnas iguales */
    gap: 20px;
}


.enlacePortada1 {
    width: calc(20% - 20px);
    /* 5 por fila - se resta gap */
    margin-bottom: 20px;
}


.portada {
    aspect-ratio: 2 / 3;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


.footer__links {
    display: flex;
    justify-content: space-around;
    font-size: 20px;
    padding-bottom: 37px;
    a {
        text-decoration: none;
        color: black;
    }
}

.text__footer {
    text-align: center;
    font-size: 24px;
    padding-top: 37px;
    width: 640px;
    align-items: center;
}

.footer__texto {
    display: flex;
    justify-content: center;
}


.footer__redes {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.footer__iconos,
.footer__iconos2 {
    height: 44px;
    width: 44px;

}

.footer__iconos2 {
    margin-left: 20px;
}

.bienvenida__texto {
    font-size: 40px;
    width: 595px;
    height: 352px;
    padding-left: 88px;
}

.registro {
    text-align: center;



    label {
        display: block;
        font-size: 36px;
        margin-top: 40px;
    }

    input {
        width: 674px;
        height: 84px;
        font-size: 24px;
        border-radius: 20px;
        margin-top: 20px;
    }

    button {
        width: 418px;
        height: 96px;
        border-radius: 20px;
        background-color: #FFF2AF;
        font-size: 36px;
        margin-top: 45px;
    }
}





.panel__historia {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}


.imagen__panel {
    width: 301px;
    height: 452px;
    margin-right: 54px;
}

.titulo__panel {
    font-size: 64px;
    margin-bottom: 10px;
}

.descripcion__panel {
    font-size: 32px;
    width: 762px;
    margin-top: 10px;
}

.capitulos__h2 {
    display: flex;
    font-size: 60px;
    justify-content: space-between;
    position: relative;
    padding-bottom: 90px;
}

.capitulos__texto {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}



.capitulo__contenedor {
    display: flex;
    justify-content: space-between;
    margin-left: 140px;
    margin-right: 140px;
    margin-top: 40px;

    h3 {
        font-size: 48px;
    }

    p {
        font-size: 24px;
    }

    img {
        width: 75px;
        height: 75px;
    }
}



#tituloHistoria {
    font-size: 32px;
    margin-left: 94px;
    margin-top: 40px;
}

#tituloCapitulo {
    text-align: center;
    font-size: 64px;
    padding-bottom: 80px;
}

.contenido__capitulo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#contenidoCapitulo {

    width: 1156px;
    font-size: 24px;
}




.titulo__busqueda {
    text-align: center;
    font-size: 45px;
    margin-top: 20px;
}

.nueva__historias__autor {
    display: inline-block;
    width: 263px;
    height: 60px;
    line-height: 60px;
    background-color: #FFF2AF;
    border-radius: 20px;
    text-align: center;
    font-size: 24px;
    color: black;
    text-decoration: none;
}

.historia__contenedor {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 60px;
    align-items: center;

}

.historia__card {
    display: flex;
    margin-bottom: 50px;
}

.imagen__historia {
    width: 200px;
    height: 300px;
    margin-right: 60px;
}

.titulo__historia {
    font-size: 40px;
    display: block;
    margin-bottom: 20px;
}

.descripcion__historia {
    font-size: 24px;
    width: 792px;

}

.boton1,
.boton2,
.boton3 {
    display: inline-block;
    width: 205px;
    height: 58px;
    line-height: 58px;
    background-color: #FFF2AF;
    border-radius: 20px;
    text-align: center;
    font-size: 24px;
    color: black;
    text-decoration: none;
    margin-top: 20px;
    margin-right: 60px;
}



#linkSiguiente{
   display: block;
  width: fit-content;
  margin: 0 auto;
  margin-bottom: 1%;
  margin-top: 1%;
  text-decoration: none;
    
}

.verificar__container{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5%;
}

.verificar__texto{
    font-size: 48px;
}

.verificar__imagen{
    margin-top: 25px;
    width: 462px;
    height: 462px;
    animation-name: girar;
    animation-duration: 3s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.verificar__container__exito{
      display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5%;

    img{
        width: 228px;
        height: 228px;
        margin-right: 50px;
    }
}

.verificar__exito__texto{
    font-size: 48px;
}

.verificar__exito__texto2{
    font-size: 32px;
}

@keyframes girar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.autor{
    font-size: 24px;
    color: black;
}

.corazon{
    width: 64px;
    height: 64px;
    margin-left: 10px;
    cursor: pointer;
}

.titulo__contenedor{
    display: flex;
    justify-content: space-between;
}


.crear__reto__titulo{
    text-align: center;
    font-size: 64px;
}

.crear__reto__descripcion{
    display: flex;
     justify-content: center;
     align-items: center;
     padding-top: 50px;
     padding-bottom: 50px;

    p{
        width: 40%;
        font-size: 32px;
    }

    img { 
        width: 434px;
        height: 434px;
    }
}

.ranking__reto__contenedor{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ranking__reto{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 65px;
}

.ranking{
    font-size: 70px;
}

.ranking__imagen{
    width: 222px;
    height: 333px;
    margin-left: 65px;
}

.ranking__historia{
    margin-left: 65px;
    max-width: 800px;
}

.ranking__titulo{
    font-size: 40px;
}

.ranking__texto{
    font-size: 24px;
    width: 100%;
    min-width: 800px;
}

.ranking__autor{
    font-size: 24px;
    margin-top: 10px;
    margin-bottom: 10px;
    color: black;
}

.ranking__boton{
    display: inline-block;
    width: 205px;
    height: 58px;
    line-height: 58px;
    background-color: #FFF2AF;
    border-radius: 20px;
    text-align: center;
    font-size: 24px;
    color: black;
    text-decoration: none;
    margin-top: 20px;
}


.autor__perfil{
    text-align: center;
    margin-top: 50px;
    font-size: 50px;
}

.olvido{
    margin-top: 20px;
    display: block;
    text-align: center;
    font-size: 24px;
}

.solicitud__correo__recuperacion{
    margin-top: 20px;
    font-size: 50px;
    margin-bottom: 20px;
}

@media (max-width: 1200px) {
    .boton__header {
        display: none;
    }

    .galeria {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Oculta desde el 5º elemento en adelante */
    .galeria>*:nth-child(n+5) {
        display: none;
    }

    .flecha {
        display: none;
    }

    #contenidoCapitulo {

        width: 90%;
    }

    .historia__card,
    .titulo__historia,
    .descripcion__historia {
        width: 90%;
    }

    .boton1 {
        width: 100%;
        margin-right: 0px;
    }

    .contenedor__panel {
        width: 60%;
    }

    .descripcion__panel {
        width: 100%;
    }

    .crear__reto__descripcion{
        flex-direction: column;
        text-align: center;
        img{
            width: 30%;
            height: 30%;
            margin-bottom: 20px;
        }
        p{
            width: 90%;
        }
    }

    .ranking__historia{
        width: 100%;
        min-width: 50%;
    }

    .ranking__texto{
        min-width: 100%;
        height: auto;
    }

.ranking__reto{
  width: 90%;
}
}

@media (max-width: 950px){
    .ranking__imagen{
        margin-left: 5%;
    }

    .ranking__historia{
        margin-left: 5%;
        min-width: 50%;
}

.ranking__texto{
    min-width: 90%;
    height: auto;}
}


@media (max-width: 850px) {

    .botones__presentacion2 {
        margin-left: 50px;
    }

#galeriaGenero {
    margin: 0 5%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}




}

@media (max-width: 750px) {



    .presentacion {
        flex-direction: column;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .presentacion__texto {
        width: 90%;
        height: auto;
        text-align: center;
        padding-left: 0;
        font-size: 30px;
    }

    .boton__biblioteca {
        margin-right: 10px;
    }

    .registrarse__header {
        margin-left: 0px;
        text-align: center;
    }

    .galeria {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo__header {
        margin-right: 5px;
    }



    .menu__toggle {
        display: block;
    }

    .activo {
        display: flex !important;
    }

    .boton__biblioteca {
        display: none;
    }

    .registrarse__header {
        display: none;
    }

    .registro {
        input {
            width: 90%;
        }

        button {
            width: 90%;
        }
    }

    .bienvenida__texto {
        padding-left: 0px;
        width: 90%;
        height: auto;
        text-align: center;
    }

        .imagen__historia {
        margin-right: 5px;
    }


    .corazon{
    width: 64px;
    height: 64px;
    margin-right: 10px;
    cursor: pointer;
}

.titulo__contenedor{
    margin-top: 10px;
}

.autor{
    margin-left: 25px;
}

}

@media (max-width: 650px) {


    .portada {
        width: 100%;
        height: auto;
    }

    .galeria {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .galeria>*:nth-child(n+3) {
        display: none;
    }

    .presentacion__texto {
        font-size: 24px;
        width: 100%;
    }

    .botones__presentacion,
    .botones__presentacion2 {
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
    }

    .footer__links {
        flex-direction: column;
        align-items: center;
    }

    .textarea__header {
        width: 50%;
    }

    .panel__historia {
        flex-direction: column;
        align-items: center;
    }

    .imagen__panel {
        width: 90%;
        height: auto;
        margin-right: 0px;
    }

    .contenedor__panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }



    .titulo__panel {
        width: 100%;
        text-align: center;
    }

    .descripcion__panel {
        width: 100%;
        text-align: center;
    }

    .capitulo__contenedor {
        margin-left: 10px;
        margin-right: 10px;
    }



    .verificar__container__exito{
 flex-direction: column;
}


.ranking{
    font-size: 30px;
}

.ranking__texto{
    font-size: 20px;
}

.ranking__titulo{
    font-size: 30px;
}

.ranking__imagen{
    width: 40%;
    height: 40%;
}

.ranking__boton{
    width: 40%;
}

.titulo__panel{
    font-size: 50px;
}

.descripcion__panel{
    font-size: 24px;
}

.capitulos__texto{
    font-size: 50px;
}

}

@media (max-width: 500px) {

    .titulo__secciones {
        margin-left: 5px;
        font-size: 30px;
    }

    .enlace__secciones {
        margin-right: 5px;
    }

    .botones__presentacion,
    .botones__presentacion2 {
        font-size: 22px;
    }
}