
* {
    box-sizing: border-box;
}

/* Estilos básicos para el cuerpo y la fuente */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #f9f9f9;
    color: #333;
    /* Usa flexbox para centrar todo en la pantalla */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenedor principal para los elementos del formulario y la tabla */
.form-group {
    /* Usa flexbox para apilar elementos verticalmente en móviles */
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px; /* Limita el ancho en pantallas grandes para que no se estire demasiado */
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilos para los campos de entrada */
.form-group > div {
    display: flex;
    flex-direction: column; /* Apila etiqueta e input */
    width: 100%;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

input[type="number"] {
    width: 100%; /* El input ocupa todo el ancho disponible */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

/* Estilos para los botones */
button {
    width: 40%; /* Los botones ocupan todo el ancho en móviles */
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-top: 5px;
    transition: background-color 0.3s, transform 0.1s;
}

button:active {
    transform: scale(0.98);
}

/* Estilos para el mapa */
#map {
    height: 300px;
    width: 100%;
    max-width: 800px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Contenedor de información */
.info-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 500px;
    margin-top: 15px;
    text-align: center;
}

.speed, .time {
    font-family: 'Courier New', monospace;
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
}

/* Tablas */
.table-wrapper {
    width: 100%;
    overflow-x: auto; /* Permite scroll horizontal en la tabla si es necesario */
}

table {
    border-collapse: collapse;
    width: 100%; /* Las tablas ocupan todo el ancho disponible */
    margin-top: 20px;
}

td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
    border-radius: 15px; /* Radio de borde ovalado */
}

.celda-seleccionada {
    background-color: #007bff;
    color: #fff;
}

.log-table th, .log-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    font-size: 14px;
}

.log-table th {
    background-color: #007bff;
    color: white;
}

.log-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Estilos del Slider */
#miSlider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%; /* El slider ocupa todo el ancho */
    height: 30px;
    background: linear-gradient(to right, white, yellowgreen, yellow, red);
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}

#miSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 25px;
    width: 25px;
    background: #007bff;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#miSlider::-moz-range-thumb {
    -moz-appearance: none;
    height: 25px;
    width: 25px;
    background: #007bff;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Media Query para pantallas más grandes (> 600px) */
@media (min-width: 600px) {
    .form-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .form-group > div {
        flex-direction: row;
        align-items: center;
        width: auto;
    }

    input[type="number"] {
        width: 150px; /* Ancho más fijo en pantallas grandes */
    }

    /* Permite que los botones se acomoden lado a lado */
    .form-group + button {
        width: auto;
        margin-left: 5px;
    }

    #miSlider {
        width: 250px;
    }
}