:root {
  color-scheme: dark;
  --bg: radial-gradient(circle at 20% -10%, #1b276b 0%, #05030f 45%, #000207 100%);
  --glass: rgba(10, 14, 26, 0.8);
  --cyan: #5ddfff;
  --gold: #ffd38e;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: #f7f9ff;
}

canvas {
  position: fixed;
  inset: 0;
  display: block;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ui {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.ui input {
  display: none;
}

.ui button,
.ui .file-btn {
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f6ff;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ui button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ui button:hover:not(:disabled),
.ui .file-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.ui #status {
  font-size: 0.9rem;
  min-width: 240px;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 211, 142, 0.45);
}

.vr-ui-button {
  position: static !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #f1f6ff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.vr-ui-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.hidden {
  display: none !important;
}

.touch-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.touch-pad {
  position: absolute;
  bottom: 18px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  touch-action: none;
}

.touch-pad.left {
  left: 18px;
}

.touch-pad.right {
  right: 18px;
}

.touch-fire {
  position: absolute;
  right: 26px;
  bottom: 182px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, rgba(255, 211, 142, 0.18), rgba(93, 223, 255, 0.12));
  color: #f7f9ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

@media (max-width: 720px) {
  .ui {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 26px;
    width: calc(100% - 32px);
    transform: none;
    left: 16px;
    right: 16px;
  }
  .ui #status {
    flex-basis: 100%;
    text-align: center;
  }

  .touch-pad {
    width: 120px;
    height: 120px;
    bottom: 12px;
  }
  .touch-fire {
    right: 20px;
    bottom: 150px;
  }
}
