* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(to bottom, #4ec0ca 0%, #87ceeb 100%);
  font-family: 'Arial', sans-serif;
}

.game-container {
  position: relative;
  width: 400px;
  height: 600px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #4ec0ca 0%, #87ceeb 70%, #d4a574 70%, #c49a6c 100%);
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  z-index: 10;
  transition: opacity 0.3s;
}

.screen.hidden {
  display: none;
}

.screen h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  color: #ffd700;
}

.screen p {
  font-size: 20px;
  margin: 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.instructions {
  font-size: 16px !important;
  color: #ddd;
  margin-top: 20px !important;
  text-align: center;
  line-height: 1.5;
}

#restartBtn {
  margin-top: 30px;
  padding: 15px 40px;
  font-size: 20px;
  background: #ffd700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#restartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
}

#restartBtn:active {
  transform: translateY(0);
}

.game-stats {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.score {
  font-size: 48px;
  font-weight: bold;
  color: white;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.coins {
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 15px;
  border-radius: 20px;
}

.difficulty {
  font-size: 16px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  background: rgba(255, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 15px;
}
