﻿
/*.library-hero {
    background: linear-gradient(135deg, #191c24, #111827);
    border: 1px solid #2b3040;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

    .library-hero h3 {
        color: #fff;
        margin: 0;
        font-weight: 800;
    }

    .library-hero p {
        color: #8f9bb3;
        margin: 6px 0 0;
    }

.library-search {
    width: 320px;
    background: #0f1117;
    border: 1px solid #2b3040;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .library-search i {
        color: #8f9bb3;
    }

    .library-search input {
        width: 100%;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
    }

.library-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.library-tab {
    background: #191c24;
    color: #8f9bb3;
    border: 1px solid #2b3040;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
}

    .library-tab.active,
    .library-tab:hover {
        background: #dc3545;
        color: #fff;
        border-color: #dc3545;
    }

.book-card {
    background: #191c24;
    border: 1px solid #2b3040;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 14px 35px rgba(0,0,0,.25);
    transition: .25s ease;
}

    .book-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 45px rgba(0,0,0,.45);
    }

.book-cover {
    position: relative;
    height: 260px;
    padding: 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

    .book-cover::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(255,255,255,.22), transparent 18%, rgba(0,0,0,.22));
        pointer-events: none;
    }

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 100%;
    background: rgba(0,0,0,.28);
}

.book-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
}

.book-icon {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 58px;
    opacity: .9;
}

.book-cover h4 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-weight: 800;
    font-size: 21px;
}

.book-cover span {
    position: relative;
    z-index: 2;
    color: rgba(255,255,255,.78);
    font-size: 14px;
    margin-top: 6px;
}

.book-body {
    padding: 18px;
}

    .book-body p {
        color: #aab4c8;
        min-height: 62px;
        margin-bottom: 18px;
    }

.book-actions {
    display: flex;
    gap: 10px;
}

.book-btn-preview,
.book-btn-open {
    flex: 1;
    text-align: center;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
}

.book-btn-preview {
    background: #0f1117;
    color: #fff;
    border: 1px solid #2b3040;
}

.book-btn-open {
    background: #dc3545;
    color: #fff;
}

    .book-btn-preview:hover,
    .book-btn-open:hover {
        opacity: .85;
        color: #fff;
    }

.empty-library {
    margin-top: 40px;
    background: #191c24;
    border: 1px dashed #2b3040;
    border-radius: 18px;
    padding: 40px;
    text-align: center;
    color: #8f9bb3;
}

    .empty-library i {
        font-size: 42px;
        margin-bottom: 12px;
    }

.pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pdf-modal {
    width: min(1100px, 100%);
    height: 86vh;
    background: #191c24;
    border: 1px solid #2b3040;
    border-radius: 18px;
    overflow: hidden;
}

.pdf-modal-header {
    height: 58px;
    padding: 0 18px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .pdf-modal-header h5 {
        color: #fff;
        margin: 0;
    }

    .pdf-modal-header button {
        background: #dc3545;
        color: #fff;
        border: none;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 24px;
        line-height: 1;
    }

.pdf-frame {
    width: 100%;
    height: calc(86vh - 58px);
    border: none;
    background: #fff;
}

@media (max-width: 768px) {
    .library-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .library-search {
        width: 100%;
    }

    .book-cover {
        height: 230px;
    }
}*/

/* 📱 MOBILE ADAPTIVE */
/*@media (max-width: 768px) {*/

    /* Контейнер */
    /*.content {
        padding: 0;
    }*/

    /* Header */
    /*.library-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 18px;
    }

        .library-hero h3 {
            font-size: 20px;
        }

        .library-hero p {
            font-size: 13px;
        }*/

    /* Пошук */
    /*.library-search {
        width: 100%;
    }

        .library-search input {
            font-size: 14px;
        }*/

    /* Tabs */
    /*.library-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .library-tab {
        white-space: nowrap;
        font-size: 13px;
        padding: 7px 14px;
    }*/

    /* КАРТКИ */
    /*.book-cover {
        height: 200px;
        padding: 15px;
    }

        .book-cover h4 {
            font-size: 16px;
        }

        .book-cover span {
            font-size: 12px;
        }

    .book-icon {
        font-size: 40px;
        top: 55px;
    }

    .book-body {
        padding: 14px;
    }

        .book-body p {
            font-size: 13px;
            min-height: auto;
        }*/

    /* Кнопки */
    /*.book-actions {
        flex-direction: column;
    }

    .book-btn-preview,
    .book-btn-open {
        width: 100%;
        font-size: 14px;
        padding: 9px;
    }*/

    /* GRID → 1 колонка */
    /*.row > div {
        flex: 0 0 100%;
        max-width: 100%;
    }*/

    /* PDF модалка */
    /*.pdf-modal {
        height: 95vh;
        border-radius: 12px;
    }

    .pdf-frame {
        height: calc(95vh - 58px);
    }
}*/

