body{
    font-family: Arial, sans-serif;
    background:#f5f5f5;
    padding:20px;
    text-align:center;
}
.banner-pc{
    display:block;
    text-align:center;
}

.banner-movil{
    display:none;
    text-align:center;
}
h1{
    color:#333;
}

.opciones{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:5px;
    justify-content:flex-start;
    
}

.opcion{
    background:white;
    border:2px solid #ccc;
    padding:10px;
    cursor:pointer;
    border-radius:15px;
    transition:0.3s;

    flex:0 0 auto; /* evita que ocupen toda la fila */
}

.opcion:hover{
    transform:scale(1.03);
}

.opcion.seleccionada{
    background:#940909;
    color:white;
    border-color:#505050;
}

#btnResultado{
    padding:12px 25px;
    font-size:18px;
    border:none;
    background:#2196F3;
    color:white;
    border-radius:8px;
    cursor:pointer;
    margin-top:20px;
}

#resultado{
    margin: 5px 15px;

    
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(350px,1fr));
    gap:20px;
    width:100%;
    padding:20px;
    box-sizing:border-box;
   
}

.tarjeta{
    
    width: 300px;
    background:white;
    
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 0 10px rgba(0,0,0,0.2);
    
}

.tarjeta img{
    width:100%;
    height:300px;
    object-fit:cover;
}

.tarjeta h2{
    margin:5px;
}

.tarjeta p{
    
    padding:0 10px 10px;
}

#btnReiniciar{
    
    grid-column: 1 / -1;
    justify-self: center;


    padding:12px 25px;
    font-size:18px;
    border:none;
    background:#4CAF50;
    color:white;
    border-radius:8px;
    cursor:pointer;
    margin-top:20px;
}

@media (max-width:500px){

    body{
        padding: 0;
        margin:2px;
    }
    .banner-pc{
        display:none;
    }

    .banner-movil{
        display:block;
    }

    #titulo{
        font-size: 25px;
    }
    h1{
        font-size:42px;
    }

    .opciones{
        gap:3px;
        justify-content:flex;
        
    }

    .opcion{
        
        font-size:14px;
        padding:8px 2px;
    }

    #resultado{
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content: center;
        gap:0;
        padding:5px;
        width:300px;
        
    }
    .tarjeta{
    
    width: 280px;
    background:white;
    
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 0 10px rgba(0,0,0,0.2);
}


    .tarjeta img{
        width: 100%;
        height: 150px;
    }

    .tarjeta h2{
        font-size:30px;
    }

    .tarjeta p{
        font-size:14px;
        ;
    }

}