@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

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

html {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Press Start 2P", cursive;
  background: linear-gradient(
    180deg,
    #5c94fc 0%,
    #5c94fc 60%,
    #009900 60%,
    #009900 100%
  );
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.pixel-font {
  font-family: "Press Start 2P", cursive;
}

.game-container {
  position: relative;
  width: 100%;
  max-width: 800px;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #000;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  background: #5c94fc;
}

.overlay {
  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;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.btn {
  font-family: "Press Start 2P", cursive;
  padding: 15px 30px;
  font-size: 14px;
  background: #e52521;
  color: white;
  border: 4px solid #000;
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn:hover {
  background: #ff4444;
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.95);
}

.score-display {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 10px;
  text-shadow: 2px 2px 0 #000;
  z-index: 5;
  line-height: 1.8;
}

.coin-icon {
  color: #ffd700;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.bounce-text {
  animation: bounce 0.8s ease-in-out infinite;
}

@media (max-width: 600px) {
  .score-display {
    font-size: 8px;
    top: 6px;
    left: 6px;
    line-height: 1.6;
  }

  .btn {
    padding: 12px 18px;
    font-size: 11px;
    border-width: 3px;
  }

  .overlay h1 {
    font-size: 1.2rem !important;
  }

  .overlay p {
    font-size: 0.6rem !important;
  }

  .overlay .text-xs {
    font-size: 0.5rem !important;
  }
}

@media (max-width: 380px) {
  .score-display {
    font-size: 7px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 9px;
  }

  .overlay h1 {
    font-size: 1rem !important;
  }
}
