﻿/*Modal*/
#myModal .modal-dialog {
    max-width: 930px; /* 保持你原本的寬度限制 */
    margin: auto; /* 置中 */
    display: flex;
    align-items: center; /* 垂直置中 */
    min-height: 100vh; /* 讓容器高度至少滿整個視窗高度 */
}

#myModal .modal-content {
    width: 100%;
}
@media (max-width: 576px) {
    .slider-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }


    #myModal .modal-dialog {
        max-width: 100% !important;
        margin: auto !important; /* 改為置中 */
        display: flex !important;
        align-items: center !important;
        min-height: 100vh !important;
    }
}

@media (max-width: 992px) {
    .modal-dialog {
        margin: auto;
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        min-height: 100vh;
    }

    .modal-content {
        border-radius: 0;
    }

    .slider-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }

    #captcha-slider {
        width: 100% !important;
    }
}
/*Modal*/

*, *::before, *::after {
    box-sizing: border-box;
}

/* 完整的背景圖片 */
.captcha-bg {
    position: relative;
    width: 100%;
    max-width: 870px;
    height: auto;
    aspect-ratio: 870 / 500;
    background: url('../images/full-image.jpg') no-repeat top left;
    background-size: cover;
    margin: 0 auto;
}


/* 拼圖塊的設置 */
.captcha-piece {
    position: absolute;
    background: url('../images/full-image.jpg') no-repeat;
    background-size: cover;
    cursor: pointer;
    transform-origin: left top;
    display:none;
}


/* 滑塊 */
input[type="range"] {
    width: 100%;
}
input[type=range] {
    -webkit-appearance: none; /* 移除預設樣式 */
    background: transparent; /* 避免重疊樣式 */
}
input[type=range] {
    -webkit-appearance: none; /* 移除預設樣式 */
    width: 100%;
    height: 6px; /* 軌道高度 */
    background: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

    /* WebKit (Chrome, Safari) 軌道 */
    input[type=range]::-webkit-slider-runnable-track {
        width: 100%;
        height: 6px;
        background: #ccc; /* 軌道顏色 */
        border-radius: 3px;
    }

    /* Firefox 軌道 */
    input[type=range]::-moz-range-track {
        width: 100%;
        height: 6px;
        background: #ccc;
        border-radius: 3px;
    }

    /* WebKit 滑桿飛梭 */
    input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        background: #007bff;
        border-radius: 50%;
        cursor: pointer;
        margin-top: -7px; /* 讓飛梭置中軌道 */
    }

    /* Firefox 滑桿飛梭 */
    input[type=range]::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: #007bff;
        border-radius: 50%;
        cursor: pointer;
    }

/* 讓滑桿更精準地貼齊父容器 */
#captcha-slider {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block;
}

.noselect {
    user-select: none;
}

/* 提示訊息 */
.success, .error {
    color: #f00;
    display: none;
}

@media (max-width: 430px) {
    body {
        text-align: left !important;
    }
}
