.game-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(10,6,10,0.7), transparent);
}
.game-nav .brand,
.game-nav .back-link { color: #fff; }
.game-nav .back-link { border-color: rgba(255,255,255,0.3); }

#game-root {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: #1a0f14;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#game-title-overlay {
  display: none; /* superseded by the in-scene 3D title mesh during the cutscene */
}

#game-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: #fff;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#game-hint:not(.hidden) {
  opacity: 1;
}

.game-hint-mobile { display: none; }

#mobile-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
  pointer-events: none;
}

.mc-side {
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

.mc-btn {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 1.3rem;
  touch-action: none;
  user-select: none;
}
.mc-btn:active { background: rgba(255,255,255,0.2); }

#speedometer {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  color: #fff;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#speed-value { font-size: 1.4rem; font-weight: 700; }
#speed-unit { font-size: 0.7rem; color: rgba(255,255,255,0.7); }

#sound-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .game-hint-mobile { display: block; margin-top: 0.25rem; }
  #game-hint p:first-child { display: none; }
}

@media (min-width: 721px) {
  #mobile-controls { display: none !important; }
}
