
/* ゲームオーバーアニメーション */
.game-over-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: linear-gradient(
    135deg,
    rgba(60, 60, 60, 0.85) 0%,
    rgba(40, 40, 40, 0.85) 50%,
    rgba(20, 20, 20, 0.85) 100%
  );
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 10000 !important;
  opacity: 0;
  transition: all 0.8s ease-out;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.game-over-overlay.show {
  opacity: 1;
}

.game-over-overlay.fade-out {
  opacity: 0;
}

.game-over-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 40px;
  position: relative;
  z-index: 10001;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.game-over-image {
  width: 380px;
  height: auto;
  animation: gameOverImageAnimation 2s ease-out;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  position: relative;
  z-index: 10002;
}

.game-over-buttons {
  display: flex;
  gap: 25px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.game-over-buttons.show-button {
  opacity: 1;
  transform: translateY(0);
}

.game-over-button {
  padding: 20px 45px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  background: linear-gradient(145deg, #666 0%, #444 100%);
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  min-width: 160px;
}

.game-over-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.game-over-button:hover::before {
  left: 100%;
}

.game-over-button:hover {
  background: linear-gradient(145deg, #777 0%, #555 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.game-over-button:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes gameOverImageAnimation {
  0% {
    transform: scale(0.3) rotate(-5deg);
    opacity: 0;
    filter: blur(10px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  }
  25% {
    transform: scale(0.6) rotate(-2deg);
    opacity: 0.3;
    filter: blur(5px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  }
  50% {
    transform: scale(1.1) rotate(1deg);
    opacity: 0.7;
    filter: blur(2px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  }
  75% {
    transform: scale(1.05) rotate(-0.5deg);
    opacity: 0.9;
    filter: blur(1px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0px) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
  }
}

/* 暗いパーティクルエフェクト */
.game-over-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 30% 20%,
      rgba(100, 100, 100, 0.3) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(80, 80, 80, 0.2) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 20% 60%,
      rgba(90, 90, 90, 0.25) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(70, 70, 70, 0.2) 1px,
      transparent 1px
    );
  background-size: 120px 120px, 180px 180px, 100px 100px, 140px 140px;
  animation: darkParticleAnimation 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes darkParticleAnimation {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0px);
  }
  50% {
    opacity: 0.6;
    transform: translateY(-10px);
  }
}
