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

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #eee;
}

#game-container {
  background: #16213e;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  text-align: center;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #0f3460;
  letter-spacing: 4px;
}

#score-board {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  background: #0f3460;
  border-radius: 8px;
  font-size: 1.1rem;
}

#score-board strong {
  color: #e94560;
}

canvas {
  display: block;
  margin: 0 auto;
  border: 2px solid #0f3460;
  border-radius: 8px;
  background: #0a0a23;
}

#controls {
  margin-top: 1rem;
}

#restartBtn {
  background: #e94560;
  color: white;
  border: none;
  padding: 0.6rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

#restartBtn:hover {
  background: #c73650;
}

#status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #aaa;
}

#mobile-controls {
  display: none;
  margin-top: 1rem;
}

.dir-btn {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  background: #0f3460;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 4px;
  transition: background 0.15s;
}

.dir-btn:active {
  background: #e94560;
}

@media (pointer: coarse) {
  #mobile-controls {
    display: block;
  }
}