/* Related Videos */
.sidebar {
    gap: 1rem;
    display: flex;
    flex-direction: column;
}

.related-videos {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border-radius: 12px;
    padding: 1rem;
}

.sidebar-title {
    margin-bottom: 1rem; /* 제목과 동영상 목록 사이 간격 추가 */
    font-size: 1.25rem;
    font-weight: bold;
}

/* 동영상 아이템들을 감싸는 컨테이너 */
.video-items-container {
    display: flex;
    flex-wrap: wrap; /* 좁아지면 자동으로 줄바꿈 */
    justify-content: center; /* 아이템들을 가로 가운데로 정렬 */
}

.related-video-item {
    display: flex;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 설정 */
}

.related-video-item:hover {
    background: #d8d8d8;
}

.related-thumbnail {
    position: relative;
    flex-shrink: 0;
}

.related-thumbnail img {
    width: 168px; /* 부모 너비에 맞추기 위해 100%로 변경 */
    height: 94px;
    border-radius: 8px;
    object-fit: cover;
    transition: filter 0.3s ease-in-out;
}

.related-video-item:hover .related-thumbnail img {
    filter: brightness(1.2);
}


.related-channel {
    font-size: 12px;
    color: #aaaaaa;
    margin-bottom: 2px;
}

.related-stats {
    font-size: 12px;
    color: #aaaaaa;
}

.sidebar-card {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.ad_box{
    display: flex;
    align-items: center;
    justify-content: center;
    width:100%;
}

.ad_box_in{
    display:flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height:280px;
    width:100%;
}

@media (max-width: 768px) {
    .related-videos {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        border-radius: 0px;
        padding: 0.5rem;
        border-radius: 12px;
    }

    .related-video-item {
        display: flex;
        gap: 8px;
        cursor: pointer;
        padding: 4px;
        border-radius: 8px;
        transition: background 0.2s ease;
        box-sizing: border-box;
    }
}