/* =========================================================================
   5. VISTA JUEGO: PANTALLA IZQUIERDA (60%) + PANTALLA DERECHA (40%)
   ========================================================================= */
#view-game {
  position: relative;
  padding: 10px;
  background: var(--slate-lo);
}

.dual-screen-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 60% minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

/* ----- PANTALLA IZQUIERDA (60%) ----- */
.screen-left {
  background: var(--slate);
  border: 4px solid var(--ink);
  box-shadow: inset 3px 3px 0 var(--slate-hi), inset -3px -3px 0 var(--slate-lo);
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.left-hud {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 8px;
  align-items: stretch;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.hud-menu-btn {
  padding: 0 10px;
  font-size: 9px;
}

.hud-stat-box {
  background: var(--navy-deep);
  border: 3px solid var(--ink);
  box-shadow: inset 2px 2px 0 #1f294a;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.hud-stat-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-muted);
}

.hud-stat-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.hud-stat-val {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--cream);
}

.hud-sub-cash {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink-muted);
}
.hud-sub-cash strong { color: var(--gold-hi); font-weight: normal; }

.hud-pnl-val {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--cyan);
  text-shadow: 2px 2px 0 #07283b;
}
.hud-pnl-val.neg {
  color: var(--red-hi);
}

.hud-timer-box {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 126px;
}
.hud-timer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 13px;
}
.hud-timer-box.warn .hud-timer-top { color: var(--gold-lo); }
.hud-timer-box.danger { animation: dangerBlink 0.5s steps(2) infinite; }
.hud-timer-box.danger .hud-timer-top { color: var(--red); }

@keyframes dangerBlink {
  0%, 100% { background: var(--cream); }
  50% { background: #ffd6d9; }
}

.timer-segments {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 2px;
  background: var(--ink);
  padding: 2px;
}
.timer-seg { height: 7px; background: var(--green); }
.timer-seg.warn { background: var(--gold); }
.timer-seg.danger { background: var(--red); }
.timer-seg.off { background: #2d3352; }

/* Pildora metalica flotante mordiendo el borde superior del grafico */

.crt-ticker {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--ink);
}
.crt-minmax {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #242b42;
}
.crt-minmax strong { color: var(--ink); }

.crt-price {
  font-family: var(--font-pixel);
  font-size: 17px;
  color: #ffffff;
}

.crt-delta {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 3px 6px;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.crt-delta canvas { width: 12px; height: 12px; }
.crt-delta.up   { background: var(--green); color: #ffffff; }
.crt-delta.down { background: var(--red);   color: #ffffff; }
.crt-delta.flat { background: var(--slate); color: #ffffff; }

/* Pantalla hundida azul oscuro para el grafico */
.crt-screen-wrap {
  flex: 1;
  min-height: 0;
  background: var(--navy-deep);
  border: 4px solid var(--ink);
  box-shadow:
    inset 4px 4px 0 #050812,
    inset -4px -4px 0 #1f2b4d;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
}

.crt-screen-wrap.shake {
  animation: pixelShake 0.28s steps(4);
}
@keyframes pixelShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(4px, -2px); }
  75% { transform: translate(-2px, -2px); }
}

#chart-canvas { display: block; }

.popup-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.float-popup {
  position: absolute;
  font-family: var(--font-pixel);
  font-size: 12px;
  text-shadow: 2px 2px 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink);
  white-space: nowrap;
  animation: floatUpPixel 0.95s steps(8) forwards;
}
@keyframes floatUpPixel {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  75%  { opacity: 1; transform: translate(-50%, -40px); }
  100% { opacity: 0; transform: translate(-50%, -52px); }
}

/* Fila de 7 Analistas Mii Pixel Art con portatiles y bocadillos de pistas */
.analysts-floor {
  margin-top: 6px;
  background: var(--navy-deep);
  border: 3px solid var(--ink);
  box-shadow: inset 2px 2px 0 #050812;
  height: 110px;
  padding: 28px 6px 2px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  position: relative;
}

.analyst-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.analyst-name {
  font-family: var(--font-pixel);
  font-size: 6px;
  color: var(--cream);
  line-height: 1;
}

/* Bocadillo pixelado con borde dentado azul o rojo (dentro de .analysts-floor) */

@keyframes hintPop {
  from { transform: translateX(-50%) scale(0.8); }
  to   { transform: translateX(-50%) scale(1); }
}

/* ----- PANTALLA DERECHA (40%) ----- */
.screen-right {
  background: var(--slate);
  border: 4px solid var(--ink);
  box-shadow: inset 3px 3px 0 var(--slate-hi), inset -3px -3px 0 var(--slate-lo);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* Modulo MI DESPACHO */

.frog-mood-tag {
  font-size: 8px;
  padding: 2px 6px;
  border: 2px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
}
.frog-mood-tag.bull { background: var(--green-hi); }
.frog-mood-tag.bear { background: var(--red-hi); }
.frog-mood-tag.gold { background: var(--gold-hi); }

.share-slots {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  background: var(--navy-deep);
  border: 2px solid var(--ink);
  padding: 3px;
}

.share-slot {
  height: 12px;
  background: #242c4a;
  border: 1px solid var(--ink);
}
.share-slot.filled {
  background: var(--gold);
  box-shadow: inset 1px 1px 0 var(--gold-hi);
}
.share-slot.short {
  background: var(--blue);
  box-shadow: inset 1px 1px 0 var(--blue-hi);
}

/* Botonera Arcade 3D */

/* Mini-ranking en vivo */

/* Barra de noticias deslizante */

.lev-badge {
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0 4px;
  font-family: var(--font-pixel);
  font-size: 8px;
  margin-left: auto;
}

.company-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.comp-tab-btn {
  flex: 1;
  height: 26px;
  font-size: 8px;
  padding: 0 6px;
  justify-content: space-between;
}

@keyframes swanBlink {
  0%, 100% { background: #4d0e1a; border-color: var(--gold-hi); }
  50%      { background: #7a1226; border-color: var(--red-hi); }
}

.news-tag {
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 4px 5px;
  border: 2px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  flex-shrink: 0;
}
.news-tag.bull { background: var(--green-hi); }
.news-tag.bear { background: var(--red-hi); }

@keyframes tickerSlide {
  0%   { transform: translateX(20%); }
  100% { transform: translateX(-100%); }
}

.news-advisor-name {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--gold-hi);
}

.news-text {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--cream);
}

