@font-face {
    font-family: 'Brixton';
    src: url('fonts/brixton-regular.woff2') format('woff2'),
         url('fonts/brixton-regular.woff') format('woff');
}

:root {
    --rose: #a94e6f;
    --rose-light: #fdf5f7;
    --cream: #f5f0e8;
    --text: #4a3f3f;
    --muted: #8a7d7d;
    --radius: 10px;
}

/* base */

* {
    box-sizing: border-box;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--rose-light);
    font-family: 'Brixton', serif;
    color: var(--text);
    text-align: center;
}

main {
    flex: 1;
    padding: 50px 20px;
    max-width: 1000px;
    margin: auto;
    width: 100%;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.book-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.feature {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#shelfList li {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

section {
    margin-bottom: 40px;
}

button {
    margin-top: 8px;
}

h1, #my-profile {
    color: var(--rose);
}

#welcome {
    color: var(--rose);
    padding-top: 50px;
    font-size: 40px;
    text-shadow: 2px 2px 3px black;
}

.tagline {
    font-family: 'Brixton', serif;
    font-size: 20px;
    color: var(--rose);
}

/* header */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: auto;
    background: var(--cream);
}

/* nav */

nav {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

nav a:first-child {
    margin-right: auto;
}

.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--rose);
}

#my-shelf, #find-books {
        display: block;
    }
#shelf, #find {
    display: none;
}

/* layout */

footer {
    padding: 20px;
    background: var(--cream);
    color: var(--muted);
    font-size: 13px;
}

/* buttons */

button {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--rose);
    color: white;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

.btn-danger {
    background: #b33;
}

/* search */

.search-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

#searchInput {
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid #ddd;
    width: 350px;
}

/* cards */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    text-align: left;
}

.book-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 15px;
}

.book-card img {
    width: 100%;
    border-radius: var(--radius);
}

.book-card-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.book-card-author {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
}

.book-card button {
    margin-right: 5px;
}

/* shelf */

#shelfList {
    list-style: none;
    margin-top: 20px;
    text-align: left;
}

#shelfList li {
    background: white;
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

/* features (landing page) */

.features {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    flex: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* changing login button to profile picture/dropdown menu */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#login-stat {
    display: flex;
    align-items: center;
}

#profile {
    display: flex;
    align-items: center;
}

#profileImg {
    width: 75px;     
    height: auto;
    border-radius: 50%;
}

#profile #profileImg {
border: none;
outline: none;
color: #a94e6f;
background-color: inherit;
font-family: inherit;
margin: 0;
}

#profile-dropdown {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

#profile-dropdown a {
float: none;
color: #a94e6f;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}

/* responsive */

@media (max-width: 768px) {
    .features {
        flex-direction: column;
    }
    header {
        padding: 10px;
    }
    nav {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        width: 100%;
    }
    #profileImg {
        width: 32px;
        height: auto;
        border-radius: 50%;
    }
    #my-shelf, #find-books {
        display: none;
    }
    #shelf, #find {
        display: block;
    }
}

.header-section {
    display: grid;
    place-items: center;
    width: 100%;
}

.header-section img {
    width: 100%;
}

.header-section h1 {
    margin-top: -180px;
}

.description {
    margin-top: 20px;
    line-height: 1.6;
}

#subject {
    text-align: left;
    margin-top: 10px;
}

#subject div {
    margin-bottom: 8px;
    background: white;
    padding: 8px;
    border-radius: var(--radius);
}

#averagePublishYear {
    font-weight: bold;
    margin-bottom: 10px;
}
