.keyboard {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.key-row {
    display: flex;
    gap: 4px;
}

.key-row--space {
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}


.key {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    border-radius: 10px;
    background: rgb(112, 112, 112, 0.5);
    overflow: hidden;
    --practice-progress: 0;
    --practice-fill-color: rgb(112, 112, 112);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.25s;
}

.key::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--practice-fill-color);
    transform-origin: bottom;
    transform: scaleY(var(--practice-progress));
    opacity: 0.8;
    transition: transform 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.key > * {
    position: relative;
    z-index: 1;
}

.key--wide {
    width: 68px;
}

.key--space {
    width: 240px;
}

.key--wide .first-key,
.key--space .first-key {
    font-size: 18px;
    font-weight: 500;
}

.key--space .first-key {
    letter-spacing: 0.08em;
}

.first-key {
    font-size: 20px;
    line-height: 1;
}

.key-other {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
    font-weight: 100;
}

.key-other p {
    margin: 0;
    color: #b3b3c5;
}

.key-other p:empty {
    display: none;
}

.key-to-press{
    background-color: #4343a8;
}

.key-available{
    background-color: rgb(40, 40, 40);
}

.key-feedback-correct{
    background-color: var(--key-correct);
    color: var(--text-inverse);
}

.key-feedback-wrong{
    background-color: var(--key-wrong);
    color: var(--text-inverse);
}

.key--pressed{
    transform: scale(0.90);
}

.key:hover{
    transition: 0.25s;
    transform: scale(0.90);
    cursor: pointer;
}

.key.key-feedback-correct::after,
.key.key-feedback-wrong::after,
.key.key-to-press::after,
.key.key-available::after {
    opacity: 0;
}
