.keyboard-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
    width: 90%;
    margin: auto;
}

.keyboard-row {
    display: flex;
    gap: 0.5em;
    margin: 0.25vh 0;

}

.keyboard-key {
    flex: 1 1 0;
    aspect-ratio: 1 / 1;
    font-weight: bold;
    font-size: clamp(1.4rem, 2vw, 1.4rem);
    background-color: #bbbbbb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden; /* Needed for ripple */
    position: relative; /* Needed for ripple */
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.special-key {
    flex: 2 1 0;
    aspect-ratio: auto;
    background-color: #00AF82;
}

.keyboard-key::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.8s ease;
}

.keyboard-key:active::after {
    transform: scale(2.5);
    opacity: 1;
    transition: transform 0s, opacity 0.8s ease;
}

.keyboard-key:hover {
    background-color: #d6d6d6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.keyboard-key:active {
    background-color: #c0c0c0;
    transform: scale(0.97);
    box-shadow: none;
}