.movie-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.movie-scroll {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer/Edge */
}

.movie-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.movie-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.movie-list li {
    flex: 0 0 30%;
    /* 各動画アイテムが親コンテナの30%を占める */
    max-width: 330px;
    /* 動画アイテムの最大幅を設定 */
    scroll-snap-align: center;
    position: relative;
    margin-right: 10px;
    box-sizing: border-box;
}

/* 最後のアイテムの余白を削除 */
.movie-list li:last-child {
    margin-right: 0;
}

.movie-title {
    font-size: 16px;
    margin-top: 16px;
}

.movie-sub-title{
    font-size: 20px;
    font-weight: bold;
}

.movie-content iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.view-more {
    text-align: center;
    font-weight: bold;
    text-decoration: underline;
    margin-top: 20px;
}

.view-more-link {
    font-size: 20px;
    color: #007BFF;
    text-decoration: none;
}

.view-more-link:hover {
    text-decoration: underline;
}

/* 矢印アイコン */
.dli-caret-circle-fill-left,
.dli-caret-circle-fill-right {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 50px;
    /* まんまるサイズ */
    height: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    /* 矢印を拡大 */
    z-index: 10;
}

.dli-caret-circle-fill-left {
    left: 0;
}

.dli-caret-circle-fill-right {
    right: 0;
}

/* 左矢印 */
.dli-caret-circle-fill-left::before {
    content: '<';
    color: #fff;
    font-weight: bold;
    font-size: 36px;
    /* 矢印を大きく */
    transform: scaleY(1.5);
    /* 縦に引き伸ばし */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    /* 黒い影をつける */
}

/* 右矢印 */
.dli-caret-circle-fill-right::before {
    content: '>';
    color: #fff;
    font-weight: bold;
    font-size: 36px;
    transform: scaleY(1.5);
    /* 縦に引き伸ばし */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    /* 黒い影をつける */
}

/* スマホ向けの設定 */
@media (max-width: 959px) {
    .movie-container {
        flex-direction: row;
        width: 100%;
        position: relative;
        /* スクロール領域の設定 */
    }

    .movie-scroll {
        overflow-x: auto;
        /* 横スクロール可能に */
        white-space: nowrap;
        display: flex;
        scroll-snap-type: x mandatory;
        /* スナップスクロールを有効化 */
    }

    .movie-sub-title{
        font-size: 16px;
    }

    #home .movie .movie-list {
        display: flex;
        /* 必須：flexboxを有効にする */
        flex-direction: row;
        /* 横並びにする */
        margin-top: 40px;
        /* 上のマージンを設定 */
        width: 100%;
        /* 幅を100%に設定 */
        overflow-x: auto;
        /* 横スクロールを有効にする */
        gap: 30px;
    }

    #home .movie .movie-list li {
        flex: 0 0 100%;
        /* 幅を100%に設定して1つの動画を表示 */
        width: 100%;
        /* 各リストアイテムの幅を100%に設定 */
        margin-right: 0;
        /* アイテム間の余白をなくす */
        box-sizing: border-box;
        /* 幅の計算にパディングやマージンを含める */
    }

    .movie-content iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        /* アスペクト比を保持 */
    }


    /* 矢印を非表示にする */
    .dli-caret-circle-fill-left,
    .dli-caret-circle-fill-right {
        display: none;
    }

    .view-more-link {
    font-size: 16px;
    }

    .movie-container {
        position: relative;
    }

    .movie-indicator-container {
        display: flex;
        justify-content: center;
        gap: 20px;
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .movie-indicator {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #ccc;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.3s ease;
        box-sizing: border-box;
    }

    .movie-indicator.active {
        background-color: #007BFF;
        transform: scale(1.2);
        /* アクティブ時に少し大きく */
    }

    .movie-indicator:hover {
        background-color: #0056b3;
    }
}