#chessboard {
    padding: 10px;
    background-color: #5A79B1;
    border: 5px solid black;
    display: inline-block;
}

.tile {
    width: 64px;
    height: 64px;
    float: left;
}

.black {
    background-color: #606060;
    color: white;
}

.white {
    background-color: #E8EBEC;
    color: black;
}

.piece{
    width: 64px; height: 64px; 
    display: inline-block;
    position: relative;
    cursor: pointer;
    background: url('/assets/img/ChessPiecesL3.png');
}

.piece-fire{ background: url('/assets/img/fire.gif') center center no-repeat !important; }
.piece-QB{ background-position :0px 4px; }
.piece-KB{ background-position :300px 4px; }
.piece-RBA, .piece-RBB { background-position :240px 4px; }
.piece-KBA, .piece-KBB { background-position :180px 4px; }
.piece-BBA, .piece-BBB { background-position :120px 4px; }
.piece-PB1, .piece-PB2, .piece-PB3, .piece-PB4, .piece-PB5, .piece-PB6, .piece-PB7, .piece-PB8 { background-position :60px 4px; }

.piece-QW{ background-position :0px 64px; }
.piece-KW{ background-position :300px 64px; }
.piece-RWA, .piece-RWB { background-position : 240px 64px; }
.piece-KWA, .piece-KWB { background-position : 180px 64px; }
.piece-BWA, .piece-BWB { background-position :120px 64px; }
.piece-PW1, .piece-PW2, .piece-PW3, .piece-PW4, .piece-PW5, .piece-PW6, .piece-PW7, .piece-PW8 { background-position :60px 64px; }

.piece-KWA, .piece-KBA{
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: "FlipH";
}

#player {
    width: 64px;
    height: 64px;
    position: absolute;
    z-index: 10; 
    display: none;
    cursor: pointer;
}


#instructionbox {
    width: 450px;
    font-family: Arial;
    font-size: 100%;
    position: absolute;
    margin-left: 550px;
    margin-top: 250px;
}

.tile:hover,
.selectedpiece {
    -webkit-box-shadow: inset 0px 0px 5px 5px rgba(50, 150, 25, .5);
    box-shadow: inset 0px 0px 5px 5px rgba(50, 150, 25, .5);
}

.showlegal {
    -webkit-box-shadow: inset 0px 0px 0px 5px #f00;
    box-shadow: inset 0px 0px 0px 5px #f00;
    
}

.legal.white {
    /* background-color: #D2AEAE; */
}

.legal.black {
    /* background-color: #7E1818; */
}
             
.showlegal:hover {
    
    background-color: yellow;
     -webkit-box-shadow: inset 0px 0px 5px 5px rgba(50, 150, 25, .5);
    box-shadow: inset 0px 0px 5px 5px rgba(50, 150, 25, .5);
    
}

.smoothmove {
    -webkit-transition: top 0.35s ease-in-out, left 0.35s ease-in-out;
    -moz-transition: top 0.35s ease-in-out, left 0.35s ease-in-out;
    -ms-transition: top 0.35s ease-in-out, left 0.35s ease-in-out;
    -o-transition: top 0.35s ease-in-out, left 0.35s ease-in-out;
    transition: top 0.35s ease-in-out, left 0.35s ease-in-out;
}

.smoothfade {
    -webkit-transition: box-shadow 0.25s ease-out;
    -moz-transition: box-shadow 0.25s ease-out;
    -ms-transition: box-shadow 0.25s ease-out;
    -o-transition: box-shadow 0.25s ease-out;
    transition: box-shadow 0.25s ease-out;
    -webkit-transition: background-color 0.25s ease-in time;
    -moz-transition: background-color 0.25s ease-in time;
    -ms-transition: background-color 0.25s ease-in time;
    -o-transition: background-color 0.25s ease-in time;
    transition: background-color 0.25s ease-in time;
}



@media screen and ( max-width : 750px ){
    #chessboard {
        padding: 0px;
        background-color: #5A79B1;
        border: 3px solid black;
        display: inline-block;
    }
    .piece{
        width: 2.5rem;
        height: 2.5rem;
        background: url('/assets/img/ChessPiecesS3.png');
    }
    
    .tile {
        width: 2.5rem;
        height: 2.5rem;
        float: left;
    }   
    
    .piece-QB{ background-position : 0px 0px; }
    .piece-KB{ background-position : 200px 0px; }
    .piece-RBA, .piece-RBB { background-position :160px 0px; }
    .piece-KBA, .piece-KBB { background-position :120px 0px; }
    .piece-BBA, .piece-BBB { background-position :80px 0px; }
    .piece-PB1, .piece-PB2, .piece-PB3, .piece-PB4, .piece-PB5, .piece-PB6, .piece-PB7, .piece-PB8 { background-position : 40px 0px; }

    .piece-QW{ background-position : 0px 40px; }
    .piece-KW{ background-position : 200px 40px; }
    .piece-RWA, .piece-RWB { background-position : 160px 40px; }
    .piece-KWA, .piece-KWB { background-position : 120px 40px; }
    .piece-BWA, .piece-BWB { background-position : 80px 40px; }
    .piece-PW1, .piece-PW2, .piece-PW3, .piece-PW4, .piece-PW5, .piece-PW6, .piece-PW7, .piece-PW8 { background-position : 40px 40px; }

    #player {
        width: 2.6rem;
        height: 2.6rem;
    }

}
@media screen and ( max-width : 480px ){
    #chessboard {
        padding: 0px;
        background-color: #5A79B1;
        border: 3px solid black;
        display: inline-block;
    }
    
    .piece{
        width: 2.6rem;
        height: 2.6rem;
        background: url('/assets/img/ChessPiecesS3.png');
    }
    
    .tile {
        width: 2.6rem;
        height: 2.6rem;
        float: left;
    }
    
    .piece-QB{ background-position : 0px 0px; }
    .piece-KB{ background-position : 200px 0px; }
    .piece-RBA, .piece-RBB { background-position :160px 0px; }
    .piece-KBA, .piece-KBB { background-position :120px 0px; }
    .piece-BBA, .piece-BBB { background-position :80px 0px; }
    .piece-PB1, .piece-PB2, .piece-PB3, .piece-PB4, .piece-PB5, .piece-PB6, .piece-PB7, .piece-PB8 { background-position : 40px 0px; }

    .piece-QW{ background-position : 0px 40px; }
    .piece-KW{ background-position : 200px 40px; }
    .piece-RWA, .piece-RWB { background-position : 160px 40px; }
    .piece-KWA, .piece-KWB { background-position : 120px 40px; }
    .piece-BWA, .piece-BWB { background-position : 80px 40px; }
    .piece-PW1, .piece-PW2, .piece-PW3, .piece-PW4, .piece-PW5, .piece-PW6, .piece-PW7, .piece-PW8 { background-position : 40px 40px; }

     #player {
        width: 2.6rem;
        height: 2.6rem;
    }

}
