body {
    background-color: #2d0d3b;
}

#typing_area {
    width: 13em;
    max-width: 90%;
    padding: 0.5em 0.8em;
    text-align: left;
    font-size: 1.4em;
    border: 3px solid #8e44ad;
    border-radius: 8px;
    background-color: #fff;
    color: #111;
    outline: none;
}

#typing_area:focus {
    border-color: #c26be0;
    box-shadow: 0 0 6px #c26be0;
}

#typing_area.missed {
    animation: missType 0.4s;
}

#typing_area:disabled {
    background-color: #ddd;
}

@keyframes missType {
    0% {
        background-color: #ff8080;
    }
}

.card-slot {
    width: 76px;
    height: 106px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.card-slot.empty {
    background-color: transparent;
    box-shadow: none;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.card-slot.black {
    color: #111;
}

.card-slot.red {
    color: #d21f3c;
}

#hand-row {
    gap: 0.8rem;
}

.hand-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.hand-key {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    width: 1.8em;
    text-align: center;
    font-weight: bold;
}

.card-slot.just-drawn {
    animation: cardPop 0.3s ease-out;
}

@keyframes cardPop {
    0% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.score-panel-label {
    font-size: 1.1em;
    color: #fff;
    opacity: 0.8;
}

.hand-name-inline {
    font-size: 1.4em;
    font-weight: bold;
    color: #ffd54a;
    margin-left: 0.5em;
}

#cpu-hand-row {
    gap: 0.8rem;
}

.cpu-hand-slot {
    display: flex;
    justify-content: center;
}

@media (max-width: 480px) {

    #hand-row,
    #cpu-hand-row {
        gap: 0.3rem;
    }

    .card-slot {
        width: 56px;
        height: 78px;
        font-size: 1.1em;
    }
}
