/* Paleta de colores:
   - Fondo suave: gris hielo (#e3e3f3)
   - Texto y títulos: azul profundo (#403a5c)
   - Elementos destacados: azul horizonte (#7fb0ff)
   - Botones y acentos: rosa coral (#fbc2eb) y naranja terracota (#fc8a5e)
*/

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #e3e3f3 0%, #fbc2eb 100%);
    margin: 0;
    padding: 0;
    color: #403a5c;
}

.banner {
    text-align: center;
    margin-top: 32px;
}

h1 {
    font-size: 2.1em;
    color: #7fb0ff;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

fieldset {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px #e3e3f3;
    border: none;
    margin: 0 auto;
    max-width: 500px;
    padding: 24px 16px;
}

legend {
    font-weight: 600;
    color: #fc8a5e;
    margin-bottom: 14px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th,
td {
    text-align: center;
    padding: 8px 4px;
}

input[type='text'],
input[type='number'] {
    width: 90%;
    padding: 6px;
    border: 1px solid #7fb0ff;
    border-radius: 7px;
    font-size: 1em;
    background: #e3e3f3;
    transition: box-shadow 0.2s;
}

input[type='text']:focus,
input[type='number']:focus {
    box-shadow: 0 0 0 2px #fc8a5e;
    outline: none;
}

input[type='color'] {
    border: none;
    width: 40px;
    height: 36px;
    cursor: pointer;
    background: #fff;
}

input[type='submit'] {
    background: linear-gradient(90deg, #7fb0ff 0%, #fc8a5e 100%);
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 1px 5px #fbc2eb;
    transition: background 0.2s, color 0.2s;
}

input[type='submit']:hover,
input[type='submit']:focus {
    background: linear-gradient(90deg, #fc8a5e 0%, #7fb0ff 100%);
    color: #403a5c;
}

.resultados {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    min-height: 350px;
    justify-content: center;
    margin-top: 40px;
}

.barra {
    width: 80px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-weight: 500;
    color: #403a5c;
    font-size: 1em;
    transition: 0.2s;
    position: relative;
}

.barra span {
    padding-bottom: 8px;
    text-align: center;
}

.volver {
    text-align: center;
    margin-top: 40px;
}

.volver a {
    text-decoration: none;
    color: #7fb0ff;
    font-weight: 600;
}

.volver a:hover {
    text-decoration: underline;
}
.container {
    display: flex;
    gap: 40px;
    max-width: 960px;
    margin: 40px auto 60px;
    padding: 0 20px;
    align-items: flex-start;
}

form {
    flex: 1;
    min-width: 280px;
}

aside.resultados {
    flex: 1;
    min-width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 24px 16px;
}

aside.resultados h2 {
    color: #fc8a5e;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.4em;
    text-align: center;
}

aside.resultados .barra {
    width: 60px;
    margin: 0 10px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-weight: 600;
    color: #403a5c;
    font-size: 0.9em;
    text-align: center;
    transition: 0.3s;
    position: relative;
    flex-direction: column;
    padding-bottom: 6px;
}

aside.resultados .barras-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: flex-end;
    min-height: 220px;
}

aside.resultados .barra span {
    margin-top: 6px;
    line-height: 1.2;
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        max-width: 90%;
        margin: 20px auto;
        gap: 30px;
    }
    aside.resultados .barras-container {
        min-height: 180px;
    }
}
@media (max-width: 600px) {
    fieldset {
        max-width: 98%;
        padding: 0 4px;
    }

    h1 {
        font-size: 1.4em;
    }

    .resultados {
        gap: 8px;
    }

    .barra {
        width: 44px;
        font-size: 0.9em;
    }
}
