﻿#mainCarousel {
    width: 100%;
    margin: 0 auto;
}

/* ✅ 調整按鈕到底部中央 */
.carousel-control-prev,
.carousel-control-next {
    top: 320px;
    bottom: 10px;
    transform: none;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 70%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev {
    left: 46%;
}

.carousel-control-next {
    right: 46%;
}

/* ==== Star Wars 光劍按鈕樣式（更新版）==== */
.lightsaber-btn {
    position: absolute;
    top: 100%;
    transform: translateY(-7px); /* 下移距離 */
    z-index: 10;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 50%; /* 一半寬度，與 banner 同寬時對齊 */
    justify-content: center;
}

    .lightsaber-btn.prev {
        left: 0;
        flex-direction: row-reverse;
        justify-content: flex-end;
    }

    .lightsaber-btn.next {
        right: 0;
        flex-direction: row-reverse;
        justify-content: flex-end;
    }

    /* 劍柄 */
    .lightsaber-btn .hilt {
        width: 24px;
        height: 10px;
        background: #000;
        border-radius: 2px;
    }

    /* 劍光 */
    .lightsaber-btn .beam {
        background: #fff; /* ✅ 預設白色 */
        flex-grow: 1;
        height: 10px;
        border-radius: 3px;
        margin: 0;
        position: relative;
        transition: all 0.2s ease-out;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); /* ✅ 灰色陰影讓它浮起來 */
        display: block;
    }

        .lightsaber-btn .beam.red {
            background: #ff1c1c;
            box-shadow: 0 0 8px #ff1c1c, 0 0 16px #ff1c1c;
        }

        .lightsaber-btn .beam.blue {
            background: #4fc3f7;
            box-shadow: 0 0 8px #4fc3f7, 0 0 16px #4fc3f7;
        }

    /* ✅ 點擊動畫：左邊向左、右邊向右 */
    .lightsaber-btn.clicked .beam::after {
        content: '';
        position: absolute;
        height: 10px;
        border-radius: 3px;
        top: 0;
        background: inherit;
        animation: beam-blast-left 0.4s ease-out;
    }


/* ✅ 右邊光向右延伸 */
@keyframes beam-blast-right {
    0% {
        width: 0;
        opacity: 1;
    }

    50% {
        width: 80px;
        opacity: 1;
    }

    100% {
        width: 0;
        opacity: 0;
    }
}

/* ✅ 左邊光向左延伸 */
@keyframes beam-blast-left {
    0% {
        width: 0;
        opacity: 1;
    }

    50% {
        width: 80px;
        opacity: 1;
    }

    100% {
        width: 0;
        opacity: 0;
    }
}

.carousel-scroll-wrapper {
    overflow-x: auto; /* ✅ 啟用橫向卷軸 */
    -webkit-overflow-scrolling: touch; /* ✅ iOS 順滑滾動 */
    scrollbar-width: none; /* Firefox 隱藏捲軸 */
}
    .carousel-scroll-wrapper::-webkit-scrollbar {
        display: none; /* Chrome, Safari 隱藏捲軸 */
    }

/* 1. 讓整排 slides 保持橫向延伸 */
.carousel-inner {
    width: 100%;
}

/* 2. 強制每一個 slide 都跟外層一樣寬（100%） */
.carousel-item {
    flex: 0 0 100%;
    max-width: 100vw;
}

    /* 3. 圖片始終填滿這整個 slide */
    .carousel-item img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
        max-height: 600px; /* 可自定高度上限 */
    }



/*橫桿*/
.force-scroll-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px 0 0; /* 上方留白，下左右都 0 */
    position: relative;
    width: 100%;
}

.force-scroll-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #e0e0e0 40%, #c0c0c0 70%, #999999 100%);
    box-shadow: 0 0 6px #ffffff, 0 0 12px #e0e0e0, 0 0 20px #bbbbbb, inset 0 0 8px rgba(255, 255, 255, 0.4);
    position: absolute;
    top: 10%;
    transform: translateY(-120%);
    cursor: grab;
}



/* ✅ 區塊標題 */
.section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #F44708;
    letter-spacing: 2px;
    position: relative;
    margin-top: 50px;
}

.wave-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 40px;
    margin-top: -20px;
    margin-bottom: 30px;
    pointer-events: none;
}

.wave-group {
    display: flex;
    gap: 4px;
}

.bar {
    width: 6px;
    background: #000;
    border-radius: 3px;
    animation: waveBounce 1.2s infinite ease-in-out;
    box-shadow: 0 0 6px #f6ecae;
}

.bar1 { height: 16px; animation-delay: 0s; }
.bar2 { height: 22px; animation-delay: 0.1s; }
.bar3 { height: 30px; animation-delay: 0.2s; }
.bar4 { height: 22px; animation-delay: 0.3s; }
.bar5 { height: 16px; animation-delay: 0.4s; }

@keyframes waveBounce {
    0%, 100% { transform: scaleY(1); }
    0% { transform: scaleY(1.8); }
}


/* ✅ YouTube 區塊 */
.video-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.video-item {
    text-align: center;
    width: 45%;
    min-width: 300px;
    aspect-ratio: 16 / 9; /* ✅ 自動維持 16:9 比例 */
    position: relative;
}

    .video-item h3 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 10px;
        color: #444;
    }

    .video-item iframe {
        width: 100%;
        height: 100%;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        position: absolute;
        top: 0;
        left: 0;
    }

/* ✅ 手機版 */
@media (max-width: 768px) {
    .video-container {
        flex-direction: column;
        align-items: center;
    }

    .video-item {
        width: 90%;
        aspect-ratio: 16 / 9; /* 加在這裡也保留 RWD 響應 */
    }
}

body:not(.qa-dark) {
    background: #f7eded !important;
}
