/* Quake 3 portal — a same-origin iframe around the QuakeJS client (ops/quake).
   The view neutralises #view's .container centering through the host class so
   the frame can fill the scene; the rest styles the launch gate, the in-game
   toolbar and the pointer-lock hint. Colours follow the console tokens
   (#08060f ground, #cbb8ff/#8a7fae text) with the Quake accent #f97316. */

#view.quake-host,
#scene.shell-scene #view.quake-host {
  position: relative;
  height: 100%;
  min-height: 480px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.quake-portal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #08060f;
  border-radius: 14px;
}

.quake-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #08060f;
}

.quake-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(249, 115, 22, .16), rgba(8, 6, 15, .97));
}

.quake-gate-title {
  font: 800 30px/1.1 Unbounded, system-ui, sans-serif;
  letter-spacing: .5px;
}

.quake-gate-sub {
  color: #cbb8ff;
  max-width: 440px;
}

.quake-gate-note {
  color: #8a7fae;
  font-size: 12px;
  max-width: 480px;
  line-height: 1.4;
}

.quake-bar {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.quake-bar > div {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.quake-admin {
  position: absolute;
  left: 50%;
  top: 52px;
  z-index: 3;
  display: flex;
  width: min(520px, calc(100% - 20px));
  gap: 6px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 215, 106, .32);
  border-radius: 8px;
  background: rgba(8, 6, 15, .84);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
  pointer-events: auto;
}

.quake-admin[hidden] {
  display: none;
}

.quake-admin-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(203, 184, 255, .28);
  border-radius: 6px;
  background: rgba(17, 12, 30, .92);
  color: #f8f4ff;
  font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
}

.quake-admin-input:focus {
  border-color: rgba(255, 215, 106, .72);
  box-shadow: 0 0 0 2px rgba(255, 215, 106, .16);
}

.quake-admin-send {
  width: 42px;
  min-width: 42px;
  height: 34px;
  padding: 0;
}

.quake-hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: #cbb8ff;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 1px 4px #000;
  z-index: 2;
}

@media (max-width: 520px) {
  .quake-admin {
    top: 50px;
  }

  .quake-admin-input {
    height: 32px;
    font-size: 12px;
  }

  .quake-admin-send {
    height: 32px;
  }
}

/* Quake and CS are full game routes too. The shell removes its rail/context
   chrome below 500px of landscape height; release the desktop 480px scene
   floor with it or the iframe is cropped inside the now-short game window. */
@media (orientation: landscape) and (max-height: 500px) {
  #view.quake-host,
  #scene.shell-scene #view.quake-host {
    min-height: 0;
  }
}
