.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 34px 28px 20px 28px;
}

.library-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.topbar-actions {
    display: flex;
    align-items: center;
}

/* =========================
   LIBRARY WRAPPER
========================= */

.library {
    max-width: 1200px;
    margin: auto;
    padding: 10px 24px 160px 24px;
}

/* =========================
   GRID SYSTEM (CONTROLLED)
========================= */

.grid {
    display: grid;
    gap: 28px;
}

/* Ultra Wide Desktop */
@media (min-width: 1500px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Standard Desktop */
@media (min-width: 1100px) and (max-width: 1499px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Smaller Desktop / Vertical Monitor */
@media (min-width: 850px) and (max-width: 1099px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (min-width: 600px) and (max-width: 849px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 599px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================
   BOOK CARD
========================= */

.book {
    background: var(--card);
    padding: 16px;
    border-radius: 22px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: 0.25s ease;
    cursor: pointer;
}

    .book:hover {
        transform: translateY(-6px);
    }

    /* TRUE PORTRAIT BOOK RATIO */
    .book img {
        width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
        border-radius: 18px;
        margin-bottom: 12px;
    }
.book-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.3;
}

.book-description {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
    line-height: 1.4;
}
/* =========================
   BOTTOM TASKBAR
========================= */

.library-taskbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 720px;
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    border-radius: 30px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.55);
    z-index: 50;
}

    /* Push Options to far right */
    .library-taskbar button:last-of-type {
        margin-left: auto;
    }

.taskbar-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-soft);
    color: var(--text);
    font-size: 13px;
    padding: 6px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .taskbar-btn:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* =========================
   HISTORY DROPDOWN
========================= */

.history-dropdown {
    position: absolute;
    bottom: 70px;
    left: 18px;
    width: 260px;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.7);
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

    .history-dropdown.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

/* =========================
   OPTIONS DROPDOWN
========================= */

.options-dropdown {
    position: absolute;
    bottom: 70px;
    right: 18px;
    width: 240px;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.7);
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

    .options-dropdown.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
