.elementor-kit-7{--e-global-color-primary:#6EC1E4;--e-global-color-secondary:#54595F;--e-global-color-text:#7A7A7A;--e-global-color-accent:#61CE70;--e-global-typography-primary-font-family:"Roboto";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Roboto Slab";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;}.elementor-kit-7 e-page-transition{background-color:#FFBC7D;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){margin-block-end:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS */document.getElementById("searchNumbers").addEventListener("click", function () {
    const whiteBalls = document.querySelectorAll(".white-balls");
    const powerBall = document.querySelector(".powerball");

    let whiteValues = [];
    let hasError = false;

    // Capturar los números ingresados en los campos blancos
    whiteBalls.forEach(input => {
        let value = parseInt(input.value, 10);
        if (isNaN(value) || value < 1 || value > 69) {
            hasError = true;
        }
        whiteValues.push(value);
    });

    // Capturar el número de Powerball
    let powerValue = parseInt(powerBall.value, 10);
    if (isNaN(powerValue) || powerValue < 1 || powerValue > 26) {
        hasError = true;
    }

    // Validar si hay errores antes de buscar
    if (hasError) {
        alert("Por favor, ingrese números válidos dentro del rango permitido.");
        return;
    }

    // Verificar duplicados en los números blancos
    let uniqueValues = new Set(whiteValues);
    if (uniqueValues.size !== whiteValues.length) {
        alert("Los números blancos no pueden repetirse.");
        return;
    }

    // Construir URL para enviar datos a la base de datos
    let queryString = `?n1=${whiteValues[0]}&n2=${whiteValues[1]}&n3=${whiteValues[2]}&n4=${whiteValues[3]}&n5=${whiteValues[4]}&pb=${powerValue}`;
    
    // Redirigir a la página de resultados
    window.location.href = "resultados.html" + queryString;
});/* End custom CSS */