/* --- Estilos Generales --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px; /* Ancho máximo del contenido */
    margin: 20px auto; /* Centrado horizontal y margen vertical */
    padding: 20px; /* Espacio interno */
    background-color: #ffffff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* --- Tipografía --- */
h1 {
    color: #0056b3; /* Azul oscuro */
    text-align: center;
    margin-top: 0;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #5a6268; /* Gris oscuro */
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 25px;
}

h2 {
     color: #007bff; /* Azul primario */
     border-bottom: 2px solid #dee2e6;
     padding-bottom: 5px;
     margin-top: 25px;
}

/* --- Formulario --- */
form {
    margin-bottom: 30px;
}

fieldset {
    border: 1px solid #ced4da;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

legend {
    font-weight: bold;
    color: #495057; /* Gris más oscuro */
    padding: 0 10px;
    font-size: 1.1em;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-weight: 500;
}

input[type="number"],
input[type="text"] { /* Estilo base para inputs */
    width: 100%;
    max-width: 300px; /* Limita ancho en pantallas grandes */
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Importante para que padding/border no aumenten el ancho */
}

/* Quitar flechas de input number */
input[type=number] {
  -moz-appearance: textfield; /* Firefox */
  appearance: textfield;
}
input::-webkit-outer-spin-button, /* Chrome, Safari, Edge, Opera */
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.checkbox-group label { /* Para grupos de checkboxes */
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 8px;
    font-weight: normal;
}

button {
    background-color: #28a745; /* Verde */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0 auto; /* Centrado */
}

button:hover {
    background-color: #218838; /* Verde más oscuro */
}

/* --- Resultados --- */
#results {
    background-color: #e9f7ef; /* Verde muy claro */
    border: 1px solid #b2dfdb; /* Borde verde azulado claro */
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

#resultText {
    font-weight: bold;
    min-height: 40px;
    margin-bottom: 20px;
    line-height: 1.5; /* Mejora lectura de múltiples líneas */
}
#resultText strong { /* Para resaltar partes como los nombres de programas */
    color: #155724; /* Verde oscuro para énfasis */
}

/* --- Notas pequeñas y texto rojo --- */
small { /* Estilo general para notas pequeñas */
    color: #6c757d; /* Gris */
    font-size: 0.85em;
    display: block;
    margin-top: -8px;
    margin-bottom: 8px;
}

/* Estilo para texto específico en rojo (más específico que 'small') */
small.texto-rojo {
    color: #dc3545 !important; /* Rojo Bootstrap 'danger', con !important por si acaso */
    font-weight: bold !important;
}

hr {
    border: 0;
    height: 1px;
    background-color: #e9ecef;
    margin: 20px 0;
}

/* --- Sección Exámenes PSCV --- */
#pscvExams {
     display: none; /* Oculto por defecto, JS lo muestra */
     margin-top: 15px;
     padding: 15px;
     background-color: #e0f2f7; /* Azul muy claro */
     border: 1px solid #b3e5fc; /* Borde azul claro */
     border-radius: 5px;
}
#pscvExams strong {
    color: #01579b; /* Azul oscuro */
    display: block;
    margin-bottom: 10px;
}
#pscvExams ul {
    list-style-type: disc;
    margin: 0 0 0 20px;
    padding-left: 0;
}
#pscvExams li {
    margin-bottom: 5px;
}

/* --- Pie de Página --- */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6; /* Línea separadora */
    font-size: 0.9em;
    color: #6c757d;
}

/* --- Media Query para Móviles --- */
@media (max-width: 600px) {
    .container {
        margin: 10px auto;
        padding: 15px; /* Menos padding en pantallas pequeñas */
        border-radius: 0;
        box-shadow: none;
    }

    h1 { font-size: 1.8em; }
    .subtitle { font-size: 1em; }

    fieldset { padding: 10px 15px; }

    input[type="number"],
    input[type="text"] {
        max-width: none; /* Ocupa todo el ancho disponible */
        font-size: 1em; /* Tamaño de fuente normal en móvil */
    }

    button {
        font-size: 1em;
        padding: 10px 20px;
        max-width: none;
    }

    .checkbox-group label { /* Checkboxes uno debajo del otro */
        display: block;
        margin-right: 0;
    }

    #results { padding: 15px; }
}