/* Library Container */
.Library-container {
    width: calc(100% - 4.4em);
    height: 100%;
    display: flex;
    margin-left: auto;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-secondary-color);
}

.libary-dull-container {
    width: 80%;
    height: 90%;
    background-color: var(--library-container-bg);
    border-radius: 30px;
    padding: 1rem;
    overflow: hidden;
    border: var(--library-container-border);
}

/* Tab Container and Buttons */
.tab-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: scroll;
    padding: 0 0 0.6rem 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid var(--primary-hover-color);
    -ms-overflow-style: none;
    margin-bottom: 0.8rem;
}

.tab-btn-v2 {
    background-color: var(--sidebar-secondary-bg-color);
    text-wrap: nowrap;
    color: var(--secondary-color);
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s ease;
}

.tab-btn-v2.active {
    background-color: var(--primary-color);
    color: var(--about-button-text-color);
}

.tab-btn-v2:hover {
    background-color: var(--primary-hover-color);
    color: var(--text-dark-light-color);
}

/* Library Content Sections */
.dull-libary-content {
    display: flex;
    justify-content: center;
    width: 100%;
}

.favourites-series,
.bookmarks-series,
.reading-history-series {
    width: 100%;
    display: none;
}

.favourites-series.active,
.bookmarks-series.active,
.reading-history-series.active {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Novel Cards */
.novel-card-v2 {
    display: flex;
    flex-direction: row;
    min-width: 400px;
    flex: 1;
    background-color: var(--library-card-bg);
    border-radius: 10px;
    height: 180px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: var(--library-card-border);
    box-shadow: var(--library-card-shadow);
}

.novel-card-v2 .novel-picture {
    width: 130px;
    height: 100%;
    object-fit: cover;
}

.main_card_info-v3 {
    padding: 0.5rem 1rem;
    overflow: hidden;
}

.main_card_info-v3 h3 {
    font-size: 1.2em;
    color: var(--primary-hover-color);
    padding: 0 0.5rem 0.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 0;
    text-align: left;
    text-decoration: none;
}

.main_card_info-v3 a {
    text-decoration: none;
    color: var(--author-link-color);
}

.main_card_info-v3 a:hover {
    text-decoration: underline;
}

.description-container-v3 {
    text-align: left;
    color: var(--text-secondary-color);
}

/* Reading Progress */
.reading-progress p {
    text-wrap: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.7rem;
    color: var(--library-progress-text-color);
    text-align: left;
}

.reading-progress a {
    text-decoration: none;
    color: var(--text-color);
}

.reading-progress a:hover .chapter-title {
    text-decoration: underline;
}

.progress-bar {
    position: relative;
    width: 250px;
    height: 25px;
    background-color: var(--library-progress-bar-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: var(--progress-width, 0);
    background-color: var(--primary-hover-color);
    text-align: center;
    overflow: hidden;
    line-height: 20px;
    color: var(--text-secondary-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.progress_bar_settings_text {
    position: absolute;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty Library States */
.empty_library {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.no_favorite_novels,
.no_bookmarked_novels,
.no_reading_history_novels {
    width: 100%;
    text-align: center;
    color: var(--primary-color);
    background-color: var(--library-empty-bg);
    padding: 2rem;
    border-radius: 10px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: var(--library-empty-border);
    box-shadow: var(--library-empty-shadow);
}

.empty_library .no_favorite_novels::before {
    content: "\f004";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.empty_library .no_bookmarked_novels::before {
    content: "\f02e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.empty_library .no_reading_history_novels::before {
    content: "\f1da";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* Media Queries */
@media (max-width: 1024px) {
    .Library-container {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .Library-container {
        width: 100%;
    }

    .libary-dull-container {
        width: 100%;
    }

    .tab-container {
        border-bottom: none;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-hover-color) var(--library-scrollbar-track);
    }

    .tab-container::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .tab-container::-webkit-scrollbar-track {
        background: var(--library-scrollbar-track);
        border-radius: 10px;
    }

    .tab-container::-webkit-scrollbar-thumb {
        background-color: var(--primary-hover-color);
        border-radius: 10px;
        transition: background-color 0.3s ease;
    }

    .tab-container::-webkit-scrollbar-thumb:hover {
        background-color: var(--scrollbar-thumb-hover-bg);
    }

    .tab-btn-v2 {
        font-size: 0.9rem;
    }

    .novel-card-v2 {
        min-width: 100%;
        flex: inherit;
        height: 165px;
    }

    .novel-card-v2 .novel-picture {
        width: 110px;
    }

    .no_favorite_novels,
    .no_bookmarked_novels,
    .no_reading_history_novels {
        font-size: 0.9rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .progress-bar {
        width: 210px;
    }
}

@media (max-width: 400px) {
    .progress-bar {
        width: 170px;
    }
}