/* Super Tic-Tac-Toe */

.game_controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    max-width: 500px;
    margin-bottom: 10px;
}
.game_button {
    background-color: #457B9D;
    border: 2px solid;
    text-align: center;
}

.game_button:hover{
    background-color: #1D3557;
    color: white;
}

#sttt_container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 1/1;
    max-width: 500px;
}
.sttt_sub_game {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    border: 5px solid;
    position: relative;
}
.sttt_cell {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    border: 2px solid;
    user-select: none;
}
.sttt_sub_game_overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: -1;
    margin: auto;
}
.sttt_sub_game_overlay_text {
    opacity: 1;
    color: #1D3557;
    user-select: none;
    font-size: 7em;
    position: absolute;
    z-index: 3;

    /* 
    Centering trick for absolutely positioned elements
    - left/top are relative to parent
    - transform is relative to child
    */
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
}

/* Slightly scale down text size on smaller screens */
@media screen and (max-width: 60px) {
    .sttt_sub_game_overlay_text {
        font-size: 5em;
    }
}


.sttt_cell:hover {
    background-color: #E63946; /* red */
}


/* Game state styles */
.sttt_sub_game_available {
    background-color: #457B9D;
}
.sttt_sub_game_overlay_active{
    z-index: 2;
    background-color: gray;
    opacity: 0.8;
}
