<style>
/* CAŁA KAPTCHA */
#sliderCaptchaBox {
    width: 320px;
    margin: 10px auto;
    font-family: Arial, sans-serif;
}

/* RAMKA */
#captchaBox {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
}

/* OBRAZEK */
#captchaImageWrapper {
    position: relative;
    width: 300px;
    height: 160px;
    overflow: hidden;
    border-radius: 6px;
}

#captchaImage {
    width: 100%;
    height: 100%;
    display: block;
}

/* WYCIĘCIE */
#cutout {
    position: absolute;
    top: 40px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
    pointer-events: none;
}

/* PUZZEL */
#puzzlePiece {
    position: absolute;
    top: 40px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
    cursor: grab;
    pointer-events: none;
}

/* SUWAK */
#sliderWrapper {
    width: 300px;
    height: 36px;
    background: #ddd;
    border-radius: 18px;
    margin-top: 10px;
    position: relative;
}

#slider {
    width: 36px;
    height: 36px;
    background: #4CAF50;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    cursor: pointer;
}

/* TEKST STATUSU */
#statusText {
    margin-top: 8px;
    text-align: center;
    font-weight: bold;
}


/* ===== BACKDROP MODALA ===== */
.modal-register {
    position: fixed;
    inset: 0; /* top:0 right:0 bottom:0 left:0 */
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    z-index: 300;

    /* ważne: blokuje scroll tła */
    overflow: hidden;
}

/* pokazanie modala */
.modal-register



</style>
<style>

/* =========================
   MOBILE ONLY REGISTER MODAL
   (max 768px)
========================= */

@media (max-width: 768px) {
	
	
	/* =========================
   MODAL
========================= */

.modal-register {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
}

.modal-register.show {
    display: flex;
}

/* =========================
   FORMULARZ OGÓLNY (KOMPAKT)
========================= */

#registerForm {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #e0e0e0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* LABELS */
#registerForm label {
    font-size: 12px;
    margin-bottom: 2px;
    color: #c0ffc0;
}

/* INPUTY */
#registerForm input {
    font-size: 13px;
    padding: 8px 10px;

    border-radius: 6px;
    border: 1px solid #333;

    background: #2c2c2c;
    color: #fff;
}

/* =========================
   TOKEN (INPUT + COPY OBOK)
========================= */

.token-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.token-input {
    flex: 1;
    font-size: 12px;
}

.copy-token-button {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;

    border: none;
    border-radius: 6px;

    background: #333;
    color: white;
}

/* =========================
   CAPTCHA — CAŁOŚĆ SCALED
========================= */

#sliderCaptchaBox {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* ramka */
#captchaBox {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 6px;
}

/* OBRAZ */
#captchaImageWrapper {
    width: 100%;
    max-width: 260px;
    height: 140px;

    position: relative;
    overflow: hidden;

    border-radius: 6px;
}

#captchaImage {
    width: 100%;
    height: 100%;
    display: block;
}

/* PUZZLE */
#cutout,
#puzzlePiece {
    position: absolute;
    top: 35px;

    width: 35px;
    height: 35px;

    border-radius: 6px;
}

/* =========================
   SLIDER = IDENTYCZNA SZEROKOŚĆ CO OBRAZ
========================= */

#sliderWrapper {
    width: 100%;
    max-width: 260px;

    height: 32px;

    background: #ddd;
    border-radius: 16px;

    margin-top: 8px;

    position: relative;
}

#slider {
    width: 32px;
    height: 32px;

    background: #4CAF50;
    border-radius: 50%;

    position: absolute;
    left: 0;
    top: 0;

    cursor: pointer;
}

/* STATUS */
#statusText {
    font-size: 11px;
    text-align: center;
    margin-top: 6px;
    color: #aaa;
}

/* =========================
   BUTTON
========================= */

#registerBtn {
    width: 100%;
    padding: 10px;

    font-size: 14px;

    border: none;
    border-radius: 6px;

    background: #4caf50;
    color: white;
}
	
	
	
	

    /* ===== MODAL ===== */
    .modal-form {
        position: fixed;
        inset: 0;
        display: none;
        justify-content: center;
        align-items: flex-start; /* ważne: nie centrować, tylko od góry */
        background: rgba(0,0,0,0.85);
        z-index: 9999;
        overflow: hidden;
    }

    .modal-form.show {
        display: flex;
    }

    /* ===== MODAL BOX ===== */
    .modal-box-form {
        width: calc(100vw - 10px);
        height: calc(100vh - 10px);

        margin: 5px;

        background: #1e1e1e;
        border-radius: 10px;

        padding: 12px;

        box-sizing: border-box;

        overflow-y: auto; /* KLUCZ: scroll tutaj */

        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* ===== FORM ===== */
    #registerForm {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* ===== LABELS ===== */
    #registerForm label {
        font-size: 12px;
        margin: 0;
        color: #c0ffc0;
    }

    /* ===== INPUTS ===== */
    #registerForm input,
    #registerForm select,
    #registerForm textarea {
        width: 100%;
        padding: 9px 10px;

        font-size: 13px;

        border-radius: 8px;
        border: 1px solid #333;

        background: #2c2c2c;
        color: #e0e0e0;

        box-sizing: border-box;
    }

    /* focus */
    #registerForm input:focus,
    #registerForm select:focus,
    #registerForm textarea:focus {
        border-color: #4caf50;
        outline: none;
    }

    /* ===== TOKEN ROW ===== */
    .token-row {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .token-input {
        flex: 1;
        font-size: 12px;
    }

    .copy-token-button {
        padding: 8px;
        font-size: 13px;
        border-radius: 8px;
        border: none;
        background: #333;
        color: #fff;
    }

    /* ===== CAPTCHA ===== */
    #captchaImage {
        width: 100%;
        height: auto;
    }

    #statusText {
        font-size: 11px;
        text-align: center;
        color: #aaa;
    }

    /* ===== BUTTON ===== */
    #registerBtn {
        width: 100%;
        padding: 11px;
        font-size: 14px;

        border-radius: 8px;
        border: none;

        background: #4caf50;
        color: white;
    }

    #registerBtn:disabled {
        background: #555;
    }
}


@media (max-width: 768px) {

    /* ===== FORCE MODAL ===== */
    .modal-register {
        display: flex !important;
    }

    /* ===== CAPTCHA FULL RESPONSIVE ===== */
    #sliderCaptchaBox {
        width: 100% !important;
        max-width: 100% !important;
    }

    #captchaImageWrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 2;
    }

    #sliderWrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ===== INPUTS GLOBAL OVERRIDE ===== */
    form input,
    form select,
    form textarea {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }

    /* ===== LABELS ===== */
    form label {
        font-size: 12px !important;
    }

    /* ===== TOKEN BUTTON ALIGN FIX ===== */
    .token-row {
        display: flex !important;
        gap: 6px;
    }

    .copy-token-button {
        width: 36px;
        height: 36px;
    }

    /* ===== MODAL BOX SCROLL FIX ===== */
    .modal-box-form {
        height: 100vh !important;
        width: 100vw !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }
}
</style>