/*@media (max-width: 992px) {
    .row > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}*/

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.library-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.library-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.library-hero {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, #191c24, #111827);
    border: 1px solid #2b3040;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
}

    .library-hero h3 {
        color: #fff;
        margin: 0;
        font-weight: 800;
    }

    .library-hero p {
        color: #8f9bb3;
        margin: 6px 0 0;
    }

.library-search {
    width: 320px;
    max-width: 100%;
    background: #0f1117;
    border: 1px solid #2b3040;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

    .library-search input {
        width: 100%;
        min-width: 0;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
    }

.library-tabs {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.library-tab {
    background: #191c24;
    color: #8f9bb3;
    border: 1px solid #2b3040;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 600;
    white-space: nowrap;
}

    .library-tab.active,
    .library-tab:hover {
        background: #dc3545;
        color: #fff;
        border-color: #dc3545;
    }

.library-grid {
    margin-left: 0;
    margin-right: 0;
}

.book-card {
    width: 100%;
    max-width: 100%;
    background: #191c24;
    border: 1px solid #2b3040;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 14px 35px rgba(0,0,0,.25);
    transition: .25s ease;
}

    .book-card:hover {
        transform: translateY(-6px);
    }

.book-cover {
    position: relative;
    height: 250px;
    padding: 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    box-sizing: border-box;
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 100%;
    background: rgba(0,0,0,.28);
}

.book-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
}

.book-icon {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 56px;
}

.book-cover h4 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-weight: 800;
    font-size: 21px;
    word-break: break-word;
}

.book-cover span {
    position: relative;
    z-index: 2;
    color: rgba(255,255,255,.78);
    font-size: 14px;
    margin-top: 6px;
}

.book-body {
    padding: 18px;
}

    .book-body p {
        color: #aab4c8;
        margin-bottom: 18px;
    }

.book-actions {
    display: flex;
    gap: 10px;
}

.book-btn-preview,
.book-btn-open {
    flex: 1;
    text-align: center;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
}

.book-btn-preview {
    background: #0f1117;
    color: #fff;
    border: 1px solid #2b3040;
}

.book-btn-open {
    background: #dc3545;
    color: #fff;
}

.pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pdf-modal {
    width: min(1100px, 100%);
    height: 86vh;
    background: #191c24;
    border: 1px solid #2b3040;
    border-radius: 18px;
    overflow: hidden;
}

.pdf-modal-header {
    height: 58px;
    padding: 0 18px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .pdf-modal-header h5 {
        color: #fff;
        margin: 0;
    }

    .pdf-modal-header button {
        background: #dc3545;
        color: #fff;
        border: none;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 24px;
    }

.pdf-frame {
    width: 100%;
    height: calc(86vh - 58px);
    border: none;
    background: #fff;
}

@media (max-width: 768px) {
    .library-wrapper {
        padding: 14px;
    }

    .library-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        gap: 14px;
    }

        .library-hero h3 {
            font-size: 20px;
        }

        .library-hero p {
            font-size: 13px;
        }

    .library-search {
        width: 100%;
    }

    .library-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

        .library-tabs::-webkit-scrollbar {
            display: none;
        }

    .library-tab {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 8px 14px;
    }

    .book-cover {
        height: 210px;
        padding: 18px;
    }

    .book-icon {
        top: 58px;
        font-size: 42px;
    }

    .book-cover h4 {
        font-size: 18px;
    }

    .book-body {
        padding: 14px;
    }

    .book-actions {
        flex-direction: column;
    }

    .book-btn-preview,
    .book-btn-open {
        width: 100%;
    }

    .pdf-modal-backdrop {
        padding: 8px;
    }

    .pdf-modal {
        height: 94vh;
        border-radius: 12px;
    }

    .pdf-frame {
        height: calc(94vh - 58px);
    }
}