html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#face {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud {
  position: fixed;
  left: 12px;
  bottom: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  user-select: none;
  pointer-events: none;
  max-width: min(640px, calc(100vw - 24px));
}

#hud .keys {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* Mobile-friendly controls */
#controls {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

#controls button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

#controls button:active {
  transform: translateY(1px);
}

@media (max-width: 520px) {
  #hud {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
  #hud .keys {
    display: none; /* phones don't care about keybinds */
  }
  #controls {
    left: 10px;
    right: 10px;
    top: 10px;
    padding: 10px;
  }
  #controls button {
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* =========================================================
   🦄 Unicorn Mode (Theme System)
   ========================================================= */

/* Base: keep LunaFace readable in dark/light too */
html[data-theme="dark"] body { background: #000; }
html[data-theme="light"] body { background: #f7f7fb; }

/* Party gradient layer behind everything */
html[data-theme="unicorn"] body {
  background: radial-gradient(60% 60% at 20% 20%, rgba(255, 110, 196, 0.35), transparent 60%),
    radial-gradient(60% 60% at 80% 30%, rgba(120, 115, 245, 0.35), transparent 60%),
    radial-gradient(60% 60% at 50% 80%, rgba(79, 255, 176, 0.25), transparent 60%),
    #1a1030;
}

.unicorn_layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.unicorn_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.unicorn_emojis {
  position: absolute;
  inset: 0;
}

.unicorn_emoji {
  position: absolute;
  bottom: -60px;
  filter: drop-shadow(0 8px 18px rgba(255, 110, 196, 0.35));
  opacity: 0.9;
  will-change: transform;
}

/* Toggle button */
.lt_btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  font-weight: 800;
  cursor: pointer;
}

.lt_btn_party {
  background: linear-gradient(135deg, #ff6ec4, #7873f5, #4fffb0);
  border: 2px solid rgba(255,255,255,0.30);
  box-shadow: 0 4px 30px rgba(255,110,196,0.35), 0 0 60px rgba(120,115,245,0.25);
  color: rgba(255,255,255,0.98);
}

.lt_icon { font-size: 16px; }
.lt_label { font-size: 13px; }

/* Keep existing HUD/controls readable above unicorn layer */
#face { position: relative; z-index: 10; }
#controls { z-index: 20; }
#hud { z-index: 20; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
