* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}
.sticky-container{
    position: sticky;
    top: 105px;
}
body {
    background-color: #FFFDC8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-box {
    display: flex;
    flex-grow: 1;
    margin-top: 105px;
    margin-left: 100px;
}

.book-box {
    background-color: #4EA595;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 12px;
    margin-left: 6px;
    width: 390px;
    flex-shrink: 0;
}

.book-img {
    width: 342px;
    height: 505px;
    background-color: #1F5482;
    border: 5px solid #1F5482;
    object-fit: contain;
    display: block;
}
.book-box hr {
    border: none;
    height: 3px;
    background-color: #1F5482;
    width: 100%;
    margin-bottom: 20px;
}

.previa {
    background-color: #FFFDC8;
    border: none;
    border-radius: 50px;
    color: #574720;
    width: 100%;
    max-width: 342px;
    height: 58px;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    cursor: pointer;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.previa:hover {
    background-color: #1F5482;
    color: #FFFDC8;
}

.autor {
    font-size: 24px;
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 50px;
    font-family: sans-serif;
}

.autor-img {
    background-color: #1F5482;
    border: 2px solid #FFFDC8;
    border-radius: 50px;
    width: 80px;
    height: 80px;
    margin-right: 15px;
    object-fit: contain;
    flex-shrink: 0;
}

.autor-detalhes {
    text-decoration: none;
    color: #0c2942;
    font-weight: bold;
    font-size: 20px;
}

.autor-detalhes:hover {
    text-decoration: underline;
}

.infos p {
    color: #1F5482;
    font-size: 16px;
}

.text-main-box {
    background-color: #FFFDC8;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    gap: 30px;
}

.text-main-box hr {
    border: none;
    border-top: 2px solid #1F5482;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.title-section {
    flex-grow: 1;
    text-align: left;
}

.title {
    font-family: sans-serif;
    font-size: 42px;
    color: #1F5482;
}

.title span {
    font-weight: bold;
}

.sub-title {
    font-size: 20px;
    margin-top: 8px;
    font-family: sans-serif;
    color: #333;
}

.sub-title span {
    font-weight: bold;
}

#n-avalia {
    color: #e6a100;
    font-weight: bold;
    margin-left: 10px;
}

.btn-favoritar {
    background: #FFFDC8;
    border: 2px solid #1F5482;
    padding: 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    max-width: 160px;
    text-align: center;
    color: #1F5482;
    transition: background-color 0.1s ease, color 0.1s ease;
    flex-shrink: 0;
}

.btn-favoritar:hover {
    background-color: #4EA595;
    color: #FFFDC8;
}

.main-content {
    color: #1F5482;
    font-size: 22px;
    text-align: justify;
    font-family: sans-serif;
}

.info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
    font-family: sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #1F5482;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.info i {
    font-size: 50px;
}

.second-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.avaliacao-section,
.grafic {
    background: #FFFDC8;
    border: 2px solid #1F5482;
    padding: 25px;
    display: flex;
    gap: 40px;
    width: 100%;
    max-width: 650px;
    font-family: sans-serif;
    align-items: center;
    justify-content: center;
}

.title-container h2 {
    font-size: 26px;
    color: #1F5482;
    font-weight: normal;
    margin: 0;
    overflow-wrap: break-word;
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.bar-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.label {
    font-size: 12px;
    color: #4EA595;
    width: 70px;
    text-align: left;
}

.range {
    font-size: 12px;
    color: #000;
    width: 40px;
    text-align: center;
    margin-right: 8px;
}

.bar-fundo {
    background-color: #E9E7B7;
    border: 1.5px solid #4a3b32;
    border-radius: 50px;
    flex-grow: 1;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 3px;
}

.bar-preenchimento {
    background-color: #b92f38;
    border-radius: 50px;
    height: 20px;
}

#um {
    width: 93%;
}

#dois {
    width: 12%;
}

#tres {
    width: 8%;
}

