* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: url('./images/background.png') center/cover fixed, #111;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  display: grid;
  place-items: center;
}

/* 背景ブラー効果用のオーバーレイ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  z-index: -1;
}

#game {
  border: 2px solid #333;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
}

/* ゲームオーバーコンテナのスタイル */
#gameOverContainer {
  transition: opacity 0.3s ease-in-out;
}

/* ゲームオーバーテキストのパルスアニメーション */
@keyframes gameOverPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 2px 2px 8px rgba(255,20,147,0.8), 0 0 20px rgba(255,20,147,0.5);
  }
}

/* 動画表示時の背景オーバーレイ */
body.video-overlay::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 5;
  backdrop-filter: blur(5px);
}

/* ステージクリアコンテナのスタイル */
#stageClearContainer {
  transition: opacity 0.3s ease-in-out;
}

/* ステージクリアタイトルのパルスアニメーション */
@keyframes stageClearPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 2px 2px 8px rgba(255,105,180,0.8), 0 0 20px rgba(255,105,180,0.5);
  }
}

/* キャラクターのバウンスアニメーション */
@keyframes characterBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ゲージとキャラクターのホバー効果 */
#gaugeImage:hover,
#characterImage:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease-in-out;
}

#characterImage:hover {
  animation-play-state: paused;
}

/* ステージクリア画面の画像の縦横比を保つ */
#gaugeImage,
#characterImage {
  object-fit: contain;
  max-height: 200px; /* 高さの上限を設定 */
}
