html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b1020;
  font-family: Inter, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
  outline: none;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  color: #fff;
}

.top-left, .bottom-left {
  position: absolute;
  left: 20px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.top-left { top: 20px; }
.bottom-left { bottom: 20px; }
.title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255,255,255,0.7);
}

#message {
  position: absolute;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#message.show {
  opacity: 1;
}

#overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 18, 0.68);
  pointer-events: auto;
}

#overlay.show {
  display: flex;
}

.panel {
  width: min(520px, calc(100% - 32px));
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.35);
}

.panel-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.panel-text {
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin-bottom: 18px;
}

button {
  appearance: none;
  border: none;
  border-radius: 12px;
  background: #5b8cff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
}

button:hover {
  background: #74a0ff;
}

#debugPanel {
  position: absolute;
  right: 20px;
  top: 20px;
  min-width: 280px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  white-space: pre-line;
}
