/* Makes sizing more predictable */
* {
    box-sizing: border-box;
}

/* Styles the entire page */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f4f0e8;
    font-family: Arial, sans-serif;
    color: #2f2f2f;
}

/* Styles the main Shelf Roulette box */
main {
    width: 100%;
    max-width: 650px;
    padding: 45px 35px;
    background-color: white;
    border: 1px solid #d8d1c5;
    border-radius: 12px;
    text-align: center;
}

/* Styles the main heading */
h1 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2.8rem;
}

/* Styles the introductory sentence */
p {
    line-height: 1.6;
}
.tagline {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}
/* Styles the Find My Next Read button */
#find-book-button {
    margin-top: 20px;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    background-color: #2f2f2f;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

/* Changes the button slightly when the mouse is over it */
#find-book-button:hover {
    opacity: 0.85;
}

/* Styles the area where the book title appears */

#book-cover {
    width: 220px;
    max-height: 330px;
    object-fit: cover;
    border-radius: 8px;
    margin: 25px auto 20px;
    display: none;
}

/* Styles the filter section */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Styles the dropdown menus */
select {
    padding: 10px 12px;
    border: 1px solid #cfc7bb;
    border-radius: 6px;
    background-color: white;
    color: #2f2f2f;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Styles the book title and author */
#book-title {
    min-height: 40px;
    margin-top: 30px;
    font-size: 1.4rem;
    font-weight: bold;
}

/* Holds the Already Read and No Thanks buttons */
.book-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Styles both smaller buttons */
#already-read-button,
#no-thanks-button {
    padding: 10px 18px;
    border: 1px solid #2f2f2f;
    border-radius: 6px;
    background-color: white;
    color: #2f2f2f;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Adds a hover effect */
#already-read-button:hover,
#no-thanks-button:hover {
    background-color: #eee9df;
}

/* Makes the layout fit smaller screens */
@media (max-width: 600px) {
    body {
        align-items: flex-start;
        padding: 15px;
    }

    main {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.2rem;
    }

    #book-cover {
        width: 180px;
        max-height: 270px;
    }
}