/* Foxfire.wav — Embroidered Tapestry Styles */

:root {
  --fabric: #C8B99A;
  --frame: #2A1F1A;
  --gold: #FFD700;
  --rust: #8B0000;
  --dark: #1A1410;
  --cream: #FFF8DC;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--frame);
  font-family: 'Courier Prime', monospace;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game {
  display: block;
  width: 100%; height: 100%;
  touch-action: none;
}

/* ── Overlay Buttons ── */
#overlay-buttons {
  position: fixed;
  top: 12px; right: 12px;
  display: flex; gap: 8px;
  z-index: 100;
}

#overlay-buttons button {
  width: 40px; height: 40px;
  background: rgba(42, 31, 26, 0.75);
  color: var(--gold);
  border: 2px solid rgba(139, 105, 20, 0.5);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  backdrop-filter: blur(4px);
}

#overlay-buttons button:hover {
  background: rgba(42, 31, 26, 0.95);
  border-color: var(--gold);
}

#overlay-buttons button:active {
  transform: scale(0.92);
}

#overlay-buttons button.muted {
  color: #5C4A1E;
  border-color: rgba(92, 74, 30, 0.4);
}

/* ── Mobile Controls ── */
#touch-controls {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  display: none;
  z-index: 90;
  pointer-events: none;
}

#touch-controls.visible {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px 24px;
}

/* Joystick */
#joystick-zone {
  width: 140px; height: 140px;
  pointer-events: auto;
}

#joystick-base {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(42, 31, 26, 0.45);
  border: 3px solid rgba(139, 105, 20, 0.35);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 10px;
}

#joystick-stick {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.35);
  border: 2px solid rgba(255, 215, 0, 0.5);
  transition: none;
  pointer-events: none;
}

/* Action Buttons */
#action-btns {
  display: flex; gap: 12px;
  align-items: flex-end;
  pointer-events: auto;
}

.action-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(139, 105, 20, 0.5);
  background: rgba(42, 31, 26, 0.55);
  color: var(--gold);
  font-family: 'Courier Prime', monospace;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}

.action-btn:active {
  background: rgba(139, 105, 20, 0.5);
  transform: scale(0.92);
}

/* ── Fullscreen cursor hide ── */
:fullscreen #overlay-buttons {
  opacity: 1;
  transition: opacity 0.5s;
}

:fullscreen #overlay-buttons.idle {
  opacity: 0;
}

/* ── Prevent text selection ── */
::selection {
  background: transparent;
}
