@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fascinate+Inline&display=swap');

html {
    box-sizing: border-box;
    height: 100%;
    background-color: #E9E9E9;
}

*, *::after, *::before {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
    font-family: 'Comfortaa', cursive;
}

body {
    overscroll-behavior-y: contain;
    height: 100%;
}

button {
    cursor: pointer;
}

/* header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(125, 116, 116, 1);
}

.page-title {
    margin-top: 10px;
    font-size: 24px;
    font-weight: normal;
    background: linear-gradient(180deg, #A2EB6A 34.9%, rgba(158, 220, 110, 0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} */

.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10%;
    padding-top: 20px;
}

.btn-group > button {
    border-radius: 8px;
    border: none;
    padding: 10px 2rem;
    transition: padding 100ms ease-in;
}

.btn-group > button:hover {
    padding: 12px 2.1rem;
}

.play-btn {
    background-color: #BAF297;
}

.reset-btn {
    color: white;
    background-color: #544F4F;
}

.board {
    margin: 10px auto;
    background-color: #0b0b0b;
    width: max-content;
    height: max-content;

    display: grid;
    grid-template-columns: repeat(20, 30px);
    grid-template-rows: repeat(20, 30px);
    
}

.cell {
    margin: 1px;
    background: rgb(54, 53, 53);
}

.food {
    background-image: url(../images/food.png);
    background-size: contain;
    background-repeat: no-repeat;
    animation: rotate 1s;
    animation-iteration-count: infinite;
}

@keyframes rotate {
    25% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.segment {
    background-color: lightgreen;
    border-radius: 4px;
}

.head.segment {
    background-color: darkgreen;
}

.game-over {
    z-index: 2;
    display: none;
    text-align: center;
    width: 100%;
    font-family: 'Fascinate Inline', cursive;
    color: indianred;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    font-size: 4rem;
}

.game-over.true {
    display: block;
}

.scores {
    width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.current-score, .high-score {
    display: flex;
    flex-direction: column;
}