/* Estilos generales */
body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 1px solid #e0e0e0;
}

h1 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Contenedor de la gráfica */
.graph-container {
    width: 100%;
    height: 200px;
    background-color: #e9ecef;
    margin-bottom: 20px;
    position: relative;
    border: 1px dashed #ced4da;
    display: flex;
    justify-content: center;
    align-items: center;
}

.graph-placeholder {
    color: #6c757d;
    font-size: 0.9em;
}

#gasChart {
    display: block;
    width: 100%;
    height: 100%;
}

/* Estado (Seguro, Peligro, etc.) */
.status {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.status-safe {
    color: #198754; /* Verde */
    background-color: rgba(25, 135, 84, 0.1);
}

.status-warning {
    color: #ffc107; /* Amarillo */
    background-color: rgba(255, 193, 7, 0.1);
}

.status-danger {
    color: #dc3545; /* Rojo */
    background-color: rgba(220, 53, 69, 0.1);
}

/* Sección de datos (Promedio, Max, Min) */
.data-display {
    text-align: left;
    margin-bottom: 25px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 0.95em;
}

.data-item .label {
    color: #555;
    font-weight: bold;
    margin-right: 10px;
}

.data-item .value {
    color: #333;
    font-weight: normal;
    text-align: right;
}

/* Contenedor de botones */
.buttons {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

button {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-grow: 1;
    max-width: 150px;
}

button:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
}

button:active {
    background-color: #d6dbdf;
}

/* Estilo para enlaces que deben parecer botones */
.button-link {
    display: inline-block;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: center;

    flex-grow: 1;
    max-width: 150px;
}

.button-link:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
    color: #333;
}

.button-link:active {
    background-color: #d6dbdf;
}

/* --- Media Queries para Responsividad --- */
@media (min-width: 600px) {
    .container { max-width: 500px; }
    h1 { font-size: 1.8em; }
    .graph-container { height: 250px; }
}

@media (min-width: 992px) {
    .container { max-width: 600px; }
    .graph-container { height: 300px; }
}