/* Định nghĩa font chữ và màu sắc chủ đạo */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #333; /* Màu nền tối */
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease-in-out;
}

.logo img:hover {
    transform: scale(1.1);
}

/* Banner */
.banner {
    width: 100%;
    height: 268px; /* Điều chỉnh chiều cao banner */
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Giữ tỷ lệ ảnh, lấp đầy banner */
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.3s;
}

footer a:hover {
    color: #f39c12;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.social-icon {
    color: #fff;
    font-size: 24px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #f39c12; /* Màu khi hover */
}

.btn-subscribe {
    display: inline-block;
    padding: 10px 15px;
    background: #ff4500;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-subscribe:hover {
        background: #e63900;
    }

.btn-feedback {
    display: inline-block;
    padding: 10px 15px;
    background: #008CBA;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 10px; /* Adjust spacing as needed */
}

    .btn-feedback:hover {
        background: #007bb5;
    }

/* Tiêu đề chính */
h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-top: 20px;
}

/* Bộ lọc */
form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 20px auto;
}

select, input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

button {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

button:hover {
    background: #2980b9;
}

button[type="button"] {
    background: #e74c3c;
}

button[type="button"]:hover {
    background: #c0392b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    background: #f1f1f1;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.pagination a:hover {
    background: #f39c12;
    color: white;
}

.pagination .active {
    background: #f39c12;
    color: white;
    font-weight: bold;
}

/* Book List - Hiển thị sách theo lưới và căn giữa */
.book-list {
    display: flex;
    flex-wrap: wrap; /* Để các card tự xuống dòng khi hết chỗ */
    justify-content: center; /* Căn giữa các card */
    gap: 20px; /* Khoảng cách giữa các card */
    padding: 20px;
}

/* Book Card */
.book {
    background: #fff;
    max-width: 200px;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.book:hover {
    transform: translateY(-5px); /* Hiệu ứng nổi lên khi hover */
}

/* Book Cover */
.book img {
    width: 200px; /* Giữ nguyên chiều rộng */
    height: auto; /* Giữ tỷ lệ ảnh */
    border-radius: 8px; /* Bo góc nhẹ */
    object-fit: cover; /* Đảm bảo ảnh hiển thị đẹp */
    transition: transform 0.3s ease-in-out;
}

.book img:hover {
    transform: scale(1.05); /* Phóng to nhẹ khi hover */
}

/* Book Title */
    .book h2 {
        font-size: 1.2em;
        margin: 10px 0;
        color: #333;
    }

/* Book Author */
.book p {
    font-size: 1em;
    color: #666;
}

.amazon-btn {
    display: block;
    background-color: #ff9900;
    color: white;
    text-align: center;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 10px;
}

.amazon-btn:hover {
    background-color: #e68900;
}

.download-btn {
    display: block;
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 5px;
}

.download-btn:hover {
    background-color: #0056b3;
}

/* Rating */
.rating {
    /* font-size: 1.5rem; */
    font-size: 1.2rem;
    /* color: #f39c12; */
    display: flex;
    justify-content: center;
    gap: 2px;
}

.star {
    font-size: 1.5rem;
    display: inline-block;
}

.star.full {
    color: #f39c12; /* Màu vàng */
}

.star.empty {
    color: #ddd; /* Màu xám */
}

.star.half {
    /* Hiệu ứng sao nửa vàng */
    background: linear-gradient(90deg, #f39c12 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}