@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

/* Cambia el color de selección de texto por defecto (azul) a uno acorde a la paleta */
::selection {
    background-color: #d7ccc8; /* Un beige/marrón muy claro */
    color: #4e342e; /* Texto marrón oscuro para contraste */
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #5d4037;
    color: #5d4037;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(93, 64, 55, 0.1); /* Sombra suave y profunda */
    max-width: 700px;
    width: 100%;
    border: none;
}

h1, h2 {
    color: #5d4037;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    margin-bottom: 15px;
}

.calculator-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #efebe9;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.01);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="number"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* --- ESTILOS PARA EL SELECT PERSONALIZADO --- */

/* Contenedor principal */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

/* Ocultamos el select original del navegador */
.custom-select-wrapper select {
    display: none;
}

/* La caja que muestra la opción seleccionada (se ve igual que tus inputs) */
.select-selected {
    background-color: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 15px;
    color: #5d4037;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

/* Flecha personalizada (triángulo marrón) */
.select-selected:after {
    position: absolute;
    content: "";
    top: 18px;
    right: 15px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-color: #8d6e63 transparent transparent transparent;
}

/* Flecha cuando está abierto */
.select-selected.select-arrow-active:after {
    border-color: transparent transparent #8d6e63 transparent;
    top: 10px;
}

/* Contenedor de las opciones (el desplegable) */
.select-items {
    position: absolute;
    background-color: #fff;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 2px solid #8d6e63; /* Borde marrón al abrir */
    border-radius: 10px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Ocultar opciones cuando está cerrado */
.select-hide {
    display: none;
}

.select-items div {
    color: #5d4037;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s;
}

/* ¡AQUÍ ESTÁ EL CAMBIO! Color marrón al pasar el mouse */
.select-items div:hover, .same-as-selected {
    background-color: #d7ccc8; /* Marrón suave en lugar de azul */
}

/* Estilos para el foco (cuando haces clic) en inputs y select */
input[type="number"]:focus, .select-selected.select-arrow-active {
    border-color: #8d6e63; /* Borde marrón claro elegante */
    box-shadow: 0 0 8px rgba(141, 110, 99, 0.4); /* Sombra cálida y suave */
    outline: none;
}

button {
    background-color: #a1887f; /* Marrón más claro */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #8d6e63; /* Marrón un poco más oscuro para el hover */
}

.results {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    /*white-space: pre-wrap;*/
    line-height: 1.2
}

.results strong {
    color: #333;
}

.results p {
    margin-bottom: 5px; /* Mant