* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    background-color: #f5f1eb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    min-height: 525px;
}

/*
========
Header
========
*/

header {
    background-color: #c28447;
    border-bottom: 6px solid #d6c2a8;
}

.img-header {
    height: 50px;
}

header span {
    margin-left: 20px;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
}

.header-div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 80px;
}

.logotipo {
    display: flex;
    align-items: center;
}

.logotipo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

header a {
    text-decoration: none;
}

.btn-add-review {
    background-color: #ef233c;
    color: #ffffff;
    border: 1px solid #000000;
    width: 35px;
    height: 35px;
    font-size: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-review p {
    margin-bottom: 10px;
}

.btn-add-review:hover {
  background-color: #d0182f;
}

/*
========
Footer
========
*/

footer {
    background-color: #c28447;
    border-top: 6px solid #d6c2a8;
    padding: 5px;
}

footer p {
    text-align: center;
    color: #ffffff;
    font-size: 18px;
}

/*
=======
Index
=======
*/

.index-section {
    display: flex;
    flex-wrap: wrap;
    padding: 30px 80px;
    row-gap: 40px;
    column-gap: 60px;
}

main a {
    text-decoration: none;
}

.book-card {
    background-color: #FEFEFD;
    border-radius: 12px;
    border: 1px solid #8d99ae;
    height: auto;
    width: 250px;
    box-shadow: 0px 4px 3px 0px #00000040;
    transition: box-shadow 0.3s ease-in-out;
    animation: fadeInUp 0.8s ease-out forwards;
}

.book-card:hover {
    box-shadow: 0px 8px 16px 0px #00000040;
}

.book-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0px 0px;
}

.book-card h2 {
    font-weight: 700;
    font-size: 18px;
    margin-top: 10px;
    color: #000000;
    text-align: center;
}

.rating {
    display: flex;
    justify-content: center;
    color: #fafa0b;
    font-size: 28px;
    margin-top: 8px;
    margin-bottom: 10px;
    -webkit-text-stroke: 1px #383a52;
    gap: 8px;
}

.star-empty {
    color: #fffefe;
}


/*
==========
Details
==========
*/

.details-book-card {
    max-width: 1200px;
    margin: 50px auto;
    background-color: #FEFEFD;
    padding: 48px 90px 86px;
    border-radius: 12px;
    box-shadow: 0px 4px 4px 0px #00000040;
}

.details-book-layout {
    display: flex;
    gap: 32px;              
    align-items: flex-start;
}

.back-link {
    margin-bottom: 25px;
}

.back-link a {
    font-size: 18px;
    text-decoration: none;
    color: #000000;
}

.back-link a:hover {
    text-decoration: underline;
}

.details-book-card img {
    width: 380px;
    height: auto;
    border-radius: 12px;
}

.details-book-card h1 {
    font-size: 46px;
    margin-bottom: 30px;
}

.details-book-card p {
    font-size: 22px;
    line-height: 1.5;
}

.details-book {
    margin-bottom: 20px;
}

.details-rating {
    color: #fafa0b;
    font-size: 36px;
    margin-top: 8px;
    margin-bottom: 10px;
    -webkit-text-stroke: 1px #383a52;
    gap: 8px;
}

/*
==========
Add-Book
==========
*/

.form-add-review h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.form-add-review h2 {
    font-weight: 400;
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
}

.form-add-review {
    background: #FEFEFD;
    border-radius: 12px;
    padding: 33px 61px;
    box-shadow: 0px 4px 4px 0px #00000040;
    max-width: 800px;
    margin: 60px auto;
}

.input-group {
    margin-bottom: 34px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 24px;
    margin-bottom: 6px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    transition: border-color 0.5s ease;
}

.input-group input:hover {
    border: 1px solid #626263;
}

#review-text {
    resize: none;
}

.submit-btn {
    background: #31a821;
    border-radius: 12px;
    border: none;
    padding: 12px;
    color: #ffffff;
    font-weight: 400;
    font-size: 20px;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
}

/*
================
Responsividade
================
*/

@media (max-width: 540px) {

    main {
        min-height: 320px;
    }

    /* Header */
    .header-div {
        padding: 10px 30px;
    }

    header span {
        font-size: 18px;
        margin-left: 10px;
        text-align: center;
    }

    .img-header {
        height: 42px;
    }

    .btn-add-review {
        width: 30px;
        height: 30px;
        font-size: 32px;
    }

    .btn-add-review p {
        margin-bottom: 10px;
    }


    /* Footer */
    footer p {
        font-size: 15px;
    }

    /* Index */
    .index-section {
        padding: 20px 16px;
        justify-content: center;
    }

    .book-card {
        width: 50%;
        max-width: 300px;
    }

    .book-card img {
        height: 200px;
    }

    .book-card h2 {
        font-size: 17px;
    }

    .rating {
        font-size: 24px;
        gap: 6px;
    }

    /* Details */
    .details-book-card {
        padding: 24px 30px;
        margin: 24px 16px;
    }

    .details-book-layout {
        flex-direction: column;
        align-items: center;
    }

    .details-book-card img {
        width: 100%;
        max-width: 350px;
    }

    .details-book-card h1 {
        font-size: 28px;
        text-align: center;
    }

    .details-book-card p {
        font-size: 17px;
        text-align: justify;
    }

    .details-rating {
        font-size: 28px;
        justify-content: center;
    }

    /* Add-Review */
    .form-add-review {
        padding: 24px 20px;
        margin: 24px 16px;
        max-width: 100%;
    }

    .form-add-review h1 {
        font-size: 24px;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .input-group label {
        font-size: 16px;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
        font-size: 14px;
        padding: 10px;
    }

    .submit-btn {
        font-size: 18px;
        padding: 12px;
    }
}

/*
===========
Animações
===========
*/

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}