*, 
*::before, 
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

:root {
    --main-bg-cl:  hsl(220, 57%, 15%);
    --main-cl: #EBEBEB;
    --grid-bg: rgb(35, 39, 49);
    --cell-bg: rgb(129, 129, 129);
    --button-cl: rgb(11, 224, 224);
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
    font-family: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    color: var(--main-cl);
    background-color: var(--main-bg-cl);
    display: grid;
    place-items: center;
    min-height: 100%; 
    position: relative;  
}

img {
    width: 50px;
    height: 50px;

}

.game-container {
    width: 60vmin;
    height: 70vmin;
    background-color: var(--grid-bg);
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    position: relative;
}

.game-info {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.turn-container {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 1rem;
}

.turn {
    display: grid;
    place-items: center;
}

.reset,
.start-game {
    color: var(--grid-bg);
    background-color: var(--button-cl);
    padding-inline: 1rem;
    border-radius: 15px;
    border: none;
    cursor: pointer;
}

.game-board {
    flex: 1;
    display: grid;
    gap: 1rem;
    padding: 1rem;
    grid-template: repeat(3,1fr) / repeat(3,1fr);
}

.cell {
    background-color: var(--cell-bg);
    border-radius: 15px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.cell:hover {
    background-color: rgb(150, 150, 150);
}

.result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background-color: var(--main-bg-cl);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--button-cl);
    z-index: 2;
}

.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

footer,.game-container {
    margin-top: auto;
}

@media (max-width: 900px) {
    body {
        font-size: 1.2rem;
    }
    .game-container {
        width: 80vmin;
        height: 90vmin;
    }
}

@media (max-width: 500px) {
    body {
        font-size: .9rem;
    }

    img {
        width: 40px;
        height: 40px;
    }


    .game-container {
        width: 90vmin;
        height: 100vmin;
    }

    .result {
        padding: 1rem;
    }
}
