:root {
    --apple-red: #8b1a1a; /* deeper, more vintage red */
    --yt-blue: #2a4b8d;   /* muted ink blue */
    --border-color: #d6cbb5; /* parchment tone */
    --bg-gray: #f5efe3; /* paper-like background */
    --ink: #2b2b2b;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg-gray);
    color: var(--ink);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Container --- */
.container {
    max-width: 900px;
    width: 95%;
    margin: 20px auto;
    background: #fffdf7;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 0 3px #efe6d3 inset; /* subtle frame */
}

/* --- Header --- */
header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin: 0;
}

.tagline {
    font-size: 0.95rem;
    color: #777;
    margin-top: 5px;
}

/* Button like old print label */
header p a {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    border: 1px solid #bbb;
    background: #f4f1e8;
    color: #333 !important;
    text-decoration: none;
    font-size: 0.85rem;
}

header p a:hover {
    background: #e9e3d3;
}

/* --- Library Grid --- */
#library-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* --- Book Card --- */
.book-card {
    background: #fff;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--apple-red);
    box-shadow: 1px 2px 6px rgba(0,0,0,0.05);
    transition: 0.25s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* Genre tag like library label */
.genre-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--apple-red);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

/* Title */
.book-card h3 {
    font-size: 1.4rem;
    margin: 0 0 5px 0;
}

/* Author */
.author-name {
    color: #777;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

/* Description */
.book-description {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 20px;
}

/* Read button like archive tag */
.read-btn {
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid var(--apple-red);
    padding: 6px 12px;
    color: var(--apple-red);
    display: inline-block;
}

.read-btn:hover {
    background: var(--apple-red);
    color: #fff;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

footer a {
    color: var(--yt-blue);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Mobile --- */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    #library-view {
        grid-template-columns: 1fr;
    }
}