body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    margin: 20px;
    background: linear-gradient(135deg, #1E3A8A, #B91C1C); /* Degradado azul-rojo */
    color: white;
}

h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.data-container {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    display: inline-block;
    border-radius: 10px;
}

#temp, #hum {
    font-size: 48px;
    font-weight: bold;
    display: block;
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
}

/* Estilos para los contenedores dinámicos de cada ESP32 */
#sensores {
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
#sensores > div {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#sensores h3 {
    margin-top: 0;
    font-size: 22px;
}

/* Párrafos dentro de cada contenedor dinámico */
#sensores .temperatura,
#sensores .humedad {
    font-weight: bold;
    font-size: 24px;
    display: inline-block;
    width: 100%;
    text-align: center;
    margin: 5px 0;
}

button {
    margin: 10px;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

button.on {
    background-color: #22C55E;
    color: white;
}

button.off {
    background-color: #EF4444;
    color: white;
}

button:hover {
    opacity: 0.8;
}

#chart-container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
