/*-------------------------------- AI講解彈跳視窗設定1 --------------------------------*/
#imageIndex {
    /* position: absolute; */
    top: 20px;
    left: 20px;
    font-size: 18px;
    color: #fff;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 1000px) {
    .popup {
        justify-content: flex-end;
        padding-bottom: 140px;
    }
}

.popup-header {
    width: 100%;
    max-width: 2000px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 20px;
    box-sizing: border-box;

    color: #fff;
}

/* 關閉按鈕 */
#closePopup {
    /* position: absolute; */
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #fff;
    background: transparent !important;
    z-index: 1000;
}

/* 圖片大小 */
.popup-image {
    /* max-width: 90%;
    max-height: 80%; */
    max-width: 90%;
    max-height: 60vh;

    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .popup-image {
        max-width: 100%;
        max-height: 100%;
    }
}

@media (max-width: 480px) {
    .popup-image {
        max-width: 100%;
        max-height: 100%;
    }
}

/* 圖片的箭頭區域 */
.popup-nav {
    font-size: 36px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}

#prev {
    position: absolute;
    left: 10px;
    font-size: 36px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

#next {
    position: absolute;
    right: 10px;
    font-size: 36px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}


/* AI講解影片（與 #popupVideoContainer2 相同定位與尺寸） */
#popupVideoContainer1 {
    position: relative;
    /* position: fixed; */
    /* top: 60px;
    right: 20px; */
    top: auto;
    right: auto;
    left: auto;
    /* width: 200px;
    height: 300px; */
    width: 100%;
    max-width: 400px;
    min-height: 200px;
    margin: 20px auto;

    padding-bottom: 10px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    z-index: 999;
    display: flex;
    flex-direction: column;
    cursor: grab;
    transition: height 0.3s ease, width 0.3s ease;
}

/* @media (max-width: 1023px) {
    #popupVideoContainer1 {
        right: 0px;
        transform: none !important;
    }
} */

#popupVideoContainer1.minimized {
    height: 30px !important;
    min-height: 30px !important;
    overflow: hidden;
}



@media (min-width: 401px) and (max-width: 768px) {
    #popupVideoContainer1 {
        /* width: 120px;
        height: 180px; */
        width: 250px;
        height: 350px;
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    #popupVideoContainer1 {
        /* width: 150px;
        height: 240px; */
        width: 400px;
        height: 500px;
    }
}

@media (min-width: 1001px) and (max-width: 1299px) {
    #popupVideoContainer1 {
        /* width: 220px;
        height: 360px; */
        width: 150px;
        height: 250px;
    }
}

@media (min-width: 1300px) {
    #popupVideoContainer1 {
        /* width: 220px;
        height: 360px; */
        width: 350px;
        height: 450px;
    }
}

/* AI講解區域 */
#popupVideoContainer1 .video-header {
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    flex-shrink: 0;
    z-index: 2;
}

#popupVideoContainer1 .video-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

#popupVideoContainer1 .video-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#popupVideoContainer1 .video-body video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* display: flex; */
    display: block;
}

#popupVideoContainer1.video-container {
    cursor: grab;
}

#popupVideoContainer1.video-container:active {
    cursor: grabbing;
}

/* 04-28加 */
.video-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

/* 安卓有效蘋果無效 */
/* #popupVideoContainer1 .video-body .video-btn {
    position: absolute !important;
    bottom: 10px;

    width: 32px;
    height: 32px;

    border-radius: 50% !important;
    border: none;

    background: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;

    display: flex;
    align-items: center;
    justify-content: center;

    -webkit-appearance: none !important;
    appearance: none !important;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    z-index: 999;
    cursor: pointer;
}


#popupVideoContainer1 .video-body button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

#popupVideoContainer1 .play-btn {
    right: 10px !important;
}

#popupVideoContainer1 .mute-btn {
    left: 10px !important;
} */



/* AI講解影片拖拽 */
.video-container {
    cursor: grab;
}

.video-container:active {
    cursor: grabbing;
}

.ppt-area {
    padding-bottom: 10px;
}

@media (min-width: 1001px) {
    .ppt-area {
        padding-bottom: 140px;
    }
}

/* 縮圖區域 */
.thumbnail-container {
    position: fixed;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: start;
    gap: 10px;
    overflow-x: auto;
    z-index: 9999;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding-left: 10px;
    padding-right: 10px;
}

.thumbnail {
    max-width: 100px;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.1);
}

.thumbnail.active {
    border: 3px solid #1dabbd;
    transform: scale(1.1);
}

.thumbnail-container img {
    max-width: 100px;
    cursor: pointer;
    border-radius: 8px;
}

.thumbnail-container::-webkit-scrollbar {
    height: 8px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.popup-trigger1 {
    text-decoration: none;
    color: #fc26e3;
    font-size: 20px;
}

.popup-trigger1:hover {
    color: #333;
    /* 深灰色 */
}