.wpytv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0
}

.wpytv-filter {
    padding: 6px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    font-size: 14px;
    color: inherit;
    text-decoration: none
}

.wpytv-filter:hover,
.wpytv-filter.is-active {
    background: #111;
    border-color: #111;
    color: #fff
}

.wpytv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 0
}

.wpytv-card {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .15s
}

.wpytv-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08)
}

.wpytv-card__media {
    position: relative
}

.wpytv-card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block
}

.wpytv-card__duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .8);
    color: #fff;
    font-size: 12px;
    line-height: 1.4
}

.wpytv-card__body {
    padding: 12px 14px
}

.wpytv-card__title {
    font-size: 16px;
    margin: 0 0 6px
}

.wpytv-card__excerpt {
    font-size: 13px;
    color: #666;
    margin: 0
}

.wpytv-single__title {
    margin-bottom: 16px
}

.wpytv-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 20px
}

.wpytv-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px
}

.wpytv-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 14px;
    color: #666;
    margin: 0 0 16px
}

.wpytv-single__content {
    max-width: 760px;
    line-height: 1.6
}

/* ---- Watch page: playlist on the left, video on the right ---- */
.wpytv-single {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px
}

.wpytv-layout {
    display: grid;
    grid-template-columns: 70% minmax(0, 1fr);
    gap: 24px;
    align-items: start
}

.wpytv-side {
    position: sticky;
    top: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff
}

.wpytv-side__head {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e5e5
}

.wpytv-side__title {
    font-size: 16px;
    margin: 0 0 2px
}

.wpytv-side__all {
    font-size: 12px;
    color: #666;
    text-decoration: none
}

.wpytv-side__list {
    position: relative;
    max-height: calc(100vh - 150px);
    overflow-y: auto
}

.wpytv-side__item {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    color: inherit;
    text-decoration: none
}

.wpytv-side__item:hover {
    background: #f6f6f6
}

.wpytv-side__item.is-current {
    background: #eee
}

.wpytv-side__media {
    position: relative;
    flex: 0 0 140px
}

.wpytv-side__media img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: 6px
}

.post-type-archive-video .videopage {
    margin: 0 !important;
}

.wpytv-side__name {
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.wpytv-main .wpytv-single__title {
    font-size: 22px;
    margin: 0 0 8px
}

.wpytv-main .wpytv-single__content {
    max-width: none
}

@media (max-width: 900px) {
    .wpytv-layout {
        grid-template-columns: 1fr
    }

    .wpytv-main {
        order: -1
    }

    .wpytv-side {
        position: static
    }

    .wpytv-side__list {
        max-height: 420px
    }
}