.estrelas {
    font-size: 28px;
    color: #e6a100;
}

.nota-num {
    font-size: 48px;
    color: #351A13;
}

.avaliacao-estrelas {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    background-color: #E9E7B7;
    border: 2px solid #0c2942;
    width: 140px;
    padding: 3px 8px;
}

.avaliacao-estrelas input[type="radio"] {
    display: none;
}

.avaliacao-estrelas label {
    font-size: 18px;
    color: #351A13;
    cursor: pointer;
    transition: color 0.2s ease;
}

.avaliacao-estrelas label:hover,
.avaliacao-estrelas input[type="radio"]:checked~label {
    color: #e6a100;
}

.coment-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    font-family: sans-serif;
    border: 2px solid #1F5482;
    padding: 15px;
}

.jaToSemIdeia {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icone-comentario {
    font-size: 32px;
    color: #1F5482;
}

.coment-bar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    border: 2px solid #1F5482;
    background-color: #E9E7B7;
    padding: 6px 10px;
}

.coment-bar input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    color: #1F5482;
}

.coment-bar input::placeholder {
    color: #5b7996;
    text-decoration: underline;
}

.coment-bar button {
    background: transparent;
    border: none;
    color: #4EA595;
    font-size: 18px;
    cursor: pointer;
    padding-left: 10px;
}

.avaliaca1 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 20px;
    margin-left: 15px;
}

.avaliaca1 p {
    color: #1F5482;
    font-size: 14px;
    margin: 0;
}

.coments {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.coments img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #351A13;
    object-fit: cover;
    flex-shrink: 0;
}

.coment-infos {
    display: flex;
    flex-direction: column;
    position: relative;
    flex-grow: 1;
}

.coment-infos p {
    margin-left: 0;
    color: #1F5482;
}

.estrelasEagatres {
    display: flex;
    padding: 10px 0;
    align-items: center;
}

.estrelasEagatres h3 {
    font-size: 15px;
    margin-right: 20px;
    color: #1F5482;
}

.estrelasEagatres i {
    color: #e6a100;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background-color: #FFFDC8;
}

::-webkit-scrollbar-thumb {
    background-color: #1F5482;
    border-radius: 10px;
    border: 2px solid #FFFDC8;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #4EA595;
}

/* ========================================= */
/* MEDIA QUERIES DE RESPONSIVIDADE MELHORADAS */
/* ========================================= */

@media screen and (max-width: 1024px) {
    .main-box {
        margin-left: 20px;
        margin-right: 20px;
        margin-top: 40px;
    }
}

@media screen and (max-width: 900px) {
    .main-box {
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
        margin-top: 20px;
    }

    .book-box {
        width: 100%;
        margin-left: 0;
    }

    .text-main-box {
        padding: 20px;
    }

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

    .avaliacao-section,
    .grafic {
        max-width: 100%;
        gap: 20px;
    }

    .header-container {
        flex-direction: column;
        gap: 20px;
    }

    .btn-favoritar {
        max-width: 100%;
        width: 100%;
    }
}

@media screen and (max-width: 700px) {
    .title {
        font-size: 32px;
    }

    .sub-title {
        font-size: 16px;
    }

    .main-content {
        font-size: 18px;
    }

    .second-content {
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
    }

    .avaliacao-section,
    .grafic {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }

    .bar-row {
        gap: 5px;
    }

    .range {
        font-size: 11px;
        width: 30px;
        margin-right: 4px;
    }

    .label {
        font-size: 10px;
        width: 50px;
    }

    .title-container h2 {
        font-size: 18px;
    }

    .bar-fundo {
        width: 100%;
        height: 12px;
    }

    .bar-preenchimento {
        height: 6px;
    }

    .jaToSemIdeia {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .coment-bar {
        width: 100%;
    }

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

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

    .estrelasEagatres {
        justify-content: center;
    }

    .avaliaca1 {
        margin-left: 0;
        align-items: center;
    }
}