.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    touch-action: none;
    /* スマホでのスワイプによる画面スクロールを完全に禁止 */
}

#stats-board {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #38B48B;
    font-family: monospace;
}

.canvas-wrapper {
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
}

canvas {
    display: block;
    background-color: #555;
    /* Road color */
    max-width: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    text-align: center;
    z-index: 10;
}

.overlay p {
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.overlay.hidden {
    display: none;
}

button {
    padding: 12px 24px;
    font-size: 1.2rem;
    background-color: #38B48B;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 0 #2a8f6d;
    font-weight: bold;
}

button:hover {
    background-color: #2a8f6d;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1b664d;
}

button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.controls-hint {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.back-link {
    display: inline-block;
    color: #666;
    margin-top: 15px;
}