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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #264466 0%, #08131f 45%, #04070c 100%);
}

#scene {
  display: block;
  width: 100vw;
  height: 100vh;
}

.hud {
  position: fixed;
  top: 24px;
  left: 24px;
  width: min(420px, calc(100vw - 48px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(5, 12, 22, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #62bf42, #138a3d);
  color: white;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 30px rgba(30, 160, 70, 0.35);
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.12;
}

p {
  margin: 0 0 16px;
  color: #d8e3ef;
  line-height: 1.6;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f8ff;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 214, 101, 0.65);
  background: rgba(124, 214, 101, 0.18);
}

.legend {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100vw - 48px);
}

.legend span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 12, 22, 0.66);
  color: #d8e3ef;
  backdrop-filter: blur(12px);
}

@media (max-width: 720px) {
  .hud {
    top: 14px;
    left: 14px;
    padding: 16px;
    width: calc(100vw - 28px);
  }

  .legend {
    right: 14px;
    bottom: 14px;
  }
}
