.youtube_page,
.youtube_watch_page {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto 40px;
    padding: 0 15px;
}

.youtube_page_header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--middleColor);
    padding-bottom: 12px;
}

.youtube_page_header h1,
.youtube_watch_page h1 {
    margin: 0;
    color: var(--veryDarkColor);
    font-size: 22px;
    font-weight: 700;
}

.youtube_page_header p {
    margin: 5px 0 0;
}

.youtube_channel_link {
    border-radius: 4px;
    background: #ff0000;
    color: #fff;
    padding: 9px 16px;
    font-weight: 700;
}

.youtube_channel_link:hover {
    background: #cc0000;
    color: #fff;
}

.youtube_grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.youtube_card {
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color .2s, transform .2s;
}

.youtube_card:hover {
    transform: translateY(-2px);
    border-color: var(--bgEffect);
}

.youtube_card_thumbnail {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}

.youtube_card_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube_play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 62px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    background: rgba(255, 0, 0, .92);
}

.youtube_play::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 25px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
}

.youtube_card_content {
    padding: 12px 14px 15px;
}

.youtube_card_content h2 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 8px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

.youtube_card_content h2 a {
    color: var(--veryDarkColor);
}

.youtube_card_content time,
.youtube_watch_meta time {
    color: #666;
    font-size: 13px;
}

.youtube_empty {
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    padding: 30px 15px;
    text-align: center;
}

.youtube_pagination {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.youtube_pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.youtube_pagination .page-link {
    position: relative;
    display: block;
    border: 1px solid #ddd;
    background: #fff;
    color: #0d6efd;
    padding: .375rem .75rem;
    line-height: 1.5;
}

.youtube_pagination .page-item:not(:first-child) .page-link {
    margin-left: -1px;
}

.youtube_pagination .page-item:first-child .page-link {
    border-radius: .25rem 0 0 .25rem;
}

.youtube_pagination .page-item:last-child .page-link {
    border-radius: 0 .25rem .25rem 0;
}

.youtube_pagination .active .page-link {
    z-index: 3;
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.youtube_pagination .page-link:hover {
    z-index: 2;
    border-color: #dee2e6;
    background: #e9ecef;
    color: #0a58ca;
}

.youtube_pagination .disabled .page-link {
    cursor: not-allowed;
    pointer-events: none;
    background: #fff;
    color: #6c757d;
}

.youtube_watch_page h1 {
    margin-bottom: 18px;
}

.youtube_player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.youtube_player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube_watch_meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.youtube_watch_meta a {
    color: #cc0000;
    font-weight: 700;
}

.youtube_description {
    margin-top: 20px;
    padding: 18px;
    border-radius: 5px;
    background: #fff;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (min-width: 600px) {
    .youtube_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
    .youtube_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .youtube_page_header h1,
    .youtube_watch_page h1 { font-size: 26px; }
}
