    /* === CAPTCHA Modal Styles === */
    .captcha-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
        z-index: 1000;
        padding: 1rem; /* Add padding for small screens */
    }
    .captcha-container {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        text-align: center;
        width: 100%;
        max-width: 400px; /* Restrict the maximum width */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        box-sizing: border-box; /* Include padding in the element's width */
    }
    .captcha-wrapper {
        position: relative;
        width: 100%;
        max-width: 400px; /* Ensure the wrapper respects the original image size */
        height: 200px; /* Keep the height fixed */
        background: url('https://picsum.photos/400/200') no-repeat center center;
        background-size: cover;
        margin: 0 auto;
        border-radius: 8px;
        border: 1px solid #ddd;
    }
    .missing-piece {
        position: absolute;
        width: 50px;
        height: 50px;
        /* Puzzle-shaped clip path */
        clip-path: polygon(
            20% 0%, 
            80% 0%, 
            100% 20%, 
            100% 80%, 
            80% 100%, 
            20% 100%, 
            0% 80%, 
            0% 20%
        );
        background: rgba(255, 255, 255, 0.7);
        border: 2px dashed #6200ea;
        border-radius: 5px;
    }
    .puzzle-piece {
        position: absolute;
        width: 50px;
        height: 50px;
        clip-path: polygon(
            20% 0%, 
            80% 0%, 
            100% 20%, 
            100% 80%, 
            80% 100%, 
            20% 100%, 
            0% 80%, 
            0% 20%
        );
        background: url('https://picsum.photos/400/200') no-repeat;
        background-size: 400px 200px;
        border: 2px solid #000;
        border-radius: 5px;
        cursor: grab;
        transition: border-color 0.3s, box-shadow 0.3s;
    }
    .puzzle-piece.correct {
        border-color: #4CAF50;
        box-shadow: 0 0 5px #4CAF50;
    }
    .puzzle-piece.incorrect {
        border-color: #f44336;
        box-shadow: 0 0 5px #f44336;
    }

    /* === Slider Styles === */
    .slider-container {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 300px; /* Adjust to desired width */
        margin: 20px auto;
        font-family: sans-serif;
    }
    .slide-label {
        flex-shrink: 0;
        font-size: 14px;
        color: #777;
    }
    .captcha-slider {
        margin-top: 20px;
        -webkit-appearance: none; /* Remove default slider appearance */
        appearance: none;
        width: 100%;
        height: 12px; 
        background: #ddd; 
        border-radius: 6px; 
        outline: none; 
        border: none; 
        cursor: pointer; 
    }
    /* Chrome/Safari/Opera track */
    .captcha-slider::-webkit-slider-runnable-track {
        height: 12px;
        background: #ddd; 
        border-radius: 6px;
    }
    /* Firefox track */
    .captcha-slider::-moz-range-track {
        height: 12px;
        background: #ddd;
        border-radius: 6px;
    }
    /* Chrome/Safari/Opera thumb */
    .captcha-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 36px; 
        height: 36px; 
        border-radius: 50%;
        background: #fff;
        border: 2px solid #ccc;
        position: relative;
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        transition: background 0.2s, box-shadow 0.2s;
    }
    /* Firefox thumb */
    .captcha-slider::-moz-range-thumb {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #ccc;
        position: relative;
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        transition: background 0.2s, box-shadow 0.2s;
    }
    /* The “three green bars” inside the thumb */
    .captcha-slider::-webkit-slider-thumb::before,
    .captcha-slider::-moz-range-thumb::before {
        content: '';
        position: absolute;
        display: block;
        left: 11px;   /* position it horizontally within the thumb */
        top: 9px;    /* position it vertically within the thumb */
        width: 3px;  
        height: 18px;
        background: green;
        border-radius: 1px;
        /* Two extra bars via box-shadow */
        box-shadow: 7px 0 0 green, 14px 0 0 green;
    }
    /* Hover/focus effects */
    .captcha-slider:hover::-webkit-slider-thumb,
    .captcha-slider:focus::-webkit-slider-thumb {
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    }

    /* === Loading Spinner === */
    .loading-spinner {
        display: none;
        width: 20px;
        height: 20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 10px auto;
    }
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
