/**** Import of "Roboto" police ****/

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

/**** Variables css ****/

:root {
    --red: #ff5470;
    --yellow: #fde24f;
    --white: #fffffe;
    --blue: #668bf3;
    --black: #202020;
}

/**** Reset ****/

*,
::before,
::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h2 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 20px;
}

/**** body ****/

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    color: var(--black);
    overflow-x: hidden;
    font-family: "Roboto", sans-serif;
}

/**** header, footer ****/

header,
footer {
    padding: 20px;
}

/**** header ****/

h1 {
    text-align: center;
    text-transform: uppercase;
    font-size: 26px;
    margin: 0;
}

/**** main ****/

.main__content {
    flex-grow: 1;
}

/**** section game ****/

.game {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-block: 20px;
}

/**** section game ****/

.game__rules {
    font-size: 18px;
    line-height: 1.7;
    width: 611px;
    margin: 0 auto 20px;
}

/**** table ****/

.board {
    background-color: var(--blue);
    border-radius: 8px;
    margin: 15px;
}

.board td {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid var(--black);
}

/**** pieces are div within game table cells: draw as colored circles ****/

.piece {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/**** Make pieces yellow/red,  depending on player 1/2 piece ****/

.p1 {
    background-color: var(--yellow);
}

.p2 {
    background-color: var(--red);
}

/**** column-top is table row of clickable areas for each column ****/

#column-top td {
    border: 2px dashed var(--black);
    cursor: pointer;
    transition: background-color 0.3s ease-out;
}

#column-top td:hover {
    background-color: #eff0f3;
}

/**** footer ****/

.footer__copyright {
    text-align: center;
    text-transform: capitalize;
    font-size: 20px;
    font-weight: bold;
}

/**** Responsive design version tablette ****/

@media screen and (max-width : 767px) {
    .game__rules {
        width: 500px;
    }

    .board td {
        width: 69px;
        height: 69px;
    }
}

/**** Responsive design version mobile ****/

@media screen and (max-width: 572px) {
    .game__rules {
        width: 90%;
        text-align: center;
    }

    .board td {
        width: 60px;
        height: 60px;
    }
}

@media screen and (max-width: 472px) {
    .board td {
        width: 50px;
        height: 50px;
    }
}