<!DOCTYPE html>&#10;<html>&#10;<head>&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;<style>.lw {
    font-size: 70px;
}</style>&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;</head>&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;<body>&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#10;&#10;&#10;&#32;&#32;&#32;&#32;<meta charset="UTF-8">&#10;&#32;&#32;&#32;&#32;<meta name="viewport" content="width=device-width, initial-scale=1.0">&#10;&#32;&#32;&#32;&#32;<title>&#36899;&#25171;&#12466;&#12540;&#12512;</title>&#10;&#32;&#32;&#32;&#32;<style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin-top: 50px;
        }
        #gameButton, #startButton {
            padding: 40px 80px;
            font-size: 32px;
            cursor: pointer;
            border: none;
            background-color: #f15a24;
            color: white;
            border-radius: 15px;
            box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
            margin: 10px;
        }
        #gameButton:disabled, #startButton:disabled {
            background-color: gray;
            cursor: not-allowed;
        }
        #gameButton:active {
            background-color: #d1481e;
        }
        #score, #highScore, #countdown {
            font-size: 28px;
            margin-top: 20px;
        }
        #timer {
            font-size: 24px;
            margin-top: 10px;
        }
    </style>&#10;&#10;&#10;&#32;&#32;&#32;&#32;<h1><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#36899;&#25171;&#12466;&#12540;&#12512;</font></font></h1>&#10;&#32;&#32;&#32;&#32;<button id="startButton"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#12473;&#12479;&#12540;&#12488;</font></font></button>&#10;&#32;&#32;&#32;&#32;<div id="countdown"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#28310;&#20633;&#23436;&#20102;&#65281;</font></font></div>&#10;&#32;&#32;&#32;&#32;<button id="gameButton" disabled=""><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#36899;&#25171;&#65281;</font></font></button>&#10;&#32;&#32;&#32;&#32;<div id="score"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#12473;&#12467;&#12450;&#58;&#32;&#48;</font></font></div>&#10;&#32;&#32;&#32;&#32;<div id="highScore"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#12495;&#12452;&#12473;&#12467;&#8203;&#8203;&#12450;&#58;&#32;&#53;&#56;</font></font></div>&#10;&#32;&#32;&#32;&#32;<div id="timer"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">&#26178;&#38291;&#58;&#32;&#49;&#48;&#31186;</font></font></div>&#10;&#10;&#32;&#32;&#32;&#32;<script>
        let score = 0;
        let timeLeft = 10; // ゲームの制限時間
        let gameActive = false;
        let countdownTime = 3; // カウントダウン時間

        // 各要素を取得
        const scoreElement = document.getElementById("score");
        const timerElement = document.getElementById("timer");
        const gameButton = document.getElementById("gameButton");
        const startButton = document.getElementById("startButton");
        const countdownElement = document.getElementById("countdown");
        const highScoreElement = document.getElementById("highScore");

        // localStorageからハイスコアを取得
        let highScore = localStorage.getItem("highScore") ? parseInt(localStorage.getItem("highScore")) : 0;
        highScoreElement.textContent = "ハイスコア: " + highScore;

        // 連打ボタンクリック時の処理
        gameButton.onclick = () => {
            if (gameActive) {
                score++;
                scoreElement.textContent = "スコア: " + score;
            }
        };

        // スタートボタンを押したときの処理
        startButton.onclick = () => {
            startButton.disabled = true; // スタートボタンを無効化
            countdownElement.textContent = "3...";
            
            let countdown = setInterval(() => {
                countdownTime--;
                if (countdownTime > 0) {
                    countdownElement.textContent = countdownTime + "...";
                } else {
                    clearInterval(countdown);
                    startGame();
                }
            }, 1000);
        };

        // ゲーム開始処理
        function startGame() {
            score = 0;
            timeLeft = 10;
            gameActive = true;
            gameButton.disabled = false;
            scoreElement.textContent = "スコア: 0";
            timerElement.textContent = "時間: 10秒";
            countdownElement.textContent = "スタート！";

            // 10秒間のカウントダウン開始
            let timer = setInterval(() => {
                if (timeLeft > 0) {
                    timeLeft--;
                    timerElement.textContent = "時間: " + timeLeft + "秒";
                } else {
                    clearInterval(timer);
                    endGame();
                }
            }, 1000);
        }

        // ゲーム終了処理
        function endGame() {
            gameActive = false;
            gameButton.disabled = true;
            startButton.disabled = false; // スタートボタンを再度有効化
            countdownElement.textContent = "ゲーム終了！";

            // ハイスコアを更新
            if (score > highScore) {
                highScore = score;
                localStorage.setItem("highScore", highScore);
                highScoreElement.textContent = "ハイスコア: " + highScore;
            }
        }
    </script>&#10;&#10;&#10;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;<script>// Write JavaScript here</script>&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#10;&#32;&#32;&#32;&#32;&#10;</body>