body {
    position: relative;
    background-color: white;
    text-align: center;
    display: grid;
    place-items: center; /* shortcut for justify-items + align-items */
    height: 100vh; /* full screen height */
    width: 100%;
    grid-template-rows: 1fr 9fr;
    grid-template-areas: 
        'header'
        'game-content'
    ;
    overflow: hidden;
    box-sizing: border-box
}

.inter-rounded {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.varela-round-regular {
  font-family: "Varela Round", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.head {
    grid-area: header;
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: space-between;
    place-items: center;
    gap: 10px;
}

.tools {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.scoreboard {
    position: relative;
    gap: 10px;
    align-self: flex-end;
    padding: 10px;
    margin-left: 10px;
    background-color: #f1f1f1;
    border-radius: 10px;
    color: #171717;
    font-size: 1.2em;
}

#score {
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    font-variant-numeric: slashed-zero;
    font-size: 1.25em;
    font-weight: 500;
    text-align-last: center;
}


.logo {
    position: relative;
    background-color: #f9f9f9;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(153, 243, 158, 0.1);
    border-radius: 20%;
    z-index: 100;
}

.logoN {
    font-size: 2em;
    position: absolute;
    top: 20%;
    left: 32.5%;
    margin: 10px;
}

.logoX {
    font-size: 3em;  
    color: #d114d1;
}

.logoO {
    font-size: 3em;
    color: #f1ae30;
}

.purpleTxt {
    color: #d114d1;
}

.orangeTxt {
    color: #f1ae30;
}

.message {
    position: absolute;
    top: 20%;
    margin-top: 10px;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    padding: 20px;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    z-index: 300;
    transition: transform 1s ease-in-out;
}

/* Hidden state (default) */
.message.hide-message {
    transform: translateY(-1000%);
}

/* Revealed state */
.message.show-message {
    transform: translateY(0);
}

.tools {
    position: relative;
}

.settings {
    position: absolute;
    top: 10%;
    left: 2.5%;
    right: 2.5%;
    margin: 0 auto;
    width: 90%;
    height: 70vh;
    padding: 0.2em;
    border-radius: 15px;
    background-color: #f5f5f5;
    box-shadow: 0 4px 8px rgba(153, 243, 158, 0.1);
    z-index: 400;
    transition: transform .5s ease;
    transform-origin: top right;
}

.settings-icon-img {
    position: relative;
    margin-right: 5%;
    z-index: 500;
}

.settings-icon {
    transform: rotate(0deg);
    transition: transform 0.5s ease;
}

.settings-icon:hover {
    cursor: pointer;
}

.rotate-icon {
    transform: rotate(180deg);
    transition: transform 0.5s ease;
}

.settings.hide-settings {
    transform: scale(0, 0);
    transform-origin: top right;
}

.settings-title {
    color: #3d3d3d;
}

.settings-list {
    display: flex;
    flex-direction: column;
    justify-content:flex-start;
    align-items: flex-start;
    padding: 0;
    gap: 0.2em;
}

.setting {
    position: relative;
    width: 100%;
    text-align: left;
    font-size: 1.5em;
    color: #3d3d3d;
    list-style-type: none;
    padding: 0.4em;
    min-width: 100%;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    left: 2.5%;
    display: flex;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: 0;
    padding-top: 0.5em;
}

#speed {
   -webkit-appearance: none;  /* Override default CSS styles */
    appearance: none;
    width: 90%; /* Full-width */
    background: #d114d1;
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 0.5em; 
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;

}

.speed-title {
    position: relative;
}

#output {
    position: relative;
    font-size: 0.8em;
}

.reset {
    position: relative;
    color: red;
}

.message-style {
    padding: 10px;
    font-size: 1.5em;
    font-weight: 500;
    display: grid;
    gap: 0.5em;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
}

.play-again-btn {
    background-color: #4CAF50;
    color: white;
    padding: 0.5em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    margin: 2px auto;
    height: min-content;
    grid-row: span 1;
    grid-column: 1 / span 2;
    transform: translatey(50%);
}

.game-container {
    grid-area: game-content;
    position: relative;
    background-color: black;
    width: fit-content;
    height: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    gap: 10px;
    justify-content: center;
    align-content: center;
    z-index: 200;
    grid-template-areas: 
        "cell-1 cell-2 cell-3"
        "cell-4  cell-5 cell-6"
        "cell-7 cell-8 cell-9";

}

#cell-1 { grid-area: cell-1;}
#cell-2 { grid-area: cell-2;}
#cell-3 { grid-area: cell-3;}
#cell-4 { grid-area: cell-4;}
#cell-5 { grid-area: cell-5;}
#cell-6 { grid-area: cell-6;}
#cell-7 { grid-area: cell-7;}
#cell-8 { grid-area: cell-8;}
#cell-9 { grid-area: cell-9;}

.cell {
    background-color: white;
    padding: 5px;
    width: 25vw;
    height: 25vw;
    text-align: center;
    font-size: 5em;
    font-weight: 600;
    border: none;
}

@media only screen and (min-width: 768px) {
    .cell {
        width: 25vw;
        height: 25vw;
        font-size: 75px;
    }   
}

@media only screen and (min-width: 1024px) and (min-height: 400px) {
    .logo {
        margin: 0;
        padding: 10px;
    }
    .logoN {
        font-size: 1em;
        position: absolute;
        top: 25%;
        left: 35%;
        margin: 10px;
    }

    .logoX {
        font-size: 1.5em;  
        color: #d114d1;
    }

    .logoO {
        font-size: 1.5em;
        color: #f1ae30;
    }
    .tools {
        padding: 0;
    }
    .scoreboard {
        font-size: 0.8em;
    }

    .reset {
        font: 0.8em;
    }
    .cell {
        width: 10vw;
        height: 10vw;
        font-size: 7.5em;
    }
}