/* ===== The Red Hat Boy – 2D Runner (Styles) ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  background: #000;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

/* ---- Game Area ---- */
.game-area {
  background-image: url(Images/background.png);
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-repeat: repeat-x;
  overflow: hidden;
  position: relative;
}

/* ---- Character ---- */
.boy {
  position: absolute;
  height: 205px;
  margin-top: 390px;
  left: 20px;
  z-index: 10;
  image-rendering: auto;
}

/* ---- Flame obstacles ---- */
.flame {
  height: 120px;
  margin-top: 495px;
  position: absolute;
  z-index: 5;
}

/* ---- Score ---- */
.score {
  position: absolute;
  font-size: 48px;
  font-weight: 900;
  font-family: 'Arial Black', 'Arial', sans-serif;
  left: 50px;
  top: 20px;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,.7);
  z-index: 20;
  letter-spacing: 2px;
}

/* ---- Overlays (start, game-over, win) ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 100;
}
.overlay.visible {
  visibility: visible;
  opacity: 1;
}

/* ---- Start Screen ---- */
.start-screen {
  background: url(Images/background.png) center / cover;
}
.game-title {
  color: #d40707;
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  font-family: 'Franklin Gothic Medium', 'Arial', sans-serif;
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 10px;
}
.welcome-text {
  font-size: clamp(30px, 5vw, 55px);
  font-weight: 700;
  color: #ff2222;
  margin-bottom: 20px;
}
.instruction {
  font-size: clamp(16px, 3vw, 28px);
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}
.instruction kbd {
  background: #333;
  color: #fff;
  padding: 2px 10px;
  border-radius: 5px;
  font-family: inherit;
}

/* ---- Game Over ---- */
.game-over {
  background: url("Images/Game%20Over%20Background.jpg") center / cover;
}
.over-title {
  font-size: clamp(50px, 10vw, 100px);
  font-weight: 900;
  color: #ff0000;
  text-shadow: 3px 3px 0 #000;
}
.over-subtitle {
  font-size: clamp(24px, 4vw, 40px);
  color: #ff4444;
  font-weight: 700;
  margin: 10px 0 5px;
}
.over-score {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,.6);
  margin-bottom: 20px;
}

/* ---- Win ---- */
.win-screen {
  background: url("Images/Game%20Over%20Background.jpg") center / cover;
}
.win-title {
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 900;
  color: #ff2222;
  text-shadow: 3px 3px 0 #000;
}
.win-subtitle {
  font-size: clamp(30px, 6vw, 70px);
  color: #ff4444;
  font-weight: 700;
}
.win-label {
  font-size: 28px;
  color: #fff;
  margin-top: 10px;
}
.win-score {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,.6);
  margin-bottom: 20px;
}

/* ---- Buttons ---- */
.play-btn {
  width: clamp(250px, 40vw, 500px);
  height: clamp(50px, 7vh, 80px);
  font-size: clamp(20px, 3vw, 42px);
  font-weight: 700;
  color: #fff;
  border: none;
  background: linear-gradient(135deg, #28a745, #218838);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .15s;
}
.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.play-btn:active {
  transform: scale(0.97);
}
