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



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

#headerLogueado {
    display: flex;
    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: 100px;
}

.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;
}


.portada {
    width: 200px;
    height: 300px;
}

.reto {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 100px;
}

.imagen__reto {
    width: 226px;
    height: 226px;
    margin-right: 55px;
}

.titulo__reto {
    font-size: 48px;
    margin-bottom: 25px;
}

.boton__reto {
    display: inline-block;
    width: 540px;
    height: 55px;
    line-height: 55px;
    background-color: #FF8000;
    color: white;
    font-size: 35px;
    text-decoration: none;
    text-align: center;
    border-radius: 20px;
    margin-left: 34px;
    margin-top: 20px;
}

.texto__reto {
    width: 612px;
    font-size: 24px;
}


.historias__autor {
    display: flex;
    justify-content: space-between;
    margin-left: 168px;
    margin-right: 168px;

}

.titulo__historias__autor {
    font-size: 40px;
}

.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;
    margin-bottom: 16px;
}

.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;
}


.menu__paginacion {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 48px;
}

.paginacion {
    display: inline-block;
    width: 143px;
    height: 40px;
    line-height: 40px;
    background-color: #DAD2FF;
    border-radius: 20px;
    text-align: center;
    font-size: 16px;
    color: black;
    text-decoration: none;
    margin-right: 20px;
}





.footer__links {
    display: flex;
    justify-content: space-around;
    font-size: 24px;
    padding-top: 37px;
}

.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;
    }
}


/*
seccion entrar por historia al panel
 */


.volver {
    display: inline-block;
    font-size: 32px;
    width: 257px;
    height: 60px;
    background-color: #FFF2AF;
    text-decoration: none;
    border-radius: 20px;
    text-align: center;
    line-height: 60px;
    margin-top: 30px;
    margin-left: 130px;
    margin-bottom: 30px;
}

.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: 29px;
}

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

.editar__historia {
    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;
}

.capitulos__h2 {
    display: flex;
    font-size: 60px;
    padding-bottom: 90px;
    align-items: center;
    justify-content: center;
}

.capitulos__texto {
    text-align: center;
}

.añadir {
    text-decoration: none;
    margin-left: 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;
    }
}

#preview {
    width: 30%;
}

.contenedor__crear {
    display: flex;
    margin-left: 54px;
    margin-right: 54px;
    font-size: 32px;
    justify-content: center;
    margin-bottom: 54px;

    form {
        display: flex;
        flex-direction: column;
        margin-left: 60px;


        input {
            width: 700px;
            margin-bottom: 25px;
            margin-top: 10px;

        }

        #titulo {
            height: 50px;
            border-radius: 20px;
        }

        #descripcion {
            height: 300px;
            margin-bottom: 25px;
            margin-top: 10px;
            border-radius: 20px;
        }

        #categoria {
            margin-bottom: 25px;
            margin-top: 10px;
            height: 50px;
            border-radius: 20px;
        }

  
        .recomendacion{
            font-size: 14px ;
            margin-bottom: 25px;
        }

        button {
            height: 50px;
            border-radius: 20px;
            background-color: #FF8000;
            font-size: 32px;
        }
    }
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.titulo__editor {
    margin-top: 50px;
    width: 90%;
}

#titulo {
    width: 90%;
    border-radius: 20px;
    margin-bottom: 25px;
}

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

.boton__capitulo {
    width: 50%;
    height: 50px;
    background-color: #FF8000;
    border-radius: 20px;
    font-size: 20px;
    margin-bottom: 10px;
}


.titulo__seguir{
    margin-top: 2%;
    margin-left: 2%;
    margin-bottom: 2%;
}

.sinlectura{
    margin-left: 2%;
}

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

.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;
    }
}

.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;
}



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


    .flecha {
        display: none;
    }

    .reto {
        width: 100%;
        align-items: center;
    }

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



    .boton__reto {
        width: 90%;
    }

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

    .historia__card {
        width: 90%;
    }

    .descripcion__historia {
        width: 80%;
    }

    .boton1,
    .boton2,
    .boton3 {
        margin-right: 5px;
    }

    .imagen__lupa {
        margin-right: 5px;
    }


    #preview {
        width: 40%;
    }

    .contenedor__crear {
        margin-left: 5px;
        margin-right: 5px;

        form {
            margin-left: 10px;
            width: 100%;

            input {
                width: 95%;
            }

            #descripcion {
                width: 95%;
            }

            button {
                width: 95%;
            }

            #categoria {
                width: 95%;
            }

        }
    }

    .capitulo__contenedor {
        margin-left: 5%;
        margin-right: 5%;
    }

    .titulo__panel,
    .descripcion__panel {
        width: 100%;
    }
}

@media (max-width: 850px) {

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




}


@media (max-width: 750px) {


    .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;
    }

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

    .imagen__reto {
        margin-right: 5px;
    }

    .imagen__historia {
        margin-right: 5px;
    }

    .boton__reto {
        margin-left: 0px;
    }

    .contenedor__crear {
        flex-direction: column;
        align-items: center;

        form {
            align-items: center;
        }
    }

    #preview {
        width: 90%;
    }

    .volver {
        margin-left: 20px;
    }


    .imagen__panel {
        width: 40%;
        height: auto;
    }

    .titulo__panel {
        width: 60%;
    }

    .descripcion__panel {
        width: 60%;
    }

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

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

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

    .imagen__panel {
        margin-right: 0px;
    }

    .titulo__panel {
        text-align: center;
    }

    .descripcion__panel {
        width: 90%;
    }

    .añadir {
        margin-left: 30%;
    }

    .editar__historia {
        margin-right: 0px;
    }

    .crear__reto__descripcion{
        flex-direction: column;
        p{
            margin-top: 20px;
        }

        hr{
            margin-top: 50px;
        }
    }

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

.titulo__contenedor{
    margin-top: 10px;
}

.autor{
    margin-left: 25px;
}



}

@media (max-width: 650px) {

    .card__contenido {
        width: 100%;
    }

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


    .descripcion__historia {
        width: 95%;
    }

    .boton1,
    .boton2,
    .boton3 {
        width: 30%;
    }

    .titulo__historia {
        text-align: center;
    }


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

    .textarea__header {
        width: 50%;
    }

    .reto {
        flex-direction: column;
    }

    .boton__reto {
        width: 100%;
    }


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

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

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

    .descripcion__panel {
        width: 90%;
    }

    .añadir {
        margin-left: 10%;
    }

    .capitulo__contenedor {
        margin-left: 1%;
        margin-right: 1%;
    }
}

@media (max-width: 500px) {
    .añadir {
        margin-left: 5%;
    }

    .capitulos__h2 {
        padding-bottom: 10px;

    }

    .capitulos__texto {
        font-size: 45px;
    }

    .capitulo__contenedor {

        h3 {
            font-size: 32px;
        }

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