:root {
    /* --dark: #31081F; */
     /* --lightbg: #F9FBF2; */
    --dark: black;
    --lightbg: #F7F5F2;
    --darkheader: #252118;
    --booky: white;
}

* {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--dark);
}

.toastify .toast-body {
    color: black;
  }



body {
    width: 100%;
    justify-content: center;
    background-color: var(--lightbg);
}

header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: space-between;
    text-align: center;
    background-color: var(--darkheader);
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1;
    height: 100px;
}

header * {
    margin: 5px;
}


.profileimg img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

header button {
    background-color: var(--dark);
    color: var(--lightbg);
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid var(--lightbg);
    font-size: 20px;
}

header button:hover {
    background-color: var(--lightbg);
    color: var(--dark);
    cursor: pointer;
}

main {
    text-align: center;
    margin-top: 130px;
}

h1 {
    font-size: 30px;
    font-family: sans-serif, Arial, Helvetica;
    font-weight: 500;
}

h2 {
    font-size: 18px;
    overflow: hidden;
    box-sizing: border-box;
    line-height: 2em;

}

main img {
    max-width: 90%;
    display: block;
    margin: 20px auto;
}

#list {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#list button {
    padding: 10px;
    border-radius: 10px;
    font-size: 18px;
}

#list h1 {
    color: var(--dark);
    margin: 30px 5px;
}

#back-button, #backfbutton {
    margin-bottom: 30px;
}


.listsection {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.listsection h2 {
    width: 95%;
}


.listdiv, .bookdiv, .favdiv {
    display: flex;
    width: 90%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--dark);
    padding-bottom: 20px;
    margin-bottom: 20px;
    background-color: var(--booky) ;
}

.listdiv h2, .bookdiv h2, .favdiv h2 {
    background-color: var(--dark);
    color: var(--lightbg);
    margin-top: 0px;
    width: 100%;
    padding: 5px 0px;

}


.bookdiv img, .favdiv img {
    width: 70%;
}

button {
    background-color: var(--dark);
    color: var(--lightbg);
}

button:hover {
    background-color: var(--lightbg);
    color: var(--dark);
    cursor: pointer;
}

.books-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: space-around;
    align-items: center;
}

.books-buttons button {
    margin: auto 10px;
    padding: 10px;
    width: 90px;

}

form {
    display: flex;
    flex-direction: column;
    margin: 5% 18%;
}

input,
label {
    margin: 10px 0px;
}

input[type="submit"] {
    background-color: var(--lightbg);
    color: var(--dark);
    padding: 5px;
    border: solid var(--dark);
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: var(--dark);
    color: var(--lightbg);
}

#backf-button {
    margin-bottom: 20px;
}

#register,
#favlist,
#favbuttons {
    display: none;
}



@media screen and (min-width: 768px) and (max-width: 1366px) {

    header {
        justify-content: flex-start;
        height: 150px;
        flex-direction: row-reverse;
    }
    header * {
        margin: 5px 15px;
    }

    header > a > button {
       margin-right: 0px; 
    }
    .profileimg img {
        width: 100px;
        height: 100px;
        margin-right: 30px;
    }
    header button {
        padding: 15px 25px;
        font-size: 1.3em;
    }
    main {
        margin-top: 200px;
    }

    h1 {
        font-size: 3em;
    }

    main img {
        margin: 40px auto
    }

    #list button {
        padding: 20px;
        font-size: 1.2em;
    
    }

    #list h1 {
        margin: 60px 10px 50px 10px;

    }

    #back-button, #backfbutton {
        margin-bottom: 30px;
    }

    #list h2 {
        font-size: 1.5em;
    }

    .listsection {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
    }

    .listdiv, .bookdiv, .favdiv {
        width: 40%;
        margin: 20px;
        justify-content: space-between;
    }

    .listdiv h2 {
        height: 50%;
        display: flex;
        align-items: center;
        justify-content: center;

    }
    .listdiv p {
        height: 10%;
    }
    .listdiv button {
        height: 20%;
        margin-top: 10px;
    }

    .bookdiv h2, .favdiv h2 {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        margin-bottom: 0px;
        height: 100px;
        
    }
    .bookdiv img, .favdiv img {
        margin: 20px 0px;
        width: 50%;
    }
    .bookdiv > p:nth-child(1) {
        margin: 0px;
    }
    .bookdiv > p:nth-child(2) {
       display: flex;
       align-items: center;
       justify-content: center;
       margin: 0px;
    }

    .bookdiv > div, .favdiv > div {
        margin: 0px;
    }
 
    .favdiv p {
        display: flex;
       align-items: center;
       justify-content: center;
       margin: 25px 0px
    }
    .favdiv > div {
        margin: 0px;
    } 

    
    form {
        display: flex;
        flex-direction: column;
        margin: 5% 30%;
        font-size: 1.5em;
    }

    form > h2 {
        font-size: 1.3em;
    }

    #openregistration {
        font-size: 1.5em;
    }
    
    #outdiv > button {
        padding: 10px;
        font-size: 1.2em;
    }

}

@media screen and (min-width: 1366px) {

    header {
        justify-content: flex-start;
        height: 140px;
        flex-direction: row-reverse;
    }

    header * {
        margin: 5px 15px;
    }

    header > a > button {
        margin-right: 0px; 
    }

    .profileimg img {
        width: 110px;
        height: 110px;
        margin-right: 30px;
    }

    header button {
        padding: 15px 25px;
        font-size: 1.3em;
    }
    main {
        margin-top: 200px;
    }

    h1 {
        font-size: 3.5em;
    }

    main img {
        width: 60%;
    }

    #list button {
        padding: 20px;
        font-size: 1.2em;
    }

    #list h1 {
        margin: 60px 10px 50px 10px;
    }

    #back-button, #backfbutton {
        margin-bottom: 30px;
    }

    #list h2 {
        font-size: 1.5em;
        margin-bottom: 40px;
    }

    .listsection {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        margin: 0px 20px;
    }

    .listdiv, .bookdiv, .favdiv {
        width: 30%;
        margin: 40px 15px;
        justify-content: space-between;
        min-width: 30%;
    }


    .listdiv h2 {
        height: 50%;
        padding: 0px 1px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .listdiv p {
        height: 10%;
    }
    .listdiv button {
        height: 20%;
        margin-top: 10px;
    }

    .bookdiv h2, .favdiv h2 {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        margin-bottom: 0px;
        height: 100px;
        
    }
    .bookdiv img, .favdiv img {
        margin: 20px 0px;
        width: 45%;
    }
    .bookdiv > p:nth-child(1) {
        margin: 0px;
    }
    .bookdiv > p:nth-child(2) {
       display: flex;
       align-items: center;
       justify-content: center;
       margin: 0px;
    }

    .bookdiv > div, .favdiv > div {
        margin: 0px;
    }
 
    .favdiv p {
        display: flex;
       align-items: center;
       justify-content: center;
       margin: 25px 0px;
    }
    .favdiv > div {
        margin: 0px;
    } 

    
    form {
        display: flex;
        flex-direction: column;
        margin: 5% 30%;
        font-size: 1.5em;
    }

    form > h2 {
        font-size: 1.3em;
    }

    #openregistration {
        font-size: 1.5em;
    }

    #outdiv > button {
        padding: 10px;
        font-size: 1.2em;
    }
}