
/* Pengaturan dasar halaman */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f3ee;
    color: #333;
}

/* Bagian kepala website */
header {
    background-color: #243b53;
    color: white;
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
}

/* Bagian utama */
main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    background-color: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
}

section h2 {
    color: #243b53;
    margin-bottom: 12px;
}

/* Tempat kartu buku */
.book-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Kartu buku */
.book-card {
    background-color: #f5f3ee;
    padding: 15px;
    border-radius: 10px;
    width: 200px;
}

/* Sampul buku */
.book-cover {
    height: 160px;
    width: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Navigasi website */
.navbar {
    background-color: #172b3e;

    display: flex;
    justify-content: center;
    gap: 40px;

    padding: 18px;
}

/* Link navigasi */
.navbar a {
    color: white;
    text-decoration: none;

    font-size: 16px;
    font-weight: bold;

    transition: 0.3s;
}

/* Efek ketika kursor diarahkan */
.navbar a:hover {
    color: #f0c674;
}

/* Jendela detail */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;

    background-color: rgba(0, 0, 0, 0.6);

    justify-content: center;
    align-items: center;

    padding: 20px;
}

/* Kotak informasi buku */
.modal-content {
    background-color: white;
    color: #333;

    width: 100%;
    max-width: 450px;

    padding: 30px;
    border-radius: 12px;

    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

/* Judul buku */
.modal-content h2 {
    color: #243b53;
    margin-bottom: 15px;
}

/* Deskripsi */
.modal-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Tombol tutup */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;

    border: none;
    background: none;

    font-size: 28px;
    cursor: pointer;
}
/* Kotak pencarian */
#searchInput {
    width: 100%;
    padding: 14px;
    margin: 15px 0 40px;

    border: 1px solid #ccc;
    border-radius: 8px;

    font-size: 16px;
    outline: none;
}

/* Efek ketika kotak pencarian diklik */
#searchInput:focus {
    border-color: #243b53;
}
.book-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* Tampilan smartphone */
@media (max-width: 600px) {

    main {
        padding: 0 15px;
    }

    .book-container {
        justify-content: center;
    }

    .book-card {
        width: 100%;
        max-width: 250px;
    }

    .navbar {
        gap: 15px;
        flex-wrap: wrap;
    }

}