.books-shell {
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.books-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9)),
        linear-gradient(45deg, rgba(20, 184, 166, 0.2), rgba(245, 158, 11, 0.16));
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.books-kicker {
    color: #67e8f9;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.books-stat {
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.36);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.books-stat dt {
    color: #cbd5e1;
    font-size: 0.82rem;
}

.books-stat dd {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.books-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .books-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem) minmax(10rem, 13rem) auto auto;
    }
}

.books-input,
.books-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    min-height: 2.875rem;
    padding: 0.75rem 0.95rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.books-input:focus,
.books-select:focus {
    outline: 3px solid rgba(20, 184, 166, 0.24);
    border-color: #0f766e;
}

.books-button,
.books-reset,
.book-read,
.book-download {
    min-height: 2.875rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.books-button {
    background: #0f766e;
    color: #ffffff;
    padding: 0.7rem 1.1rem;
}

.books-button:hover,
.book-read:hover,
.book-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.books-reset {
    color: #334155;
    padding: 0.7rem 1rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.books-category-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.75rem;
}

.books-category-menu a {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    padding: 0.45rem 0.8rem;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.books-category-menu a:hover,
.books-category-menu .is-active {
    border-color: #0f766e;
    background: #ccfbf1;
    color: #115e59;
}

.books-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 720px) {
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1120px) {
    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.book-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    content-visibility: auto;
    contain-intrinsic-size: 520px;
}

.book-card:hover {
    transform: translateY(-3px);
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.book-cover-link {
    position: relative;
    display: block;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(20, 184, 166, 0.08)),
        #e2e8f0;
    aspect-ratio: 7 / 5;
    overflow: hidden;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: #e2e8f0;
}

.book-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.book-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.book-card-meta span,
.book-card-metrics span {
    border-radius: 999px;
    background: #ecfeff;
    color: #155e75;
    border: 1px solid #a5f3fc;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
}

.book-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.book-card-metrics span {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.book-card h2 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.book-card p {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
    min-height: 4.4rem;
}

.book-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: auto;
}

.book-read,
.book-download {
    margin-top: auto;
    color: #ffffff;
    background: #1d4ed8;
    padding: 0.78rem 1rem;
}

.book-read {
    background: #0f766e;
}

.book-read:hover {
    background: #115e59;
}

.book-download:hover {
    background: #0f766e;
}

.books-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin: 2.25rem 0 0;
}

.books-pagination a {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    background: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.books-pagination a:hover {
    border-color: #0f766e;
    color: #0f766e;
}

.books-pagination .is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.books-pagination .is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.books-empty {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    padding: 2rem;
    text-align: center;
}

.books-empty h2 {
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 800;
}

.books-empty p {
    color: #475569;
    margin-top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .book-card,
    .books-button,
    .books-reset,
    .book-read,
    .book-download {
        transition: none;
    }

    .book-card:hover,
    .books-button:hover,
    .book-read:hover,
    .book-download:hover {
        transform: none;
    }
}
