.epg-wrapper {
    width: 100%;
}

.epg-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    width: 100%;
}

.epg-post-counter {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.epg-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.epg-filter-item {
    background: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
}

.epg-grid {
    display: grid;
    gap: 20px;
    counter-reset: epg-item;
}

.epg-columns-1 { grid-template-columns: 1fr; }
.epg-columns-2 { grid-template-columns: repeat(2, 1fr); }
.epg-columns-3 { grid-template-columns: repeat(3, 1fr); }
.epg-columns-4 { grid-template-columns: repeat(4, 1fr); }
.epg-columns-5 { grid-template-columns: repeat(5, 1fr); }
.epg-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
    .epg-grid[class*="epg-columns-"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .epg-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .epg-grid[class*="epg-columns-"] {
        grid-template-columns: 1fr;
    }
}

.epg-post-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
    transition: opacity 0.3s ease;
}

.epg-post-item.hidden {
    display: none;
}

.epg-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

.epg-video-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
    position: relative;
}

.epg-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.epg-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.epg-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.epg-meta {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.epg-cat-wrap {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.epg-cat-tag {
    background: #f0f0f0;
    color: #333;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.epg-cat-tag:hover {
    background: #e0e0e0;
}

.epg-date {
    font-size: 12px;
    color: #888;
}

.epg-title {
    margin: 0 0 15px;
    font-size: 18px;
}
.epg-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.epg-btn-size-xs .epg-download-btn { font-size: 12px; padding: 4px 8px; }
.epg-btn-size-sm .epg-download-btn { font-size: 14px; padding: 6px 12px; }
.epg-btn-size-md .epg-download-btn { font-size: 16px; padding: 10px 15px; }
.epg-btn-size-lg .epg-download-btn { font-size: 18px; padding: 12px 20px; }
.epg-btn-size-xl .epg-download-btn { font-size: 20px; padding: 15px 25px; }

.epg-download-btn {
    display: inline-block;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-top: auto;
}

.epg-download-btn:hover {
    background-color: #555;
    color: #fff;
}

.epg-pagination-wrapper {
    margin-top: 30px;
    width: 100%;
}

.epg-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.epg-page-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.epg-page-btn:hover, .epg-page-btn.active {
    opacity: 0.8;
}
