* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: rgb(223, 201, 171);
}

main {
    margin-top: 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* =====================
    board
======================== */
div {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.white-squares {
    background-color: powderblue;
}

.black-squares {
    background-color: peru;
}

.chessboard {
    width: 416px;
    display: flex;
    flex-wrap: wrap;
    border: .5rem solid sienna;
}

/* =====================
    chess pieces
======================== */
.fas {
    font-size: 2rem;
}
/* icons in the white-squares */
.white>i {
    color: rgb(255, 255, 255);
    text-shadow: 1px 1px 1px black;
}
/* icons in the black-squares */
.black>i {
    color: rgb(38, 38, 38);
    text-shadow: 1px 1px 1px white;
}

/* =====================
    name
======================== */
p {
    font-size: 2rem;
    font-weight: 600;
    visibility: hidden;
}

.black-squares>p {
    color: rebeccapurple;
}

.white-squares>p {
    color: springgreen;
}

.name:hover p {
    visibility: visible;
    cursor: pointer;
}

/* =====================
    hover color change
======================== */
.white-squares:hover {
    background-color: pink;
}

.black-squares:hover {
    background-color: palegreen;
}

/* =====================
    hover pawn change
======================== */
div:hover i {
    display: none;
}

span {
    display: none;
    font-size: 2rem;
}

.whites {
    color: white;
}

.blacks {
    color: rgb(38, 38, 38);
}

div:hover span {
    display: block;
}

/* hover PATH ------------------- */
#a1:hover ~ .first-row,
#a1:hover ~ .first-column {
    box-shadow: inset 0px 0px 15px 5px rgb(255, 255, 255);
}

/* =====================
    toggle
======================== */
.toggle-container {
    width: 60px;
    height: 30px;
    background-color: lightgreen;
    display: block;
    border-radius: 40px;
    margin-bottom: 20px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

.toggle-child {
    width: 30px;
    height: 100%;
    background-color: lightsalmon;
    border-radius: 50%;
    transition: transform 500ms;
}

input:checked + .toggle-container {
    background-color: lightskyblue;
}

input:checked + .toggle-container .toggle-child {
    background-color: lightpink;
    transform: translateX(100%);
}

input {
    display: none;
}

/* =====================
    rotate chessboard
======================== */
input:checked ~ .chessboard,
input:checked ~ .chessboard i ,
input:checked ~ .chessboard span,
input:checked ~ .chessboard p{
    transform: rotate(180deg);
}

input:checked ~ .chessboard {
    flex-direction: row-reverse;
}
/* animation */
/* #h1:hover {
    animation-name: h1;
    animation-duration: 8s;
}
@keyframes h1 {
    0%  {transform: translateX(0px);}
    20% {transform: translateX(-570px);}
    40% {transform: translateX(0px);}
    60% {transform: translateY(-570px);}
    80% {transform: translateY(0px);}
} */