.coin-game-container {
  position: relative;
  width: 360px;
  height: 640px;
  max-width: 95vw;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(#4fd0f0, #2fbde8);
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

#coinCanvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

.animation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* HUD */
.hud {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.timer {
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-icon {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

/* Меню */
.menu {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.menu.hidden {
  display: none;
}

.menu-box {
  background: rgba(30, 50, 120, 0.4); /* полупрозрачный синий */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 3px solid #eabd40;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  width: 80%;
  max-width: 320px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* мягкая тень */
  color: #fff;
  transition: all 0.3s ease;
}

/* FLASH эффект */
.flash {
  animation: flash-red 0.6s ease;
}

@keyframes flash-red {
  0% { background-color: rgba(255, 0, 0, 0.4); }
  50% { background-color: rgba(255, 0, 0, 0.6); }
  100% { background-color: rgba(255, 0, 0, 0); }
}

/* Вспышка (монетка) */
.flash-coin {
  position: absolute;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255,255,150,0.9) 0%, rgba(255,255,150,0.4) 50%, rgba(255,255,150,0) 100%);
  border-radius: 50%;
  transform: scale(0.5);
  animation: coin-flash 0.4s ease-out forwards;
}

@keyframes coin-flash {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Взрыв (бомба) */
.explosion {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,0,0,0.9) 0%, rgba(255,0,0,0.4) 50%, rgba(255,0,0,0) 100%);
  border-radius: 50%;
  transform: scale(0.5);
  animation: explosion-anim 0.6s ease-out forwards;
}

@keyframes explosion-anim {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}
