:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --accent: #060429;
    --text: #ffffff;
    --selected: #4ecca3;
}

/* --- ESTILOS GENERALES Y BASE --- */
body {
    background-color: #1a1c23; /* Fondo oscuro tipo UI de juego */
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-bottom: 220px; /* Espacio para el footer original */
}

/* Estructura Principal Desktop */
#main-container {
    display: flex;
    /*overflow: hidden;*/
    transition: grid-template-columns 0.3s ease-in-out;
}

#left-column {
    padding: 20px;
    flex-grow: 1;

}

#right-column {
    overflow-x: hidden;
    background: #1e272e;
    border-left: 2px solid rgb(61, 75, 94);
    padding: 10px;
}
.unfill {
    min-width: 25%;

}.fill {
     min-width: 60%;

 }
/* --- CONTROLES Y BOTONES --- */

.main-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    /*justify-content: center; !* Centra el bloque de botones en la pantalla *!*/
    width: 100%;
}
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 99%;
}
/* Contenedor de las opciones */
.radio-group {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

/* Ocultar el radio button original (el circulito) */
.radio-option input[type="radio"] {
    display: none;
}
/* Estilo base del botón (similar a tus botones actuales) */
.radio-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #313a4c; /* Un gris oscuro similar al fondo del aside */
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 80px;
}

/* Estilo cuando el ratón pasa por encima */
.radio-button:hover {
    background-color: #455066;
}

/* ESTADO SELECCIONADO: Cuando el input oculto está checked */
.radio-option input[type="radio"]:checked + .radio-button {
    background-color: #e94560; /* El color rojo de tu botón DELETE o el que prefieras */
    border-color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}
.settings-group label {
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}
select {
    background: var(--card-bg);
    color: white;
    border: none;
    box-shadow: 0 0 3px rgba(239, 234, 213, 0.4);
    padding: 8px;
    border-radius: 5px;
}
.button-group {
    display: flex;
    flex-direction: row; /* Mantiene los botones en la misma fila */
    justify-content: center; /* Centra el bloque de botones en la pantalla */
    min-width: 270px;
    width: 50%;

    gap: 15px;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* Cuadrícula de Cartas */
#card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* --- COMPONENTE CARTA --- */
.card {
    background: #2d3436;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #3d4446;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.card:active {
    transform: scale(0.95); /* Feedback táctil para móviles */
}

.card.selected {
    border-color: #f1c40f;
    background: #34495e;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
}

.card > img:first-child {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

/* Sinergias sobre la carta */
.synergy-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    height: 35px;
    margin-top: -35px;
    position: relative;
    z-index: 2;
}

.syn-small {
    height: 25px;
    width: auto;
    object-fit: contain;
}

.card-info {
    padding: 8px 5px;
    background: #2d3436;
    text-align: center;
}

.card-info .name {
    margin: 0;
    font-size: 0.9em;
    font-weight: bold;
    color: #dfe6e9;
    text-transform: uppercase;
}

/* --- SECCIÓN DE RESULTADOS --- */
#recommended-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    background: #1a1c23;
}

.mazo-recomendado-bloque h3 {
    color: #fbc531;
    font-size: 1.2em;
    margin-bottom: 10px;
    border-left: 4px solid #fbc531;
    padding-left: 10px;
    text-align: left;
}

.mazo-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));

}
.res-card {
    width: 90px ;
    /*flex-shrink: 0;*/
}

/* Carta de Resumen de Sinergias */
.summary-card {
    padding: 4px;

}

.synergy-grid-container {
    background: #2d3436 ;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: space-evenly;
    /*grid-auto-rows: min-content;*/
    gap: 2px;
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
}

.syn-badge {
    display: flex;
    align-items: center;
}

.syn-badge .syn-small {
    width: auto;
    margin: 0 ;
}

.syn-count {
    font-size: 0.85em;
    font-weight: bold;
    color: #ffffff;
}

.syn-inactive {
    filter: grayscale(100%);
    opacity: 0.3;
}



#calc-btn, #reset-btn {
    flex: 1 0 auto;
    /*min-width: 100px;*/
    /*flex-shrink: 0;*/
    padding: 12px 5px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
}

#calc-btn {
    background-color: #f1c40f;
    color: #2c3e50;
}

#calc-btn:hover {
    background-color: #f39c12;
}

#reset-btn {
    background-color: #e74c3c;
    color: white;
}

#reset-btn:hover {
    background-color: #c0392b;
}



#size-select {
    background: #2d3436;
    color: white;
    border: 1px solid #fbc531;
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 10px;
    cursor: pointer;
}


/* --- OPTIMIZACIÓN PARA MÓVILES (RESPONSIVE) --- */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px; /* Espacio extra para que los botones no tapen las cartas */
    }

    #main-container {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    #left-column, #right-column {
        width: 100%;
        border-left: none;
        border-top: 2px solid rgb(61, 75, 94);
        padding: 10px;
    }

    #card-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .button-group {
        position: fixed;
        bottom: 0;
        width: 100%;
        background: #1e272e;
        margin: 0;
        padding: 15px;
        z-index: 1000;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
        box-sizing: border-box; /* Evita que el padding rompa el ancho total */
    }

    .mazo-row {
        /*display: grid;*/
        /*grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));*/
        gap: 10px;
    }
    .summary-card {
        width: auto;
        /*height: auto;*/
        grid-column: 1 / -1;

    }

    /* 2. El contenedor de iconos ahora es una sola línea horizontal */
    .synergy-grid-container {
        display: flex;
        justify-content: space-evenly;
    }
    /* 4. Tamaño de los iconos y números */
    .syn-badge {
        min-height: 0;
        height: 50px;

    }




}