/* ==========================================================================
   3D WebGL2 HDR16F Deep-Space Universe — Fullscreen OLED Styles
   Zero dependencies · Ultra-minimal floating glass HUD
   ========================================================================== */

:root {
  --bg: #010205;
  --glass-bg: rgba(8, 11, 22, 0.44);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --glass-active: rgba(255, 255, 255, 0.13);
  --fg: rgba(244, 247, 255, 0.90);
  --fg-muted: rgba(190, 206, 236, 0.52);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.58);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

#gl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#gl-canvas.is-dragging {
  cursor: grabbing;
}

/* Minimal Corner HUD */
.hud {
  position: fixed;
  z-index: 10;
  transition: opacity 0.65s ease, transform 0.35s ease;
}

body.is-idle .hud {
  opacity: 0.24;
}

body.is-hidden-hud .hud {
  opacity: 0;
  pointer-events: none;
}

.hud:hover {
  opacity: 1 !important;
}

.hud-tr {
  top: 20px;
  right: 20px;
}

.hud-bl {
  left: 20px;
  bottom: 20px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--glass-highlight) inset, var(--shadow);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.12s ease;
}

.icon-btn:hover {
  background: var(--glass-hover);
}

.icon-btn:active {
  transform: scale(0.93);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

#btn-sound[aria-pressed="true"] .icon-off { display: none; }
#btn-sound[aria-pressed="false"] .icon-on { display: none; }
#btn-sound[aria-pressed="false"] { color: var(--fg-muted); }

/* Minimal 3D Vista Dock */
.vista-dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--glass-highlight) inset, var(--shadow);
}

.vista-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.12s ease;
}

.vista-btn:hover {
  color: var(--fg);
  background: var(--glass-hover);
}

.vista-btn:active {
  transform: scale(0.96);
}

.vista-btn.is-active {
  color: var(--fg);
  background: var(--glass-active);
}

.vista-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot, #ffb85c);
  box-shadow: 0 0 7px var(--dot, #ffb85c);
  opacity: 0.55;
  transition: opacity 0.25s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}

.vista-btn.is-active .vista-dot {
  opacity: 1;
}

.whisper {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  z-index: 9;
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--fg-muted);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.whisper.is-gone {
  opacity: 0;
  transform: translate(-50%, 6px);
}

@media (max-width: 720px) {
  .hud-tr { top: 14px; right: 14px; }
  .hud-bl {
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    max-width: calc(100vw - 20px);
  }
  .vista-btn {
    padding: 6px 8px;
    font-size: 9.5px;
    gap: 5px;
    letter-spacing: 0.05em;
  }
  .whisper {
    bottom: 62px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud, .whisper, .vista-btn { transition-duration: 0.01ms !important; }
}
