body {
    background-color: #0d3b26;
}

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

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

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

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

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

.card-slot {
    width: 90px;
    height: 126px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    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;
}

#field-row {
    gap: 2rem;
}

.field-pile {
    position: relative;
}

#hand-row {
    gap: 1rem;
}

.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-placed {
    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;
}

.score-panel-value-inline {
    font-size: 1.6em;
    font-weight: bold;
    line-height: 1;
    color: #e63946;
    margin-left: 0.4em;
}

#player-score-panel .score-panel-value-inline {
    color: #1d6fa5;
}

#field-row {
    min-width: 220px;
}

#reshuffle-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#deck-count.deck-empty {
    color: #ffd54a !important;
    font-weight: bold;
}

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

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