/* ===== GLOBAL ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f2f9ff, #e6f7ff);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== TITULO Y DESCRIPCION ===== */
#titulo,
#descripcion {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    overflow: hidden;
    border-right: 2px solid #0077b6;
    display: inline-block;
    margin: 20px 0;
    line-height: 1.4;
    word-wrap: break-word;
    animation: blinkCursor 0.7s infinite;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

#titulo {
    font-size: clamp(1.5rem, 5vw, 2rem);
}

#descripcion {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 25px;
}

/* ===== CONTAINER ===== */
.container {
    width: 90%;
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===== INPUTS Y BOTONES ===== */
input {
    width: 100%;
    padding: 14px;
    border: 2px solid #90e0ef;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 10px;
    transition: 0.3s;
}

input:focus {
    outline: none;
    border-color: #0077b6;
    box-shadow: 0 0 8px #90e0ef;
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: #00b4d8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: #0077b6;
}

button:active {
    transform: scale(0.98);
}

.descargarExcel {
    background-color: green;
}

/* ===== INFO ESTADISTICA ===== */
.info-estadistica {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: left;
}

/* ===== TOGGLE BUTTONS ===== */
.toggle-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.toggle-buttons button {
    position: relative;
    padding: 10px 25px;
    border: 2px solid #0077b6;
    border-radius: 30px;
    background: #fff;
    color: #0077b6;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.toggle-buttons button::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 120%;
    height: 300%;
    background: rgba(0, 119, 182, 0.1);
    border-radius: 50%;
    transition: transform 0.4s ease;
    z-index: 0;
}

.toggle-buttons button:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.toggle-buttons button:hover {
    color: #fff;
    background: #0077b6;
    box-shadow: 0 6px 12px rgba(0, 119, 182, 0.3);
}

.toggle-buttons button.active {
    background: #0077b6;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0, 119, 182, 0.3);
}

/* ===== TABLA ===== */
table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

th,
td {
    border: 1px solid #caf0f8;
    padding: 10px;
    text-align: center;
}

th {
    background: #0077b6;
    color: white;
}

td {
    background: #f1faff;
    font-weight: bold;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .toggle-buttons {
        display: block;
    }

    #tablaFrecuencia table {
        width: 100%;
        font-size: 13px;
    }

    #tablaFrecuencia th,
    #tablaFrecuencia td {
        padding: 8px;
    }
}
