/* ============================================================
   Luminous Gesture Cube — Global Styles
   Optimized for Meta display glasses (600×600 viewport)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #000000;
  --color-neon-cyan: #00ffff;
  --color-neon-magenta: #ff00ff;
  --color-neon-blue: #4040ff;
  --color-text: #e0e0e0;
  --color-text-dim: #888;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 60px rgba(0, 255, 255, 0.2);
  --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.4), 0 0 60px rgba(255, 0, 255, 0.15);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  font-family: var(--font-family);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- App Container ---------- */
#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

/* ---------- Loading Overlay ---------- */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-cube {
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-neon-cyan);
  box-shadow: var(--glow-cyan);
  animation: loader-spin 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite,
             loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(0.85); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes loader-pulse {
  0%, 100% { 
    border-color: var(--color-neon-cyan);
    box-shadow: var(--glow-cyan);
  }
  50% { 
    border-color: var(--color-neon-magenta);
    box-shadow: var(--glow-magenta);
  }
}

.loader-text {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-dim);
  animation: text-fade 1.5s ease-in-out infinite;
}

@keyframes text-fade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---------- Info HUD ---------- */
#info-hud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: hud-fade-in 1s ease 1.5s forwards;
}

#info-hud h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: -webkit-linear-gradient(left, var(--color-neon-cyan), var(--color-neon-magenta));
  background: linear-gradient(90deg, var(--color-neon-cyan), var(--color-neon-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; /* Fallback to ensure text is transparent */
  text-shadow: 0 0 16px rgba(0, 255, 255, 0.3); /* Safe alternative to drop-shadow for clipped text */
  margin-bottom: 4px;
}

#info-hud p {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: var(--color-text-dim);
}

@keyframes hud-fade-in {
  to { opacity: 1; }
}
