/* Xóa khoảng cách mặc định */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Toàn bộ trang */
body {
    min-height: 100vh;
    padding: 50px 20px;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

/* Tiêu đề */
h2 {
    margin-bottom: 40px;
    color: white;
    font-size: 38px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Đường gạch dưới tiêu đề */
h2::after {
    display: block;
    width: 80px;
    height: 4px;
    margin: 12px auto 0;
    content: "";
    border-radius: 10px;
    background-color: #38bdf8;
}

/* Khung chứa 4 quyển sách */
body > div {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Khung của từng quyển sách */
body > div > div {
    width: 210px;
    padding: 20px;
    text-align: center;
    border-radius: 16px;
    background-color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hiệu ứng khi đưa chuột vào khung */
body > div > div:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.4);
}

/* Tên sách */
h3 {
    margin-bottom: 18px;
    font-size: 22px;
}

/* Liên kết tên sách */
h3 a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s;
}

h3 a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* Hình ảnh sách */
body > div > div img {
    display: block;
    width: 150px;
    height: 220px;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s;
}

/* Phóng to ảnh khi đưa chuột vào */
body > div > div:hover img {
    transform: scale(1.05);
}

/* Màu tên riêng cho từng loại sách */
body > div > div:nth-child(1) h3 a {
    color: #f97316;
}

body > div > div:nth-child(2) h3 a {
    color: #2563eb;
}

body > div > div:nth-child(3) h3 a {
    color: #ca8a04;
}

body > div > div:nth-child(4) h3 a {
    color: #7c3aed;
}

/* Giao diện trên điện thoại */
@media (max-width: 500px) {
    body {
        padding: 35px 15px;
    }

    h2 {
        font-size: 28px;
    }

    body > div {
        flex-direction: column;
        align-items: center;
    }

    body > div > div {
        width: 230px;
    }
}