/* 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: 95%;
    max-width: 1400px;
    height: calc(100vh - 4rem);
    background: var(--premium-bg);
    border-radius: 20px;
    padding: 1rem;
    overflow: hidden;
    border: var(--library-container-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* Tab Container */
.tab-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 165, 0, 0.1);
}

.tab-btn-v2 {
    background: transparent;
    color: var(--text-secondary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tab-btn-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.1), transparent);
    transition: left 0.5s;
}

.tab-btn-v2:hover::before {
    left: 100%;
}

.tab-btn-v2.active {
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    transform: translateY(-1px);
}

.tab-btn-v2:hover:not(.active) {
    background: rgba(255, 165, 0, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Content Area */
.dull-libary-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 165, 0, 0.3) transparent;
}

.dull-libary-content::-webkit-scrollbar {
    width: 6px;
}

.dull-libary-content::-webkit-scrollbar-track {
    background: transparent;
}

.dull-libary-content::-webkit-scrollbar-thumb {
    background: rgba(255, 165, 0, 0.3);
    border-radius: 3px;
}

.dull-libary-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 165, 0, 0.5);
}

/* Library Content Sections */
.favourites-series,
.bookmarks-series,
.reading-history-series {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.favourites-series.active,
.bookmarks-series.active,
.reading-history-series.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    opacity: 1;
    overscroll-behavior: contain;
    transform: translateY(0);
}

/* Novel Cards */
.novel-card-v2 {
    display: flex;
    flex-direction: row;
    min-width: 400px;
    background-color: var(--library-card-bg);
    border-radius: 10px;
    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: 140px;
    height: 100%;
    max-height: 180px;
    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;
}

.novel-author-v2 a {
    color: var(--primary-hover-color);
}

.novel-author-v2 a:hover {
    text-decoration: underline;
}

.description-container-v3 {
    text-align: left;
}

/* Bookmark Progress Info */
.bookmark-progress-info,
.history-progress-info {
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
    text-align: left;
}

.bookmark-chapter-progress,
.history-chapter-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bookmark-progress-label,
.history-progress-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.bookmark-progress-label i,
.history-progress-label i {
    color: var(--primary-hover-color);
    font-size: 0.9rem;
}

.bookmark-progress-stats,
.history-progress-stats {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.bookmark-progress-count,
.history-progress-count {
    color: var(--primary-color);
    font-weight: 600;
}

.bookmark-last-update,
.history-last-update {
    margin-top: 0.3rem;
}

.bookmark-update-info,
.history-update-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary-color);
}

.bookmark-update-info i,
.history-update-info i {
    color: var(--primary-hover-color);
    font-size: 0.75rem;
}

.bookmark-story-actions,
.history-story-actions {
    max-width: max-content;
    margin-top: 0.8rem;
}

.bookmark-continue-btn,
.history-continue-btn {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: #F0F0F0;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    flex: 1;
    justify-content: center;
}

.bookmark-continue-btn:hover,
.history-continue-btn:hover {
    background: linear-gradient(135deg, #FF8C00, #FF7F00);
}

.bookmark-current-chapter,
.history-current-chapter {
    color: #AAAAAA;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    cursor: default;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    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;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .Library-container {
        margin-left: 0;
        width: 100%;
    }
    
    .favourites-series.active,
    .bookmarks-series.active,
    .reading-history-series.active {
        grid-template-columns: 1fr;
    }
}

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

    .tab-container {
        overflow-x: auto;
        gap: 0.25rem;
        padding: 0.25rem;
        margin-bottom: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-container::-webkit-scrollbar {
        display: none;
    }

    .tab-btn-v2 {
        font-size: 0.9rem;
        padding: 10px 20px;
        min-width: max-content;
    }

    .novel-card-v2 {
        min-width: 100%;
    }

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

    .main_card_info-v3 {
        padding: 1rem;
    }

    .main_card_info-v3 h3 {
        font-size: 1.1rem;
    }

    .bookmark-story-actions,
    .history-story-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .bookmark-continue-btn,
    .bookmark-current-chapter,
    .history-continue-btn,
    .history-current-chapter {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .novel-metrics-v2 {
        gap: 0.75rem;
    }

    .novel-metric-v2 {
        font-size: 0.8rem;
    }

    .no_favorite_novels,
    .no_bookmarked_novels,
    .no_reading_history_novels {
        padding: 2rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main_card_info-v3 {
        padding: 0.75rem;
    }

    .bookmark-progress-label,
    .history-progress-label {
        font-size: 0.8rem;
    }

    .bookmark-progress-count,
    .history-progress-count {
        font-size: 0.75rem;
    }
}