h1 {
    text-align: center;
    color: white;
    font-family: 'Comic Sans MS', sans-serif; 
    font-size: 250%;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #1c1c1c;
    overflow: hidden; 
}

#table {
    width: 50vw;                
    max-width: 500px;          
    max-height: 500px;
    min-width: 150px;
    min-height: 150px;
    margin: auto;
    border-radius: 15px;
    overflow: hidden;          
    display: flex;
    flex-direction: column;     
}

.simpleKeyboard {
    width: 80vw;      
    max-width: 800px;       
    height: 30vh;              
    margin: auto;
    display: flex;
    flex-wrap: wrap; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.simpleKeyboard > div {
    margin: 2px 0; 
    max-height: fit-content;
    max-width: fit-content;
}

.kbRow {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0px;
}

.keyboardButton {
    height: 100%;
    width: 4vw;        
    color: white;
    background-color: grey;
    font-size: 2vw;   
    margin: 2px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keyboardButton:hover {
    background-color: #555;
}

.row {
    background-color: #2e2e2e;
    border: 0.01px solid black;
    width: 100%;
    height: 100%;
    display: flex;
}


.cell {
    background-color: #2e2e2e;
    width: calc(10% / 7); 
    height: calc(100%); 
    border: 1px solid black;
    flex-grow: 1;            
    flex-basis: 0;          
    aspect-ratio: 1 / 1;     
    font-size: 3vw;          
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5); 
    transition: background-color 0.5s ease;

}


.pop {
    animation: pop 0.3s ease forwards; 
}

@keyframes pop {
    0% {
        transform: scale(0); 
        opacity: 0;        
    }
    100% {
        transform: scale(1); 
        opacity: 1;       
    }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translate(0); }
    25% { transform: translate(-5px); }
    50% { transform: translate(5px); }
    75% { transform: translate(-5px); }
    100% { transform: translate(0); }
}

/*keyboard disappears when screen is bigger than this*/
@media (min-width: 1521px) {
    .simpleKeyboard {
        display: none; 
    }
}


/* adjustments for smaller screens */
@media (max-width: 600px) {
    h1 {
        font-size: 200%; 
    }
    .keyboardButton { 
        width: 14vw;       
        min-width: 70px;   
        font-size: 5vw;    
        padding: 15px;   
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 150%; 
    }
}

@media (max-width: 600px) {
    #table {
        height: 40vh;
    }
    
    .keyboardButton { 
        width: 8vw;             
        max-width: 60px;       
        font-size: 2vw;         
    }
}
