body {
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #222;
    font-family: sans-serif;
    color: white;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 600px; /* スマートフォンでの表示を考慮 */
    max-height: 900px; /* スマートフォンでの表示を考慮 */
    overflow: hidden;
    background-color: #000;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #000;
}

.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 100;
}

.game-screen.hidden {
    display: none;
}

.game-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.game-screen p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.game-screen button {
    padding: 15px 30px;
    font-size: 1.5em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#difficultySelection button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: #555;
    color: white;
    border: 2px solid #777;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

#difficultySelection button.selected {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

#gameUI {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 1.2em;
    z-index: 50;
}

#scoreDisplay span, #lifeDisplay span {
    font-weight: bold;
}

#controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 50;
}

#shootButton {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%; /* 丸いボタン */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#bombButton {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-left: 10px;
}

/* Game Clear Screen Styles */
#gameClearScreen h1 {
    color: #00ff00; /* Green for clear */
}

#gameClearScreen button {
    background-color: #007bff;
}

/* Game Over Screen Styles */
#gameOverScreen h1 {
    color: #ff0000; /* Red for game over */
}

#gameOverScreen button {
    background-color: #ffc107;
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-screen h1 {
        font-size: 2em;
    }
    .game-screen p {
        font-size: 1em;
    }
    .game-screen button {
        padding: 12px 24px;
        font-size: 1.2em;
    }
    #gameUI {
        font-size: 1em;
    }
    #controls button {
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* Character Screen */
#characterScreen {
    justify-content: flex-start;
    padding-top: 50px;
}

.character-list {
    width: 90%;
    height: 70%;
    overflow-y: auto;
    margin-bottom: 20px;
}

.character-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.character-item img {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    object-fit: contain;
}

.character-item div {
    text-align: left;
}

.character-item h2 {
    margin: 0 0 5px 0;
}

.character-item p {
    margin: 0;
    font-size: 0.9em;
}

#backButton {
    background-color: #777;
}

#characterButton {
    margin-top: 50px;
}

#startButton {
    margin-top: 30px;
}