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

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

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

#score-display {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
}

#score {
  color: #a78bfa;
  font-weight: 700;
}

#game-canvas {
  border: 2px solid #2a2d3a;
  border-radius: 4px;
  max-width: 90vw;
  max-height: 85vh;
  touch-action: none;
}

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

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

#screen-start h1 {
  color: #a78bfa;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

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

.controls-hint {
  color: #999;
  font-size: 1rem;
  margin-bottom: 8px;
}

.action-hint {
  color: #a78bfa;
  font-size: 1.1rem;
  margin-top: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  #overlay-box {
    padding: 28px 24px;
  }

  #screen-start h1,
  #screen-gameover h1 {
    font-size: 1.6rem;
  }

  #score-display {
    font-size: 1.1rem;
  }

  .controls-hint {
    font-size: 0.9rem;
  }

  .action-hint {
    font-size: 0.95rem;
  }
}
