

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 600; /* или 700 — если хочешь ещё жирнее */
    -webkit-font-smoothing: antialiased;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 14px;
    position: relative;
}
.logo {
    font-size: 20px;
    font-weight: bold;
}
.center-links, .right-links {
    display: flex;
    gap: 20px;
}
.navbar a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}
.navbar a:hover {
    color: #007bff;
}
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
}
.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: absolute; /* <-- фиксируем по всему экрану */
    top: 60px; /* Высота навбара */

    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px 0;
    z-index: 999; /* <-- высокий z-index, чтобы быть выше всех карточек */
}
.mobile-menu a {
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 768px) {
    .center-links, .right-links {
        display: none;
    }
    .burger {
        display: flex;
    }
}

.e-con-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* отступы между блоками */
}

.e-con-inner > .e-child {
    flex: 1 1 calc(50% - 20px); /* два в строку с отступами */
    box-sizing: border-box;
}

.rating-result {
    width: 265px;

}
.rating-result span {
    padding: 0;
    font-size: 25px;
    margin: 0 3px;
    line-height: 1;
    color: lightgrey;
}
.rating-result > span:before {
    content: '★';
}
.rating-result > span.active {
    color: gold;
    text-shadow: 1px 1px #c60;
}

.book-card {

    justify-content: center;
    display: flex;

    align-items: center;
    gap: 40px;
    margin: 40px auto;
    padding: 30px;
    max-width: 1200px;
    width: 95%;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    flex-wrap: wrap; /* чтобы на телефонах тоже красиво */
}
.book-cover {
    flex: 1 1 400px;
    display: flex;
    margin: 0px;
    padding: 0px;
    justify-content: center;
}
.cover-image {
    width: 100%;               /* Занимает всю ширину родителя */
    height: auto;              /* Сохраняет пропорции */
    max-width: 100%;           /* Не выходит за пределы родителя */
    object-fit: contain;       /* Подстраивает изображение без обрезания */
    border-radius: 8px;
    display: block;            /* Избавляет от лишнего пробела снизу */
}
.book-info {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.author-info, .rating-result, .book-description, .actions, .genres {
    margin-top: 10px;
}
.book-title {
    font-size: 28px;
    font-weight: bold;
}


.btn-primary {
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    border-radius: 5px;
    display: inline-block;
    margin-right: 15px;
}
.actions a {
    margin-right: 10px;
}
.genres a {
    text-decoration: none;
    color: #007bff;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .book-card {
        flex-direction: column;
        align-items: center;
    }
    .book-info {
        align-items: center;
        text-align: center;
    }
    .cover-image {
        max-width: 90%;
        height: auto;
        max-height: 300px; /* чуть меньше высота для телефонов */
    }
}

.rating-area {
    overflow: hidden;
    width: 265px;
    margin: 0 auto;
}
.rating-area:not(:checked) > input {
    display: none;
}
.rating-area:not(:checked) > label {
    float: right;
    width: 42px;
    padding: 0;
    cursor: pointer;
    font-size: 26px;
    line-height: 32px;
    color: lightgrey;
    text-shadow: 1px 1px #bbb;
}
.rating-area:not(:checked) > label:before {
    content: '★';
}
.rating-area > input:checked ~ label {
    color: gold;
    text-shadow: 1px 1px #c60;
}
.rating-area:not(:checked) > label:hover,
.rating-area:not(:checked) > label:hover ~ label {
    color: gold;
}
.rating-area > input:checked + label:hover,
.rating-area > input:checked + label:hover ~ label,
.rating-area > input:checked ~ label:hover,
.rating-area > input:checked ~ label:hover ~ label,
.rating-area > label:hover ~ input:checked ~ label {
    color: gold;
    text-shadow: 1px 1px goldenrod;
}
.rate-area > label:active {
    position: relative;
}
