/* Copyright 2026 massivehadron.com ltd. */

.app-view.ge-app {
  position: relative;
  display: grid;
  place-items: center;
  container-type: size;
  overflow: hidden;
  background: #0c121d;
  color: #f2f7ff;
  touch-action: none;
}

.ge-app[hidden], .ge-stage [hidden] { display: none; }

.ge-stage {
  position: relative;
  width: min(100cqw, 177.7778cqh);
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  overflow: hidden;
  background: #03427b;
  touch-action: none;
  user-select: none;
}

.ge-world, .ge-hud, .ge-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.ge-world, .ge-hud, .ge-layer { pointer-events: none; }
.ge-layer .ge-layer { position: absolute; inset: 0; }
.ge-stage .ge-icon, .ge-stage .ge-plate, .ge-stage .ge-steering, .ge-stage .ge-pedal {
  position: absolute;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.ge-stage .ge-plate, .ge-stage .ge-plate:hover:not(:disabled) {
  background: var(--ge-button) center / 100% 100% no-repeat transparent;
}
.ge-stage .ge-icon, .ge-stage .ge-icon:hover:not(:disabled) {
  display: grid;
  place-items: center;
  background: transparent;
}
@media (hover: hover) {
  .ge-stage :is(.ge-plate, .ge-icon):hover:not(:disabled) {
    filter: brightness(1.15) drop-shadow(0 0 2px #a6dbff80);
  }
}
.ge-stage :is(.ge-plate, .ge-icon):focus-visible:not(:disabled) {
  outline: 2px solid transparent;
  outline-offset: -3px;
  filter: brightness(1.15) drop-shadow(0 0 3px #a6dbff);
}
.ge-stage :is(.ge-plate, .ge-icon):active:not(:disabled) { filter: brightness(.78) saturate(1.25); }
.ge-stage .ge-plate:disabled { opacity: .55; }
.ge-caption-face { position: absolute; inset: 0 12% 23.0769% 8%; display: grid; place-items: center; }
.ge-caption { display: block; font: italic bold 100% Verdana, sans-serif; white-space: nowrap; }
.ge-sprite { position: absolute; display: block; pointer-events: none; }
.ge-icon .ge-sprite { position: relative; width: 70%; max-height: 70%; }
.ge-apple-face {
  /* Match the button face above the plate artwork's shadow. */
  position: relative;
  width: 76.923%;
  height: 76.923%;
  align-self: start;
  justify-self: center;
}
.ge-apple-mark {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ge-label {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0 3%;
  font-family: Arial, sans-serif;
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  white-space: pre-line;
}
.ge-bold { font-weight: 700; }
.ge-glass, .ge-status { background: rgba(6, 12, 22, .83); }
.ge-pause, .ge-overlay { pointer-events: auto; background: rgba(4, 7, 12, .40); }
.ge-overlay { background: rgba(6, 12, 22, .78); }
.ge-card { position: absolute; background: #0c121d; }
.ge-card .ge-label { color: #c4d3e8; }
.ge-status { position: absolute; z-index: 1; display: grid; place-content: center; gap: .4em; text-align: center; padding: .6em; }
.ge-boot { inset: 32% 15%; }
.ge-status p { margin: 0; }

.ge-steering .ge-sprite {
  left: calc(39% + var(--steer, 0) * 30%);
  top: 10%;
  width: 22%;
  height: 67%;
  opacity: .5;
}
.ge-steering.ge-held .ge-sprite { opacity: .8; }
.ge-pedal .ge-sprite { inset: 0; opacity: .5; }
.ge-pedal[aria-label="Boost"] .ge-sprite { opacity: .25; }
.ge-pedal.ge-charged[aria-label="Boost"] .ge-sprite { opacity: .75; }
.ge-pedal.ge-held .ge-sprite { opacity: 1; }

.ge-title-clip { position: absolute; inset: 0; pointer-events: none; }
.ge-title-sash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  animation-duration: 6s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
/* The gloss stays a square. The animated box is the whole word, so the travel is a fraction of that word. */
.ge-title-sash::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  aspect-ratio: 1;
  background: url("./art/ground-effect-flash.png") center / 100% 100% no-repeat;
}
/* One gloss travels the full title. Each word keeps the piece that crosses it.
   iPhone Safari drops a left animation once the keyframes stop changing and parks the gloss on the letters. */
.ge-title-sash-ground { animation-name: ge-title-sash-ground; }
.ge-title-sash-effect { animation-name: ge-title-sash-effect; }
@keyframes ge-title-sash-ground {
  0% { transform: translate3d(-17.9918%, 0, 0); opacity: 1; }
  11.111% { transform: translate3d(190.3766%, 0, 0); opacity: 1; }
  11.2% { opacity: 0; }
  100% { transform: translate3d(191.3766%, 0, 0); opacity: 0; }
}
@keyframes ge-title-sash-effect {
  0% { transform: translate3d(-131.6281%, 0, 0); opacity: 1; }
  11.111% { transform: translate3d(100%, 0, 0); opacity: 1; }
  11.2% { opacity: 0; }
  100% { transform: translate3d(101%, 0, 0); opacity: 0; }
}
