/* 動画プレイヤー関連 */
.custom-video-player * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.custom-video-player {
    background-color: #fff;
    color: #222;
}

.custom-video-player .container {
    display: flex;
    width: 100%;
    gap: 20px;
}

.custom-video-player .video-section {
    flex: 1;
    padding: 10px;
}

.custom-video-player #video-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.custom-video-player #video-player {
    width: 100%;
    height: 360px;
    background-color: #000;
    transition: opacity 0.3s ease-in-out;
}

.video-hidden {
    opacity: 0;
}

/* 動画のキャプション */
.custom-video-player #video-caption {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 再生リスト */
.custom-video-player .playlist {
    width: 240px;
    max-height: 400px;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
    padding: 10px;
}

.custom-video-player .playlist ul {
    list-style: none;
}

/* 再生リストの項目 */
.custom-video-player .playlist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-video-player .playlist li:hover,
.custom-video-player .playlist li.active {
    background-color: #f0f0f0;
}

/* サムネイル画像 */
#playlist-items li img.thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

/* スクロールバー */
.custom-video-player .playlist::-webkit-scrollbar {
    width: 4px;
}

.custom-video-player .playlist::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .custom-video-player .container {
        flex-direction: column;
    }

    .custom-video-player .playlist {
        width: 100%;
        max-height: 200px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
}

#video-player {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: #000;
    transition: opacity 0.3s ease-in-out;
}

.video-portrait {
    aspect-ratio: 9 / 16;
}
