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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a0a2e;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: 'Georgia', 'Times New Roman', serif;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

#fullscreen-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 8px;
  background: rgba(26, 10, 46, 0.6);
  color: #ffd700;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#fullscreen-btn:hover, #fullscreen-btn:active {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
}

#mobile-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: none;
  justify-content: space-between;
  padding: 16px 20px 24px;
  pointer-events: none;
}

#mobile-controls.visible {
  display: flex;
}

#dpad {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  pointer-events: auto;
}

#action-buttons {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  pointer-events: auto;
}

.dpad-btn, .action-btn {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  background: rgba(26, 10, 46, 0.5);
  color: #ffd700;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: none;
}

.dpad-btn:active, .action-btn:active {
  background: rgba(255, 215, 0, 0.25);
}

.accent-btn {
  border-color: rgba(255, 107, 53, 0.6);
  color: #ff6b35;
}

#btn-jump { margin-bottom: 8px; }

/* Responsive adjustments */
@media (min-width: 768px) {
  .dpad-btn, .action-btn {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
  #mobile-controls { padding: 20px 32px 28px; }
}

/* Hide cursor when fullscreen and idle */
body.hide-cursor canvas {
  cursor: none;
}
