/* Full-resolution Glyph Matrix screen cast */

html, body.gc-body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #ececf1;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  overflow: hidden;
}

.gc-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 2px;
  background: #000;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}

.gc-tile {
  position: relative;
  background: #050508;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.gc-tile.is-self {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.45);
}
.gc-tile.is-cast {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.45);
}
.gc-tile.is-rx {
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.4);
}
.gc-tile canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.gc-tile-label {
  position: absolute;
  left: 0.35rem;
  bottom: 0.3rem;
  font-size: clamp(0.55rem, 1.2vw, 0.8rem);
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-hud {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(12, 12, 16, 0.88);
  border: 1px solid rgba(42, 42, 54, 0.9);
  backdrop-filter: blur(10px);
  transition: opacity 0.2s, transform 0.2s;
}
.gc-hud.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.gc-look-label {
  margin-left: auto;
  font-size: 0.65rem;
  color: #a7f3d0;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-cam-panel {
  margin-top: 0.55rem;
  padding: 0.5rem 0.35rem 0.25rem;
  border-top: 1px solid rgba(42, 42, 54, 0.9);
  max-height: min(42vh, 320px);
  overflow-y: auto;
}
.gc-cam-panel .cam-panel-title {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}
.gc-cam-panel .cam-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.4rem;
}
.gc-cam-panel .cam-preset,
.gc-cam-panel .cam-toggle {
  font-size: 0.58rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #15151c;
  color: #ccc;
  cursor: pointer;
}
.gc-cam-panel .cam-preset.is-on,
.gc-cam-panel .cam-toggle.is-on {
  border-color: #34d399;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
}
.gc-cam-panel .cam-row {
  display: grid;
  grid-template-columns: 5.2rem 1fr 2.2rem;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.58rem;
  color: #9ca3af;
  margin: 0.2rem 0;
}
.gc-cam-panel .cam-row input[type="range"] {
  width: 100%;
}
.gc-cam-panel .cam-row em {
  font-style: normal;
  color: #e5e7eb;
  text-align: right;
  font-size: 0.55rem;
}
.gc-cam-panel .cam-toggles {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin: 0.35rem 0;
}
.gc-btn.is-on {
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}

.gc-hud-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
}
.gc-brand {
  font-size: 0.78rem;
  color: #7dd3fc;
  font-weight: 600;
}
.gc-meta {
  font-size: 0.68rem;
  color: #8b8b9a;
  margin-left: auto;
}
.gc-tools {
  margin-top: 0.45rem;
}
.gc-tools label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  color: #8b8b9a;
}
.gc-tools select {
  font: inherit;
  font-size: 0.68rem;
  color: #ececf1;
  background: #1a1a22;
  border: 1px solid #2a2a36;
  border-radius: 6px;
  padding: 0.2rem 0.35rem;
}
.gc-btn {
  appearance: none;
  font: inherit;
  font-size: 0.68rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #2a2a36;
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
  cursor: pointer;
}
.gc-btn.ghost {
  background: transparent;
  color: #8b8b9a;
}
.gc-btn:hover { border-color: rgba(125, 211, 252, 0.45); }
.gc-hint {
  margin: 0.45rem 0 0;
  font-size: 0.6rem;
  color: #5c5c6e;
  line-height: 1.4;
}
.gc-hint kbd {
  font: inherit;
  padding: 0.05rem 0.25rem;
  border: 1px solid #2a2a36;
  border-radius: 4px;
  color: #8b8b9a;
}

body.gc-body.is-waiting .gc-stage::after {
  content: "waiting for GrokGlyph · screen cast…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #5c5c6e;
  pointer-events: none;
}
