body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background: radial-gradient(ellipse at center, #0a0a0a 0%, #000000 100%);
  color: #0ff;
  overflow-x: hidden;
}

h1, h2, h3 {
  color: #f0f0f0;
  text-align: center;
}

.game-page-container {
  padding: 1rem;
  max-width: 1200px;
  margin: auto;
}

.stellaron-box-art-container {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
}

.stellaron-box-art-image {
  max-width: 250px;
  border-radius: 10px;
  box-shadow: 0 0 15px #0ff;
}

.game-meta {
  text-align: center;
  margin-bottom: 1rem;
}

.game-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.game-tag {
  background-color: #111;
  border: 1px solid #0ff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
}

.instructions {
  background-color: #111;
  border: 1px solid #0ff;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem auto;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tutorial-step {
  background-color: #0a0a0a;
  border: 1px solid #0ff;
  padding: 1rem;
  border-radius: 8px;
}

#controls-panel {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

#controls-panel label {
  color: #0ff;
  margin-right: 0.25rem;
}

#controls-panel select, #controls-panel button {
  background-color: #000;
  color: #0ff;
  border: 1px solid #0ff;
  padding: 6px 10px;
  border-radius: 4px;
  font-family: 'Orbitron', sans-serif;
}

.btn-primary {
  background-color: transparent;
  border: 2px solid #0ff;
  color: #0ff;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
}

.btn-secondary {
  background-color: #0ff;
  color: #000;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
}

#game-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#game-hud {
  display: flex;
  justify-content: space-around;
  background-color: #111;
  border: 1px solid #0ff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  flex-wrap: wrap;
}

.hud-item {
  margin: 4px 8px;
}

.hud-energy-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.energy-bar-container {
  width: 100px;
  height: 10px;
  background-color: #222;
  border: 1px solid #0ff;
  border-radius: 4px;
  overflow: hidden;
}

#energy-bar {
  height: 100%;
  background: linear-gradient(to right, #0ff, #08f);
  width: 100%;
}

.canvas-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  border: 2px solid #0ff;
  border-radius: 8px;
  overflow: hidden;
}

#cr-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: black;
  touch-action: none;
}

/* Gamepad Layout */
#gamepad-ui-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

#joystick-base {
  width: 100px;
  height: 100px;
  background-color: rgba(17, 17, 17, 0.7);
  border: 2px solid #0ff;
  border-radius: 50%;
  position: relative;
}

#joystick-stick {
  width: 50px;
  height: 50px;
  background-color: #0ff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#gamepad-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gamepad-action-btn {
  background-color: rgba(17, 17, 17, 0.7);
  border: 2px solid #0ff;
  color: #0ff;
  font-weight: bold;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-family: 'Orbitron', sans-serif;
}

/* Game Over */
#game-over-screen {
  text-align: center;
  background-color: #111;
  border: 1px solid #0ff;
  border-radius: 10px;
  padding: 2rem;
  max-width: 500px;
  margin: 2rem auto;
}

.leaderboard {
  text-align: left;
  margin-top: 1rem;
}

.leaderboard h2 {
  margin-bottom: 0.5rem;
}

.leaderboard ol {
  padding-left: 1rem;
  list-style: decimal;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  #game-hud {
    flex-direction: column;
    align-items: flex-start;
  }
}