/* ---------- Base Reset ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fdf6ec;   /* warm cream */
    color: #3a2f28;        /* softer brownish text */
    line-height: 1.6;
}


/* ---------- Header ---------- */
header {
    background: #c8b6a6;     /* muted warm beige */
    border-bottom: 1px solid #b8a593;
    padding: 20px 30px;
}


header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #2e2119;
}


nav {
    margin-top: 10px;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #3a2f28;
    font-weight: 500;
}

nav a:hover {
    color: #1f140f;
}


/* ---------- Flash Messages ---------- */
.flash {
    max-width: 1100px;
    margin: 20px auto;
    padding: 12px 16px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 6px;
}

/* ---------- Main Layout ---------- */
main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ---------- Controls ---------- */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.controls input,
.controls select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.controls button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #111827;
    color: white;
    cursor: pointer;
}

.controls button:hover {
    background: #374151;
}

/* ---------- Page Size ---------- */
.page-size {
    margin-bottom: 20px;
}

.page-size a {
    margin-right: 10px;
    text-decoration: none;
    color: #6b7280;
}

.page-size a.active {
    font-weight: 600;
    color: #111827;
}

/* ---------- Grid Layout ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

/* ---------- Card ---------- */
.card {
    background: #fffdf9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.card h3 {
    margin: 15px;
    margin-bottom: 5px;
    font-size: 16px;
}

.card p {
    margin: 5px 15px;
    font-size: 14px;
    color: #4b5563;
}

/* ---------- Card Actions ---------- */
.actions {
    margin: 15px;
    display: flex;
    justify-content: space-between;
}

.actions a {
    text-decoration: none;
    font-size: 13px;
    color: #2563eb;
}

.actions a:hover {
    text-decoration: underline;
}

/* ---------- Pagination ---------- */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    margin: 0 8px;
    text-decoration: none;
    color: #2563eb;
}

.pagination a:hover {
    text-decoration: underline;
}

/* ---------- Form ---------- */
.book-form {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-form input {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.book-form button {
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: #111827;
    color: white;
    cursor: pointer;
}

.book-form button:hover {
    background: #374151;
}

/* ---------- Stats ---------- */
.stats-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .controls {
        flex-direction: column;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}
