:root {
    --primary-color: #cae962;
    --primary-dark: #b8d755;
    --card-bg: #1a1a1a;
    --card-hover: #222222;
    --text-muted: #999;
    --border-color: #2d2d2d;
    --dark-bg: #141414;
    --darker-bg: #0f0f0f;
}

/* Block header styling */
.block_area-header {
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.float-left.bah-heading {
    margin-bottom: 0;
}

.cat-heading {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.search-container {
    position: relative;
    width: 250px;
}

.search-container input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 8px 15px;
    padding-right: 40px;
    font-size: 0.9rem;
    border-radius: 0;
    height: 40px;
    width: 100%;
    transition: all 0.3s ease;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.search-container input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(202, 233, 98, 0.25);
    outline: none;
    color: #fff;
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    font-size: 0.9rem;
}

/* Provider tabs */
.provider-tabs {
    display: flex;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.tab-item {
    flex: 1;
    background-color: #222;
    color: #ddd;
    border: 1px solid #333;
    border-right: none;
    text-align: center;
    padding: 12px 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tab-item:last-child {
    border-right: 1px solid #333;
}

.tab-item.active {
    background-color: var(--primary-color);
    color: #111;
    border-color: var(--primary-color);
    font-weight: 500;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.tab-item:hover:not(.active) {
    background-color: #333;
}

.tab-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-count {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 3px;
}

.chapters-scrollable-container {
    max-height: 600px;
    overflow-y: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    background-color: var(--dark-bg);
    padding: 10px;
}

.chapters-scrollable-container::-webkit-scrollbar {
    width: 8px;
}

.chapters-scrollable-container::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

.chapters-scrollable-container::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 5px;
}

.chapters-scrollable-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.chapters-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1000px 2000px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-item {
    transition: all 0.2s ease;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 5px;
    position: relative;
}

.chapter-item:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chapter-item:hover:after {
    opacity: 1;
}

.chapter-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--card-hover);
}

.chapter-details {
    display: flex;
    align-items: center;
    padding: 12px 15px;
}

.chapter-number {
    flex: 0 0 40px;
    min-width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
    position: relative;
    overflow: hidden;
}

.chapter-number .number {
    color: #111;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1;
}

/* Special styling for decimal numbers */
.chapter-number .number.decimal {
    font-size: 0.75rem;
}

.chapter-info {
    flex: 1;
    min-width: 0; /* Important for text truncation to work properly */
}

.chapter-title {
    display: block;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.chapter-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.chapter-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.chapter-meta i {
    margin-right: 3px;
    font-size: 0.7rem;
}

.chapter-meta .date {
    color: #999;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
}

.chapter-meta .date i {
    color: #888;
}

.chapter-meta .source {
    display: inline-flex;
    align-items: center;
    background-color: #333;
    border: 1px solid #444;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.chapter-meta .source i {
    font-size: 0.7rem;
}

.chapter-action {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chapter-action .action-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.source-label {
    background-color: #333;
    border: 1px solid #444;
    font-size: 0.7rem;
    color: #aaa;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
}

.source-label i {
    margin-right: 2px;
    font-size: 0.65rem;
}

.btn-read {
    background-color: var(--primary-color);
    color: #111;
    border: none;
    transition: all 0.2s ease;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 65px;
}

.btn-read i {
    margin-right: 3px;
    font-size: 0.75rem;
}

.btn-search {
    display: none;
}

.no-chapters-message {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

.no-chapters-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-chapters-message p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Item alternating colors */
.chapter-item:nth-child(odd) {
    background-color: #1d1d1d;
}

.chapter-number.has-decimal {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chapter-number.has-decimal .main-num {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    padding-top: 5px;
    color: #111;
}

.chapter-number.has-decimal .decimal-num {
    font-size: 0.65rem;
    background: rgba(0,0,0,0.1);
    width: 100%;
    text-align: center;
    padding: 1px 0;
    color: #111;
    margin-top: 2px;
}

/* Media queries for responsiveness */
@media (max-width: 767px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-container {
        width: 100%;
        margin-top: 10px;
    }
    
    .float-left.bah-heading {
        margin-right: 0;
        width: 100%;
    }
    
    .chapter-action {
        flex: 0 0 100px;
    }
    
    .chapter-action .action-group {
        gap: 5px;
    }
    
    .chapter-title {
        max-width: 280px;
    }
}

@media (max-width: 576px) {
    .btn-provider {
        font-size: 0.85rem;
        padding: 8px 5px;
    }
    
    .chapter-details {
        padding: 10px;
    }
    
    .chapter-action {
        flex: 0 0 90px;
    }
    
    .chapter-action .action-group {
        gap: 4px;
    }
    
    .btn-read {
        padding: 3px 8px;
        font-size: 0.75rem;
        min-width: 55px;
    }
    
    .chapter-title {
        max-width: 190px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .chapter-action {
        flex: 0 0 85px;
    }
    
    .chapter-action .action-group {
        gap: 3px;
    }
    
    .btn-read {
        padding: 2px 6px;
        min-width: 50px;
    }
    
    .chapter-title {
        max-width: 150px;
    }
    
    .chapter-meta {
        font-size: 0.7rem;
    }
}

.chapters-loading {
    width: 100%;
    min-height: 150px; /* bigger vertical space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* center horizontally & vertically */
    text-align: center;
    color: var(--primary-color);
    font-size: 1.2rem; /* slightly larger font */
}
.chapters-loading i {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

@media (max-width: 400px) {
    .chapter-action {
        flex: 0 0 80px;
    }
    
    .source-label {
        padding: 1px 3px;
        font-size: 0.6rem;
    }
    
    .source-label i {
        font-size: 0.6rem;
        margin-right: 1px;
    }
    
    .btn-read {
        font-size: 0.7rem;
        padding: 2px 5px;
        min-width: 45px;
    }
    
    .btn-read i {
        font-size: 0.65rem;
        margin-right: 2px;
    }
    
    .chapter-title {
        max-width: 130px;
        font-size: 0.8rem;
    }
} 