/* Reset y contenedor a pantalla completa para Seismic Field */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #030303;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#glcanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

/* ==========================================================================
   CUADRO DE TEXTO CONSOLA RETRO MONOCROMÁTICA (ESQUINA SUPERIOR IZQUIERDA)
   ========================================================================== */
.gb-dialogue-box {
  position: fixed;
  top: 24px;
  left: 24px;
  right: auto;
  width: 390px;
  max-width: calc(100vw - 48px);
  z-index: 100;
  cursor: pointer;
  pointer-events: auto;
  font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.95));
  transition: transform 0.15s ease, filter 0.15s ease;
}

.gb-dialogue-box:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 1.0));
}

.gb-dialogue-box:active {
  transform: translateY(0px);
}

/* Marco exterior monocromático con doble borde pixelado en blanco */
.gb-outer-frame {
  background: #000000;
  padding: 3px;
  border: 2px solid #ffffff;
  box-shadow: 
    inset 1px 1px 0px #ffffff,
    inset -1px -1px 0px #444444,
    3px 3px 0px #000000;
}

/* Pantalla interior negra de alto contraste */
.gb-inner-screen {
  position: relative;
  background: #050505;
  border: 1px solid #222222;
  padding: 12px 14px 14px 14px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Encabezado / Título */
.gb-header-tag {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  padding-bottom: 3px;
}

/* Texto del cuerpo en blanco limpio */
.gb-body-text {
  font-size: 12px;
  line-height: 1.40;
  color: #ececec;
  white-space: pre-line;
  word-break: break-word;
  flex-grow: 1;
  font-weight: 500;
}

/* Flechita indicadora monocromática */
.gb-prompt-arrow {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 10px;
  color: #ffffff;
  opacity: 0;
}

.gb-prompt-arrow.gb-blink {
  animation: gbArrowBlink 0.8s infinite ease-in-out;
}

@keyframes gbArrowBlink {
  0%, 45% {
    opacity: 1;
    transform: translateY(0);
  }
  50%, 95% {
    opacity: 0;
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   DISPOSICIÓN RESPONSIVA: MOBILE EN LA PARTE INFERIOR
   ========================================================================== */
@media (max-width: 768px) {
  .gb-dialogue-box {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
  }

  .gb-inner-screen {
    min-height: 78px;
    padding: 10px 12px 12px 12px;
  }

  .gb-header-tag {
    font-size: 10px;
  }

  .gb-body-text {
    font-size: 11px;
    line-height: 1.35;
  }
}

/* ==========================================================================
   ESTILOS GUI DE DESARROLLO (LADO DERECHO)
   ========================================================================== */
.lil-gui {
  --background-color: rgba(15, 15, 18, 0.88);
  --text-color: #d0d0d8;
  --title-background-color: #1a1a24;
  --widget-color: #242432;
  --hover-color: #323244;
  --focus-color: #484860;
  --number-color: #79a6ff;
  --string-color: #a8d578;
  font-family: "SF Mono", "Fira Code", monospace !important;
  font-size: 11px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 4px;
  z-index: 9999 !important;
  right: 15px !important;
  left: auto !important;
  top: 15px !important;
}

.lil-gui .title {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 10px;
}
