/* Ramon the Gamer — Layout & Pixel-Scaling
   Intern 480x270, ganzzahlig hochskaliert -> scharfe Pixel (kein Blur). */

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

html, body {
  width: 100%; height: 100%;
  background: #0a0910;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  color: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1a1730 0%, #0a0910 70%);
}

#game {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  background: #000;
  box-shadow: 0 0 0 2px #000, 0 10px 40px rgba(0,0,0,0.6);
}

#hint {
  position: fixed; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  font-size: 13px; color: #cfc8ff;
  background: rgba(10,9,16,0.75);
  padding: 6px 14px; border-radius: 20px;
  letter-spacing: .3px; pointer-events: none;
  transition: opacity .4s;
}
#hint.gone { opacity: 0; }

/* --- Touch-Steuerung (Joystick + Buttons) --- */
#touch { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#touch.hidden { display: none; }

/* Analog-Joystick unten links */
#touch .stick {
  position: absolute; left: max(20px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom));
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(40,36,60,0.5); border: 2px solid rgba(180,170,255,0.35);
  pointer-events: auto; touch-action: none;
}
#touch .knob {
  position: absolute; left: 40px; top: 40px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(150,140,220,0.85); border: 2px solid rgba(220,215,255,0.7);
  pointer-events: none;
}

/* Aktionsbuttons unten rechts */
#touch .btns {
  position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  display: flex; gap: 12px; align-items: flex-end;
}
#touch button {
  pointer-events: auto; touch-action: none;
  background: rgba(60,55,90,0.75);
  border: 2px solid rgba(180,170,255,0.5);
  color: #fff; border-radius: 16px; font-weight: 700;
  width: 64px; height: 64px; font-size: 15px;
}
#touch button.mid { width: 60px; height: 60px; font-size: 14px; }
#touch button.big { width: 92px; height: 74px; font-size: 18px; }
#touch button:active { background: rgba(120,110,200,0.95); }
#touch .pausebtn {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  width: 44px; height: 40px; font-size: 18px; border-radius: 12px;
}

/* Querformat-Hinweis (nur Hochformat, Touch) */
#rotate {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: #0a0910; color: #cfc8ff; text-align: center;
  font-size: 20px; line-height: 1.7;
}
#rotate.hidden { display: none; }
#rotate .rotinner { font-size: 40px; }
#rotate .rotinner br + * {}
