/* Giana Sisters -- 1987 in der Tasche */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

#wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#screen {
  background: #000;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Touch-Kontrollen: vier Knöpfe in einer Reihe auf Daumenhöhe.
   Links laufen, rechts schießen und springen, alle auf einer Linie. */
#controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.pad {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.ctl {
  pointer-events: auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
  line-height: 1;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.ctl.on {
  background: rgba(255, 255, 255, 0.30);
}

#btn-jump {
  width: 88px;
  height: 88px;
  font-size: 32px;
}

.ctl-action {
  font-size: 24px;
}

/* Querformat am Telefon: das Spielfeld nimmt die ganze Hoehe,
   die Knoepfe sitzen links und rechts im schwarzen Rand. */
@media (orientation: landscape) and (max-height: 540px) {
  #controls {
    top: 0;
    align-items: center;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }

  .pad {
    gap: 10px;
  }

  .ctl {
    width: 60px;
    height: 72px;
  }

  #btn-jump {
    width: 80px;
    height: 80px;
  }

}
