:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #08121f;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  min-width: 0;
  padding: 0.62rem 0.5rem;
  color: #f7fbff;
  background: rgba(18, 30, 46, 0.68);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

button:hover {
  border-color: rgba(255, 255, 255, 0.48);
  transform: translateY(-1px);
}

button.active {
  border-color: #7bdcff;
  background: rgba(0, 99, 160, 0.82);
}

input[type="range"] {
  width: 100%;
  accent-color: #7bdcff;
  cursor: pointer;
}

#park {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: fixed;
  z-index: 2;
  color: #f8fcff;
  background: rgba(5, 13, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hud-top {
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  pointer-events: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8ddf2;
}

p,
.status,
.hint {
  color: #dcebf5;
  font-size: 0.9rem;
}

.status {
  min-width: 9.5rem;
  text-align: right;
  font-weight: 800;
}

.controls {
  left: 1rem;
  bottom: 1rem;
  width: min(27rem, calc(100vw - 2rem));
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.control-row h2 {
  margin-bottom: 0;
}

#speedValue,
#fpsLabel {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

#fpsLabel {
  display: inline-block;
  margin-right: 0.75rem;
  color: #7bdcff;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

#povControls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hint {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  background: rgba(5, 13, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

@media (max-width: 720px) {
  .hud-top {
    align-items: flex-start;
  }

  .status,
  .hint {
    display: none;
  }

  .button-grid,
  #povControls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
