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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #070318;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #f2f2f5;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

body.ui #hud {
  opacity: 1;
  pointer-events: auto;
}

#brand {
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #ff2d78, #00e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 45, 120, 0.4);
}

.sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
}

.panel {
  background: rgba(10, 5, 25, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  color: #d1d5db;
  display: inline-flex;
  gap: 16px;
  align-self: flex-start;
}

.panel .accent {
  color: #ff2d78;
  font-weight: bold;
}

#controls span b {
  color: #00e5ff;
  font-weight: bold;
}

#admin-link {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #ff2d78, #7c5cff);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(255, 45, 120, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

#admin-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 45, 120, 0.5);
}

#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 700;
  color: #00e5ff;
  transition: opacity 0.5s ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: #00e5ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
