/* CSS */
* {
  user-select: none;
}

/* ゲームスタートダイアログ */
body {
    margin: 0;
    overflow: hidden;
    background: #000;
    color: #ff0000;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    z-index: 1000;
}

.hidden {
    display: none;
}

#loadingVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#startScreen {
    flex-direction: column;
    text-align: center;
    color: white;
}

#startScreen h1 {
    font-size: 2em;
}

#startScreen button {
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
}

#startDialog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/FPS-game.PNG);
    background-size: cover;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100; /* 最前面に表示 */
}

#startMessage {
    color: #fff;
    background-color: #00000056;
    text-shadow: #000 2px 1.5px 1px;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    /* margin-bottom: 20px; */
}
.ga {
    font-size: 120%;
    padding: 10% 0% 0% 40%;
    font-weight: 200;
    /* text-shadow: #000000 1px 1px 1px; */
}

/* ゲーム開始前は他の要素を非表示 */
.HP, #gameOver, #damageEffect, #gun {
    display: none;
}

/* ゲーム開始後に表示 */
.game-started .HP, .game-started, .game-started {
    display: block;
}

canvas {
    display: block;
}
.HP{
    background-color: #000;
}
#info {
    position: absolute;
    background-color: #000;
    font-size: 25px;
    width: 55%;
    /* border: 1px solid #fff; */
    padding: 1% 12% 3.5% 1%;
    /* top: 10px;
    left: 10px; */
    color: #fff;
    font-family: Arial, sans-serif;
}
#hpBarContainer {
    background-image: url(../img/abg_btn\ \(Copy\).png);
    background-size: cover;
    position: absolute;
    top: 60px;
    left: 2.5%;
    width: 62.5%;
    height: 4.5%;
    border: 1px solid #fff;
    transform: skew(-40deg);
}
#enemiesDefeatedCount {
    /* position: fixed; */
    width: 0%;
    color: aqua;
    text-align: right;
    font-family: Arial, sans-serif;
}
#hpBar {
    width: 100%;
    height: 100%;
    /* background-color: orange; */
    background-image: url(../img/bg_btn.png);
    background-size: cover;
}
#gameOver {
    display: none;
    position: absolute;
    width: 100%;
    padding: 20% 40% 45% 20%;
    background-image: url(../img/splash-gameover.png);
    background-size: 65%;
    background-color: #00000088;
    /* transform: translate(-50%, -50%); */
    font-size: 36px; color: #fff;
    z-index: 20;
}
/* ダメージエフェクト */
#damageEffect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* 初期状態で非表示 */
    pointer-events: none; /* クリックを透過させる */
    z-index: 10; /* 他の要素より手前に表示 */
}

#damageSplash {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像が画面にフィットするよう調整 */
    opacity: 1;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.1s ease forwards; /* 0.3秒でフェードアウト */
}
#gun {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像が画面にフィットするよう調整 */
}
#enemyStatus {
    position: absolute;
    background-color: #000;
    bottom: 0%; /* HPバーの下に配置 */
    /* left: 1.5%; */
    color: #fff;
    padding-left: 40px;
    padding-right: 40px;
    font-size: 140%;
    font-family: Arial, sans-serif;
    /* transform: skew(-40deg); */
}

#statusText {
    color: #ff0000; /* 状態を赤で強調 */
}

#freezeTime {
    color: #00ff00; /* 時間を緑で強調 */
}