html {
    --line-color: #0a8f3c;
    --body-bg-color: #000;
}

body {
    background-color: var(--body-bg-color);
}

#board-row {
    max-width: 100%;
    gap: 1.5rem;
}

#board-wrapper {
    width: 600px;
    max-width: 100%;
    flex-shrink: 0;
}

.score-panel {
    flex-shrink: 0;
    text-align: center;
    min-width: 90px;
}

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

.score-panel-value {
    font-size: 3.5em;
    font-weight: bold;
    line-height: 1;
}

#player-score-value {
    color: var(--line-color);
}

#cpu-score-value {
    color: #e63946;
}

@media (max-width: 900px) {
    #board-row {
        flex-wrap: wrap;
    }

    .score-panel {
        order: 2;
    }
}

#yamanoteCanvas {
    background-color: #111;
    border-radius: 50%;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.2);
    width: 100%;
    height: auto;
}

#typing_area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46%;
    max-width: 230px;
    padding: 0.5em 0.6em;
    text-align: center;
    font-size: 1.6em;
    border: 3px solid var(--line-color);
    border-radius: 8px;
    background-color: #fff;
    color: #111;
    outline: none;
}

#typing_area:focus {
    border-color: var(--line-color);
    box-shadow: 0 0 6px var(--line-color);
}

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

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

#cleared-station-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 55px));
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
}

#cleared-station-name.show {
    animation: clearedStationFade 0.5s ease-out;
}

@keyframes clearedStationFade {
    0% {
        opacity: 0;
        transform: translate(-50%, calc(-50% - 45px));
    }
    15% {
        opacity: 1;
        transform: translate(-50%, calc(-50% - 55px));
    }
    75% {
        opacity: 1;
        transform: translate(-50%, calc(-50% - 55px));
    }
    100% {
        opacity: 0;
        transform: translate(-50%, calc(-50% - 60px));
    }
}

#cpu-station-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 55px));
    font-size: 1.3em;
    font-weight: bold;
    color: #e63946;
    white-space: nowrap;
    pointer-events: none;
}
