.recent-posts-container {
    max-width: 1200px;
    margin: 0 auto
}

.recent-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #20c997;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px
}

.recent-posts-header h2 {
    font-size: 1.2em;
    font-weight: 700
}

.recent-posts-view-all {
    background-color: #e9ecef;
    color: #333;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: .8em;
    font-weight: 700;
    text-transform: uppercase
}

.recent-posts-view-all:hover {
    background-color: #dee2e6
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px 20px
}

.recent-post-item {
    background-color: #fff;
    max-height: 120px!important;
    max-width: 185px!important
}

.recent-post-thumbnail {
    position: relative;
    background-color: #000;
    aspect-ratio: 16 / 9;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center
}

.recent-post-thumbnail::after,.recent-post-thumbnail:hover::after {
    display: none
}

.recent-post-play-icon {
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgb(0 0 0 / .3);
    box-sizing: border-box
}

.recent-post-thumbnail:hover .recent-post-play-icon {
    opacity: 1
}

.recent-post-play-icon svg {
    width: 20px;
    height: 20px
}

.recent-post-thumbnail .recent-post-image {
    transition: transform 1s ease,filter 0.3s ease
}

.recent-post-thumbnail:hover .recent-post-image {
    transform: scale(1.1);
    filter: brightness(.7)
}

.recent-post-thumbnail .recent-post-placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%,-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2
}

.recent-post-thumbnail:hover .recent-post-placeholder-icon {
    opacity: 1
}

.recent-post-placeholder-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    opacity: .5;
    background-size: contain
}

.recent-post-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0
}

.recent-post-badge {
    position: absolute;
    padding: 4px 8px;
    font-size: .75em;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-transform: uppercase
}

.recent-post-type {
    top: 10px;
    right: 10px;
    border-radius: 3px
}

.recent-post-type.drama {
    background-color: #17a2b8
}

.recent-post-type.movie {
    background-color: var(--theme-color-main,#20c997)
}

.recent-post-episode {
    bottom: 10px;
    left: 10px;
    background-color: #17a2b8;
    clip-path: polygon(0% 0%,100% 0%,calc(100% - 10px) 100%,0% 100%);
    padding-right: 12px
}

.recent-post-language {
    bottom: 10px;
    right: 10px;
    clip-path: polygon(10px 0%,100% 0%,100% 100%,0% 100%);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding-left: 12px
}

.recent-post-language.sub {
    background-color: #ffc107;
    color: #333
}

.recent-post-language.raw {
    background-color: #fd7e14;
    color: #fff
}

.recent-post-language.dub {
    background-color: var(--theme-color-main,#20c997);
    color: #fff
}

.recent-post-title {
    font-size: .9em;
    color: #333;
    margin-top: 8px;
    padding: 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

@media (max-width: 992px) {
    .recent-posts-grid {
        grid-template-columns:repeat(3,1fr)
    }
}

@media (max-width: 768px) {
    .recent-posts-grid {
        grid-template-columns:repeat(2,1fr)
    }

    .recent-posts-header h2 {
        font-size: 1em
    }

    .recent-posts-view-all {
        font-size: .7em;
        padding: 5px 8px
    }

    .recent-post-title {
        font-size: .85em
    }
}

@media (max-width: 576px) {
    .recent-posts-grid {
        grid-template-columns:repeat(2,1fr);
        gap: 20px
    }

    .recent-posts-header {
        padding: 8px 10px
    }

    .recent-posts-header h2 {
        font-size: .9em
    }

    .recent-posts-view-all {
        font-size: .65em;
        padding: 4px 6px
    }

    .recent-post-item {
        max-height: 120px!important;
        max-width: 150px!important
    }
}

.dark .recent-post-item {
    background-color: #1f2937;
    height: 120px!important;
    width: 185px!important
}

.dark .recent-post-title {
    color: #e5e7eb
}

.recent-posts-section .pagination {
    margin: 2rem auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 15px
}

.recent-posts-section .pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0 4px;
    background-color: var(--pagination-bg-color,#edf2f7);
    color: var(--pagination-text-color,#4a5568);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid var(--pagination-border-color,#e2e8f0)
}

.recent-posts-section .pagination .page-numbers:hover {
    background-color: var(--pagination-hover-bg-color,#e2e8f0);
    color: var(--pagination-hover-text-color,#2d3748)
}

.recent-posts-section .pagination .page-numbers.current {
    background-color: var(--pagination-current-bg-color,#20c997);
    color: var(--pagination-current-text-color,#ffffff);
    border-color: var(--pagination-current-border-color,#20c997)
}

.recent-posts-section .pagination .page-numbers.prev,.recent-posts-section .pagination .page-numbers.next {
    width: auto;
    padding: 0 15px
}

.recent-posts-section .pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%
}

.recent-posts-section .pagination ul.page-numbers li {
    margin: 0 4px
}

.recent-posts-section .pagination ul.page-numbers li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: var(--pagination-bg-color,#edf2f7);
    color: var(--pagination-text-color,#4a5568);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--pagination-border-color,#e2e8f0)
}

.recent-posts-section .pagination ul.page-numbers li .page-numbers:hover {
    background-color: var(--pagination-hover-bg-color,#e2e8f0);
    color: var(--pagination-hover-text-color,#2d3748)
}

.recent-posts-section .pagination ul.page-numbers li .page-numbers.current {
    background-color: var(--pagination-current-bg-color,#20c997);
    color: var(--pagination-current-text-color,#ffffff);
    border-color: var(--pagination-current-border-color,#20c997)
}

.recent-posts-section .pagination ul.page-numbers li .page-numbers.prev,.recent-posts-section .pagination ul.page-numbers li .page-numbers.next {
    width: auto;
    padding: 0 15px
}

.dark .recent-posts-section .pagination .page-numbers {
    background-color: var(--pagination-dark-bg-color,#2d3748);
    color: var(--pagination-dark-text-color,#e2e8f0);
    border-color: var(--pagination-dark-border-color,#4a5568)
}

.dark .recent-posts-section .pagination .page-numbers:hover {
    background-color: var(--pagination-dark-hover-bg-color,#4a5568);
    color: var(--pagination-dark-hover-text-color,#ffffff)
}

.dark .recent-posts-section .pagination .page-numbers.current {
    background-color: var(--pagination-dark-current-bg-color,#20c997);
    color: var(--pagination-dark-current-text-color,#ffffff);
    border-color: var(--pagination-dark-current-border-color,#20c997)
}
