body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #1a1a1a;  /* dark background */
    color: #e0e0e0;             /* light text so it's readable */
}

.code-page {
    min-height: 80vh;
    display: grid;
    place-items: center;
    text-align:center;
}

.code-page h1 {
    font-size: 3rem;   /* smaller than current */
}

.code-page h2 {
    font-size: 1.5rem;  /* same as browser default, just explicit */
}


.page {
    max-width: 700px;
    margin: 4rem auto;
    padding: 0 1.25rem;
    line-height: 1.6;
}


article {
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
    margin-top: 1.5 rem;
}


/* display: flex; puts the three links on one row.
gap: 1rem; adds space between Home, Books, and Now.
padding: 1.25rem; gives the nav breathing room away from the edges. */
nav {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    justify-content: center;
}


/* text-decoration: none; removes the default underline. */
nav a{
    text-decoration: none;
    color: #e0e0e0; /* light text for dark background */
}

/* nav a:hover adds the underline back when you move your mouse over a link. */
nav a:hover { 
text-decoration: underline;
}

.book{
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

#book-cover{
    width: 120px;
    aspect-ratio: 2/3;
    background: #eee;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30%;
}

.book-info h2{
    margin-top: 0;
}

.book-meta {
    font-size: 0.9rem;
}

.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2rem;
 }

 .book-card {
    position: relative;
 }

 .book-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
 }

 .book-comment {
    display: none;
    position: absolute;
    left:0;
    top: 100%;  
    border: 1px solid #ddd;
    background: #fff;
    color: #000;
    padding: 1rem;
    z-index: 2;
    width: 240px;
    border-radius: 8px;
 }
/* 
 .book-card:hover .book-comment {
    display: block;
 } */