/* 
 * ALL SERIES PAGE STYLES - COMPACT MODAL LAYOUT
 * DHANATERAS REVAMPED V2
 */

.all-series-page {
    padding: 60px 0;
    min-height: 80vh;
    /*background: #f7fafc;*/
}

body.dark .all-series-page {
    background: #1a202c;
}

.all-series-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-header {
    margin-bottom: 50px;
    text-align: center;
}

.page-header h1 {
    font-family: 'Khand', sans-serif;
    font-size: 3rem;
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 10px;
}

body.dark .page-header h1 {
    color: #edf2f7;
}

body.dark .page-header .subtitle {
    color: #a0aec0;
}

/* Series Compact Grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.compact-series-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark .compact-series-card {
    background: #2d3748;
    border-color: #4a5568;
}

.compact-series-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(230, 126, 34, 0.15);
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-count-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
    font-weight: 600;
}

.card-body-wrap {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.card-body-wrap h3 {
    font-family: 'Khand', sans-serif;
    font-size: 1.6rem;
    line-height: 1.2;
    margin: 0;
    color: #1a202c;
    flex: 1;
}

body.dark .card-body-wrap h3 {
    color: #edf2f7;
}

.thap-modal-btn {
    width: 100%;
    background: linear-gradient(90deg, #E67E22, #D35400);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-family: 'Anek Devanagari', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.thap-modal-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

/* Modal System */
.series-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.series-modal-content {
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

body.dark .series-modal-content {
    background: #1a202c;
    border: 1px solid #2d3748;
}

.modal-header-wrap {
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

body.dark .modal-header-wrap {
    background: #1a202c;
    border-color: #2d3748;
}

.modal-header-wrap h2 {
    font-family: 'Khand', sans-serif;
    margin: 0;
    font-size: 1.8rem;
    color: #E67E22;
}

.close-modal-btn {
    background: #f7fafc;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s;
}

body.dark .close-modal-btn {
    background: #2d3748;
    color: #fff;
}

.close-modal-btn:hover {
    background: #ff4444;
    color: #fff;
}

.modal-body-wrap {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.ep-modal-card {
    background: #f8fafc;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

body.dark .ep-modal-card {
    background: #2d3748;
    border-color: #4a5568;
}

.ep-modal-card:hover {
    border-color: #E67E22;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ep-modal-img {
    width: 100%;
    aspect-ratio: 16/9;
}

.ep-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-modal-info {
    padding: 15px;
}

.ep-modal-tag {
    font-size: 0.8rem;
    color: #E67E22;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.ep-modal-info h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #2d3748;
}

body.dark .ep-modal-info h4 {
    color: #edf2f7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.2rem;
    }

    .series-grid {
        grid-template-columns: 1fr;
    }

    .modal-body-wrap {
        padding: 20px;
    }

    .series-modal-overlay {
        padding: 10px;
    }
}