* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    /* ボタン連打時の選択防止 */
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* スクロール防止 */
    background-color: #f0f8ff;
    /* 背景色 */
    font-family: "DotGothic16", sans-serif;
    letter-spacing: 0.1em;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

/* スコア表示 */
#score-board {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
}

/* ゲームエリア */
#game-area {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    /* コントロールエリア分引く */
    overflow: hidden;
}

/* 手（プレイヤー）のデザイン */
#player-hand {
    position: absolute;
    bottom: 50%;
    /* 画面中央（高さ）に配置という要件 */
    left: 50%;
    transform: translate(-50%, 50%);
    /* 中央寄せ補正 */
    width: 100px;
    height: 100px;
    border: 1px dotted #333;
    background-color: rgba(255, 255, 255, 0.5);
    /* 仮の見た目 */
    border-radius: 50%;
    transition: left 0.1s linear;
    /* 移動のアニメーション（仮） */
    z-index: 99;
    background-image: url(../images/hand.png);
    background-size: contain;
    background-repeat: no-repeat;
    transition: .1s;
}

#player-hand.active {
    transform: translate(-50%, 50%) scale(0.8);
}

/* 敵（ターゲット）のデザイン用クラス */
.enemy {
    position: absolute;
    top: -50px;
    /* 画面外からスタート */
    width: 50px;
    height: 50px;
    border-radius: 5px;
}

/* コントロールエリア */
#controls {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px;
    background-color: #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 20;
}

button {
    touch-action: manipulation;
    /* スマホでの遅延対策 */
}

.control-btn {
    width: 80px;
    height: 60px;
    font-size: 24px;
    background-color: #ddd;
    border: none;
    border-radius: 10px;
}

.action-btn {
    width: 80px;
    height: 80px;
    font-size: 30px;
    background-color: #ff4500;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 0 #b22222;
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.active-key {
    transform: translateY(4px);
    box-shadow: none;
    background-color: #ccc;
}

/* オーバーレイ画面（スタート・リザルト） */
#start-screen,
#result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

#start-btn,
#restart-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 20px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
}