:root {
  --warm-white: #FFF8E7;
  --warm-brown: #5D4037;
  --warm-orange: #FF8A65;
  --warm-gold: #FFD54F;
  --warm-teal: #4DB6AC;
  --soft-shadow: rgba(93, 64, 55, 0.3);
  --font-title: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

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

body {
  background: #1a1a2e;
  overflow: hidden;
  font-family: var(--font-body);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#ui-layer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 8px;
  padding: 12px;
}

#ui-layer button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 248, 231, 0.4);
  background: rgba(93, 64, 55, 0.6);
  color: var(--warm-white);
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ui-layer button:hover {
  background: rgba(93, 64, 55, 0.85);
  transform: scale(1.1);
}

#mobile-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: none;
  pointer-events: none;
  padding: 20px;
  justify-content: space-between;
  align-items: flex-end;
}

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

#joystick-zone {
  width: 140px;
  height: 140px;
  pointer-events: auto;
  position: relative;
}

#joystick-base {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(93, 64, 55, 0.4);
  border: 3px solid rgba(255, 248, 231, 0.3);
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#joystick-stick {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 213, 79, 0.6);
  border: 2px solid rgba(255, 248, 231, 0.5);
  transition: none;
  pointer-events: none;
}

.mobile-action {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid rgba(255, 248, 231, 0.4);
  background: rgba(93, 64, 55, 0.5);
  color: var(--warm-white);
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#cancel-btn {
  width: 56px;
  height: 56px;
  font-size: 22px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  #ui-layer button {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}
