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

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

.game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #16213e;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ui-panel {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  padding: 8px 16px;
  background: #0f3460;
  border-radius: 6px;
}

.nitro-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: #0f3460;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
}

.nitro-label {
  color: #f39c12;
  letter-spacing: 0.5px;
}

.nitro-bar-bg {
  flex-grow: 1;
  height: 12px;
  background: #1a1a2e;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #444;
}

.nitro-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f39c12, #e74c3c);
  transition: width 0.1s linear;
}

#gameCanvas {
  background-color: #333;
  border: 4px solid #0f3460;
  border-radius: 8px;
  display: block;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 52, 96, 0.95);
  padding: 24px 32px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.overlay.hidden {
  display: none;
}

.overlay h2 {
  color: #e94560;
  margin-bottom: 12px;
}

.overlay p {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  background-color: #e94560;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background-color: #ff5470;
}

.instructions {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #aaa;
  text-align: center;
  line-height: 1.4;
}

.instructions em {
  color: #f1c40f;
}
