body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
    overflow: hidden;
}

#game-container {
    background-color: #006633;
    position: relative;
    /* ボタンを配置する基準点にする */
    /* 麻雀卓のような緑色 */
    width: 100vw;
    height: 100vh;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#game-board {
    /* Three.jsのCanvasサイズに合わせる */
    width: 100%;
    height: 100%;
    background-color: #004422;
}

#reset-button.disabled,
#hint-button.disabled {
    background-color: rgba(128, 128, 128, 0.5);
    /* グレーアウト */
    color: #aaa;
    pointer-events: none;
    /* クリックを無効化 */
    border-color: rgba(128, 128, 128, 0.5);
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#overlay.hidden {
    display: none;
}

#overlay-content {
    background-color: white;
    padding: 30px 50px;
    border-radius: 10px;
    text-align: center;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#overlay-message {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2em;
}

#overlay-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#play-again-button {
    padding: 10px 25px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}

#restart-button {
    padding: 10px 25px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #dc3545;
    color: white;
    margin: 0;
}

#shuffle-button {
    padding: 10px 25px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #ffc107;
    color: #333;
    margin: 0;
}

#combo-gauge {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background-color: #00e5ff;
    width: 0%;
    z-index: 50;
    box-shadow: 0 0 10px #00e5ff;
    transition: width 0.1s linear;
}

#score-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 50;
    display: flex;
    align-items: baseline;
    gap: 15px;
    pointer-events: none;
    white-space: nowrap;
}

#score-label {
    font-size: 20px;
    color: #ccc;
}

#score-value {
    font-size: 20px;
}

#combo-value {
    color: #ffeb3b;
    font-size: 24px;
    font-style: italic;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.8);
}

.floating-score {
    position: absolute;
    color: #ffeb3b;
    font-weight: bold;
    font-size: 24px;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    animation: floatUp 1s forwards;
    z-index: 60;
    white-space: nowrap;
}

@keyframes floatUp {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(1.5);
        opacity: 0;
    }
}

.floating-score.deduction {
    color: #ff4444;
    animation: floatDown 1s forwards;
}

@keyframes floatDown {
    0% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 50px) scale(1.2);
        opacity: 0;
    }
}

