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

body {
  background: #0C0D14;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

#game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#score-display {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

#goals {
  color: #4ade80;
}

#attempts {
  color: #ffffff;
}

canvas {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(12, 13, 20, 0.85);
  z-index: 10;
  cursor: pointer;
  border-radius: 8px;
}

#overlay.hidden {
  display: none;
}

#overlay-box {
  background: #161822;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 40px 48px;
  text-align: center;
  max-width: 90%;
}

#screen-start h1 {
  color: #4ade80;
  font-size: 36px;
  margin-bottom: 12px;
}

#screen-gameover h1 {
  color: #ff5555;
  font-size: 36px;
  margin-bottom: 12px;
}

#overlay-box p {
  font-size: 18px;
  margin-bottom: 8px;
  color: #c0c0c0;
}

.controls-hint {
  font-size: 15px !important;
  color: #888 !important;
}

.action-hint {
  margin-top: 16px !important;
  color: #4ade80 !important;
  animation: pulse 1.8s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 600px) {
  #score-display {
    font-size: 22px;
  }

  #overlay-box {
    padding: 28px 24px;
  }

  #screen-start h1,
  #screen-gameover h1 {
    font-size: 28px;
  }

  #overlay-box p {
    font-size: 15px;
  }
}
