h1 {
  color: #ffe100;
  font-size: 100px;
  top: 50px;
  font-family: "Jersey 25";
  text-align: center;
  position: absolute;
  z-index: 1;
  text-shadow: 5px 5px 4px rgba(0, 0, 0, 0.5);
}
p {
  color: rgb(255, 225, 0);
  font-size: 20px;
  font-family: "Jersey 25";
}
#startText {
  position: absolute;
  z-index: 1;
  bottom: 140px;
  right: 60px;
  max-width: 300px;
  text-align: right;
}

body {
  margin: 0;
  background-color: lightgray;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
}

#start-screen {
  background-image: url("./img/background/bg.png");
  background-size: cover;
  width: 1200px;
  height: 800px;
  position: relative;
  overflow: hidden;
  user-select: none;
}

#salpicadero {
  position: absolute;
  bottom: -200px;
  width: 100%;
}

#start-btn {
  position: absolute;
  width: 50px;
  left: 245px;
  bottom: 55px;
  z-index: 1;
}

#start-btn:hover {
  content: url("./img/menu/startHover.png");
}

#game-box {
  background-image: url("./img/background/bg.png");
  background-size:150%;
  background-position: center -210px;
  width: 1200px;
  height: 800px;
  align-content:stretch;
  position: relative;
  overflow: hidden;
  user-select: none;
}

#game-box * {
  pointer-events: none;
}

#game-screen,
#game-over-screen {
  display: none;
}

#game-screen {
  width: 1200px;
  height: 800px;
}

#game-over-screen {
  background-image: url(/img/background/bgGameOver.png);
  background-size: cover;
  width: 1200px;
  height: 800px;
  position: relative;
  overflow: hidden;
  user-select: none;
}

#gameoverh1 {
  color: rgb(255, 0, 0);
  font-size: 100px;
  top: 50px;
  font-family: "Jersey 25";
  text-align: center;
  position: absolute;
  z-index: 1;
  text-shadow: 5px 5px 4px rgba(255, 0, 0, 0.5);
}

#newRunButton {
  margin-bottom: -600px;
  font-family: "Jersey 25";
  font-size: 30px;
  background-color: rgb(255, 225, 0);
  padding: 30px;
  border-radius: 10px;
  color: black;
}

/* ── Reproductor de música ─────────────────────────────────── */
#music-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgb(255, 225, 0);
  border-radius: 10px;
  padding: 6px 16px;
  position: absolute;
  bottom: 60px;
  top: auto;
  left: 800px;
  transform: translateX(-50%);
  z-index: 10;
  user-select: none;
}

#music-title {
  font-family: "Jersey 25", sans-serif;
  font-size: 22px;
  color: rgb(255, 225, 0);
  min-width: 200px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-btn {
  background: none;
  border: none;
  color: rgb(255, 225, 0);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  transition: transform 0.1s;
}

.music-btn:hover {
  transform: scale(1.3);
}

.music-play-btn {
  border-left: 2px solid rgba(255, 225, 0, 0.4);
  padding-left: 14px;
  margin-left: 4px;
  font-size: 20px;
}

.music-play-btn.playing {
  color: white;
}

/* ── Flash de daño ─────────────────────────────────── */
@keyframes damageFlash {
  0%   { background: rgba(255, 0, 0, 0); }
  25%  { background: rgba(255, 0, 0, 0.45); }
  100% { background: rgba(255, 0, 0, 0); }
}

#damage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-radius: 0;
}

#damage-overlay.flash {
  animation: damageFlash 0.5s ease-out forwards;
}

#score-display {
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: "Jersey 25", sans-serif;
  font-size: 50px;
  color: rgb(255, 225, 0);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 5;
  pointer-events: none;
}