:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --selected-color: #28a745;
    --selected-text: white;
    --border-color: #dee2e6;
    --background-light: #f8f9fa;
    --text-dark: #212529;
    --text-danger: #c82333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #e9ecef;
    color: #343a40;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.container { background-color: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); width: 90%; max-width: 900px; }
h1 { text-align: center; color: var(--primary-color); margin-bottom: 2rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #495057; }
select { font-size: larger; width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 4px; box-sizing: border-box; }
.step-container { margin-bottom: 2rem; }

/* BOLETO VIRTUAL */
#virtual-ticket { background-color: var(--background-light); border: 2px solid var(--border-color); border-radius: 8px; padding: 1rem; }
.ticket-section h4 { margin: 1rem 0 0.5rem; text-align: center; }
.ticket-section h3 { margin: 1rem 0 1.2rem; text-align: center; }
.number-grid { display: grid; gap: 0.5rem; justify-content: center; }
.grid-49, .grid-50, .grid-54, .grid-31, .grid-40 {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
}
.number-cell { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 50%; cursor: pointer; transition: all 0.2s; font-weight: bold; user-select: none; }
.number-cell:hover { background-color: #e2e6ea; transform: scale(1.05); }
.number-cell.selected { background-color: var(--selected-color); color: var(--selected-text); border-color: var(--selected-color); transform: scale(1.1); }

/* PANEL DE NÚMEROS SELECCIONADOS */
#selection-display { background-color: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem 0.5rem; margin-top: 1rem; min-height: 50px; display: flex; flex-direction: column; gap: 0.5rem; }
.selection-category { display: flex; align-items: center; gap: 0.5rem; }
.selection-category h5 { margin: 0; font-size: 0.9rem; color: #495057; }
.selected-number-list { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.selected-number { background-color: var(--primary-hover); color: var(--selected-text); width: 42px; height: 42px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.25rem; }

/* NUEVO: SELECTOR DE AÑOS */
#year-selector-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-height: 230px;
    overflow-y: auto;
}
.year-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}
.year-checkbox-item:hover {
    background-color: #f1f3f5;
}
.year-checkbox-item input {
    width: auto;
    cursor: pointer;
}
.year-checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* OTROS */
#loader { text-align: center; padding: 1rem; color: var(--primary-color); font-weight: bold; }
button { display: block; width: 100%; padding: 1rem; border: none; border-radius: 4px; cursor: pointer; font-size: 1.2rem; font-weight: bold; margin-top: 1rem; }
button:disabled { background-color: #ccc; cursor: not-allowed; }
#check-button { background-color: var(--primary-color); color: white; }
#check-button:hover:not(:disabled) { background-color: var(--primary-hover); }
.secondary-button { background-color: var(--secondary-color); color: white; font-size: 1rem; padding: 0.75rem; }
.secondary-button:hover { background-color: var(--secondary-hover); }

/* RESULTADOS */
#results-summary { margin-top: 2.5rem; background-color: #e3f2fd; border-left: 5px solid var(--primary-color); padding: 1.5rem; border-radius: 8px; }
#results-summary h2 { margin-top: 0; color: var(--primary-hover); }
#results-summary ul { list-style-type: none; padding: 0; }
#results-summary li { font-size: 1.1rem; margin-bottom: 0.5rem; }
.summary-dates { font-style: italic; color: #000000; margin: -0.5rem 0 1rem 0; font-size: 1rem; }
.result-item { background-color: var(--background-light); padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 4px; margin-bottom: 1rem; }
.result-item h3 { margin-top: 0; color: #333; }
.result-item p { font-size: 1.1rem; color: var(--text-dark); }
.result-item strong { color: var(--text-danger); font-weight: bold; }
/* --- (Pega esto al final de tu archivo style.css) --- */

/* ESTILOS DEL BOLETO VIRTUAL (Añadir al final) */
.number-grid[data-type="star"] {
    display: flex;    flex-direction: row;    flex-wrap: wrap;    justify-content: center; }
.number-grid[data-type="special"] {
    display: flex;    flex-direction: row;    flex-wrap: wrap;    justify-content: center; }

/* LOADER ANIMADO */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}


.custom-separator {
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
	margin: 30px 0px;

}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CUSTOM ALERT */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.custom-alert-box {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 90%;
    width: 400px;
}

.custom-alert-message {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0 0 1.5rem 0;
}

.custom-alert-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-alert-button:hover {
    background-color: var(--primary-hover);
}
.custom-alert-aviso {
            padding: 15px;
            margin: 15px 15px;
            border: 1px solid transparent;
            border-radius: 8px; /* Bordes más redondeados */
            font-family: Arial, sans-serif;
            font-size: 14px;
            display: flex; /* Para alinear el icono y el texto */
            align-items: center; /* Centra verticalmente */
            
            /* Colores - estilo advertencia */
            color: #856404; /* Color de texto oscuro */
            background-color: #fff3cd; /* Fondo amarillo pálido */
            border-color: #ffeeba; /* Borde a juego */
        }

.custom-alert-aviso .icon {
            margin-right: 15px; /* Espacio entre el icono y el texto */
            font-size: 20px; /* Tamaño del icono */
            flex-shrink: 0; /* Evita que el icono se encoja */
        }

ul {
    list-style-position: inside; /* Los marcadores estarán dentro del contenedor */
    padding-left: 0; /* Elimina el padding por defecto del ul */
}

li {
    text-align: left; /* Alinea el texto de los li a la izquierda */
    margin-bottom: 10px; /* Espacio entre elementos de la lista */
}

/* Media Query para pantallas pequeñas */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .number-cell {
        width: 35px;
        height: 35px;
    }

    .selected-number {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    #year-selector-container {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* CUSTOM SELECT DROPDOWN */
.custom-select-container {
    position: relative;
    width: 100%;
}

#game {
    display: none; /* Ocultamos el select original */
}

.select-selected {
    background-color: #fff;
    padding: 0.75rem;
    border: 3px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: larger;
	font-weight: bold;
}

.select-selected.select-arrow-active:after {
    transform: rotate(180deg);
    top: calc(50% - 8px);
}

.select-selected:after {
    content: "";
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    position: relative;
    top: calc(50% - 3px);
    transition: all 0.2s;
}

.select-items {
    position: absolute;
    background-color: #fff;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
}

.select-hide {
    display: none;
}

.select-item {
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: larger;
}

.select-item:last-child {
    border-bottom: none;
}

.select-item:hover, .same-as-selected {
    background-color: #e9ecef;
}

.option-logo {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    object-fit: contain;
}

.selected-option-content {
    display: flex;
    align-items: center;
}