/* ==========================================================================
   NES SMART CONSOLE // RETRO BEZEL CHASSIS & HYBRID BALANCED FILTER
   Optimized to be flush (al ras del marco) with maximum visible screen
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Silkscreen:wght@400;700&family=VT323&family=Space+Grotesk:wght@400;600&display=swap');

:root {
  /* Paleta NES / Famicom Original */
  --nes-red: #d82800;
  --nes-dark-red: #881400;
  --nes-gold: #f8b800;
  --nes-grey: #a4a4a4;
  --nes-dark-grey: #202020;
  --nes-bg-dark: #0a0b0e;
  --nes-screen-bg: #000000;
  --nes-border: #333a42;
  --nes-accent: #00e5ff;
  --nes-green: #00e676;
  --nes-warning: #ff9100;

  /* Chasis Game Boy (Battleship Palette) */
  --gb-bezel: #68696e;
  --gb-bezel-inner: #3a3b3e;
  --gb-stripe-red: #ba1333;
  --gb-stripe-blue: #003399;
  --gb-brand-blue: #1e3a8a;

  /* Jev AI Theme */
  --jev-brand: #7c3aed;
  --jev-glow: rgba(124, 58, 237, 0.4);
  --jev-text: #f3e8ff;

  /* Tipografías */
  --font-pixel: 'Press Start 2P', monospace;
  --font-screen: 'Silkscreen', monospace;
  --font-terminal: 'VT323', monospace;
  --font-ui: 'Space Grotesk', -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--nes-bg-dark);
  color: #fff;
  font-family: var(--font-pixel);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   VIEWPORT PRINCIPAL: FULLSCREEN SIN MÁRGENES ESTORBOSOS
   ========================================================================== */
#console-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #151821 0%, #07080a 100%);
  overflow: hidden;
}

/* Pantalla del emulador */
#screen-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 42px 10px 10px 10px;
}

/* Desplazamiento inteligente hacia la izquierda cuando el panel de Jev está abierto */
#console-viewport.drawer-open #screen-wrapper {
  transform: translateX(-190px);
}

/* ==========================================================================
   CHASIS TELEVISOR CRT RETRO (AL RAS DEL TUBO DE IMAGEN - PROPORCIÓN 4:3)
   ========================================================================== */
:root {
  --tv-height: min(88vh, calc(100vh - 72px));
}

#crt-tv-chassis {
  height: var(--tv-height);
  width: calc((var(--tv-height) - 46px) * (4 / 3) + 28px);
  max-width: calc(100vw - 40px);
  background: linear-gradient(165deg, #2c2f37 0%, #1c1e24 45%, #131418 100%);
  border: 3px solid #3d414e;
  border-radius: 22px 22px 16px 16px;
  padding: 10px 14px 8px 14px;
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.22),
    inset 0 -3px 6px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
  box-sizing: border-box;
}

/* Tubo de cristal CRT que abraza el juego al ras con curvatura analógica */
#crt-tube-bezel {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
  border-radius: 18px; /* Curvatura característica de las esquinas del tubo CRT */
  border: 4px solid #101114;
  box-shadow: 
    0 0 0 2px #262830,
    inset 0 0 26px rgba(0, 0, 0, 0.95),
    inset 0 0 8px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reflejo / Brillo especular del cristal curvado de la TV */
.crt-glass-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 6;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 24%,
    transparent 52%
  );
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.12),
    inset 0 -4px 14px rgba(0, 0, 0, 0.85);
}

/* Borde inferior del chasis de la TV */
.tv-bottom-lip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px 2px 6px;
  margin-top: 6px;
  flex-shrink: 0;
  height: 24px;
}

.tv-power-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tv-power-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3333;
  box-shadow: 0 0 8px #ff2222, 0 0 2px #ffffff;
  display: inline-block;
  animation: ledPulse 4s infinite ease-in-out;
}

@keyframes ledPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; box-shadow: 0 0 10px #ff2222, 0 0 3px #ffffff; }
}

.tv-brand-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #8b92a0;
  letter-spacing: 1.5px;
}

.tv-badges {
  display: flex;
  gap: 8px;
}

.tv-feature-text {
  font-family: var(--font-screen);
  font-size: 8px;
  color: #64748b;
  letter-spacing: 1px;
  border: 1px solid #2e323b;
  padding: 1px 6px;
  border-radius: 2px;
  background: #14161a;
}

/* El lienzo aprovecha el 100% del contenedor al ras del marco */
#nes-canvas,
#nostalgist-canvas,
.crt-game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  background-color: var(--nes-screen-bg);
  object-fit: fill !important;
  border-radius: 14px;
  
  /* --- FILTRO MEDIO (PUNTO MEDIO ENTRE CRT Y CRUDO) --- */
  image-rendering: auto; /* Suaviza cortes secos de pixeles tipo bloques duros */
  filter: contrast(1.08) brightness(1.03) saturate(1.18);
  transition: filter 0.3s ease, image-rendering 0.3s ease;
}

#nes-canvas.hidden,
#nostalgist-canvas.hidden,
canvas.hidden {
  display: none !important;
}

/* Modo Crudo (100% Pixelado) */
body.filter-raw #nes-canvas,
body.filter-raw #nostalgist-canvas,
body.filter-raw .crt-game-canvas {
  image-rendering: pixelated !important;
  image-rendering: crisp-edges !important;
  filter: none !important;
}

/* Modo CRT Clásico Fuerte */
body.filter-heavy-crt #nes-canvas,
body.filter-heavy-crt #nostalgist-canvas,
body.filter-heavy-crt .crt-game-canvas {
  image-rendering: auto !important;
  filter: contrast(1.14) brightness(1.05) saturate(1.25) drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}

/* Retro CRT Loader */
.crt-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(circle at center, #0a0e17 0%, #030408 100%);
  z-index: 5;
  border-radius: 14px;
}

.crt-loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: crtSpin 0.8s linear infinite;
}

@keyframes crtSpin {
  to { transform: rotate(360deg); }
}

.crt-loader-text {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  letter-spacing: 1.5px;
  text-align: center;
  padding: 0 20px;
  animation: crtTextPulse 1.5s ease-in-out infinite;
}

@keyframes crtTextPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(16, 185, 129, 1); }
}

/* ==========================================================================
   OVERLAY DE SCANLINES CRT (EQUILIBRADO)
   ========================================================================== */
.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
  border-radius: 14px;
}

/* Modo Balanceado (Punto Medio sutil y limpio) */
.crt-overlay.mode-balanced {
  opacity: 0.22;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.28) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 3px, 3px 100%;
}

/* Modo Pesado */
.crt-overlay.mode-heavy {
  opacity: 0.85;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.45) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05)),
    radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, 0.5) 100%);
  background-size: 100% 4px, 3px 100%, 100% 100%;
}

/* Modo Desactivado */
.crt-overlay.disabled {
  display: none;
}

/* ==========================================================================
   TOP BAR HUD FLOTANTE (ULTRA SLIM & COMPACTO)
   ========================================================================== */
#top-hud {
  position: absolute;
  top: 6px;
  left: 12px;
  right: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  z-index: 20;
  transition: transform 0.3s ease, opacity 0.3s ease, right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#console-viewport.drawer-open #top-hud {
  right: 380px;
}

#top-hud.autohide {
  transform: translateY(-90%);
  opacity: 0.3;
}

#top-hud.autohide:hover {
  transform: translateY(0);
  opacity: 1;
}

.hud-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo */
.console-logo {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--nes-gold);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.console-logo .badge-famicom {
  background: var(--nes-red);
  color: #fff;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 8px;
}

/* Selector de Juegos */
.game-selector select {
  background: #11141a;
  border: 1px solid var(--nes-border);
  color: #e2e8f0;
  font-family: var(--font-screen);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  max-width: 250px;
}

.game-selector select:hover {
  border-color: var(--nes-accent);
}

/* Badges de Estado */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 9px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.2s;
}

.status-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}

.status-dot.active {
  background: var(--nes-green);
  box-shadow: 0 0 8px var(--nes-green);
}

.status-dot.jev-active {
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

/* Controles de Consola */
.hud-btn {
  background: #1e232d;
  border: 1px solid var(--nes-border);
  color: #cbd5e1;
  font-family: var(--font-screen);
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.hud-btn:hover {
  background: #2d3748;
  color: #fff;
  border-color: var(--nes-accent);
}

.hud-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
}

#btn-silhouettes.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

#btn-palette.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  color: #a5f3fc;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

#btn-layers.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   DRAWER LATERAL: JEV AI CO-PILOT & TELEMETRÍA (COLAPSABLE)
   ========================================================================== */
#jev-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: rgba(14, 16, 22, 0.95);
  backdrop-filter: blur(15px);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 30;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

#jev-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--nes-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #12151d;
}

.drawer-title {
  font-size: 11px;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}

.drawer-close:hover {
  color: #fff;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tarjetas de Telemetría */
.telemetry-card {
  background: #181c25;
  border: 1px solid #2b323f;
  border-radius: 6px;
  padding: 12px;
}

.telemetry-card-title {
  font-family: var(--font-screen);
  font-size: 9px;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-box {
  background: #11141b;
  padding: 8px;
  border-radius: 4px;
  border-left: 2px solid var(--nes-accent);
}

.metric-label {
  font-family: var(--font-ui);
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
}

.metric-value {
  font-family: var(--font-terminal);
  font-size: 18px;
  color: #f8fafc;
  margin-top: 2px;
}

/* Consola Táctica de Jev */
.tactical-log {
  background: #0d0f14;
  border: 1px solid #232935;
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-terminal);
  font-size: 14px;
  color: #a7f3d0;
  height: 180px;
  overflow-y: auto;
  line-height: 1.4;
}

.tactical-entry {
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.tactical-time {
  color: #64748b;
  font-size: 12px;
}

.tactical-action {
  color: var(--nes-gold);
  font-weight: bold;
}

/* Configuración de API Key */
.config-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-group label {
  font-family: var(--font-screen);
  font-size: 8px;
  color: #94a3b8;
}

.config-group input {
  background: #0f1218;
  border: 1px solid #333a46;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
}

.config-group input:focus {
  border-color: #a855f7;
}

/* ==========================================================================
   HUD FLOTANTE INFERIOR: ESTADO DEL MANDO XBOX
   ========================================================================== */
#bottom-hud {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 16px;
  z-index: 20;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#console-viewport.drawer-open #bottom-hud {
  transform: translateX(calc(-50% - 190px));
}

.xbox-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 10px;
  color: #e2e8f0;
}

.xbox-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #107c10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: #fff;
}

.gamepad-buttons {
  display: flex;
  gap: 4px;
}

.gp-key {
  display: inline-block;
  padding: 2px 5px;
  background: #252b36;
  border-radius: 3px;
  font-size: 8px;
  color: #94a3b8;
}

.gp-key.pressed {
  background: var(--nes-gold);
  color: #000;
  font-weight: bold;
}

/* ==========================================================================
   MANDO TÁCTIL VIRTUAL PARA MÓVILES Y TABLETS (RETRO ON-SCREEN GAMEPAD)
   ========================================================================== */
.touch-controller {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 15px 20px 20px 20px;
  pointer-events: none;
  z-index: 60;
  touch-action: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.touch-controller.active {
  display: flex !important;
}

.v-btn {
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  transition: transform 0.05s ease, background-color 0.05s ease, filter 0.05s ease;
}

/* --- CRUCETA D-PAD VIRTUAL --- */
.virtual-dpad {
  position: relative;
  width: 130px;
  height: 130px;
  background: rgba(18, 20, 26, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.1);
}

.dpad-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: #12141a;
  border-radius: 6px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}

.dpad-btn {
  position: absolute;
  background: #232733;
  color: #94a3b8;
  font-size: 14px;
  box-shadow: 0 3px 0 #12141a;
}

.dpad-up {
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 42px;
  border-radius: 8px 8px 0 0;
}

.dpad-down {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 42px;
  border-radius: 0 0 8px 8px;
}

.dpad-left {
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 40px;
  border-radius: 8px 0 0 8px;
}

.dpad-right {
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 40px;
  border-radius: 0 8px 8px 0;
}

.dpad-btn:active, .dpad-btn.v-pressed {
  background: var(--nes-gold) !important;
  color: #000 !important;
  transform: scale(0.94);
  box-shadow: 0 0 12px var(--nes-gold) !important;
}

/* --- BOTONES CENTRALES SELECT & START --- */
.virtual-meta-btns {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  background: rgba(18, 20, 26, 0.7);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v-pill-btn {
  background: #2b303c;
  color: #cbd5e1;
  font-size: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 0 #151821;
}

.v-pill-btn:active, .v-pill-btn.v-pressed {
  background: #e2e8f0 !important;
  color: #000 !important;
  transform: scale(0.92);
}

/* --- BOTONES DE ACCIÓN (B, A, Y, X) --- */
.virtual-action-btns {
  position: relative;
  width: 140px;
  height: 140px;
  background: rgba(18, 20, 26, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.v-round-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.6);
}

.btn-b {
  bottom: 12px;
  left: 20px;
  background: #dc2626; /* Rojo NES */
}

.btn-a {
  bottom: 30px;
  right: 8px;
  background: #d82800; /* Carmín */
}

.btn-y {
  top: 30px;
  left: 8px;
  background: #2563eb; /* Azul */
}

.btn-x {
  top: 12px;
  right: 20px;
  background: #ca8a04; /* Amarillo */
}

.v-round-btn:active, .v-round-btn.v-pressed {
  filter: brightness(1.4);
  transform: scale(0.90);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
}

/* ==========================================================================
   ADAPTACIONES RESPONSIVAS PARA PANTALLAS MÓVILES (SMARTPHONES)
   ========================================================================== */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  #top-hud {
    padding: 4px 8px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .hud-btn {
    font-size: 8px;
    padding: 3px 6px;
  }

  #bottom-hud {
    display: none !important;
  }

  #screen-wrapper {
    padding-top: 55px;
    padding-bottom: 140px;
  }

  #crt-tv-chassis {
    max-width: 96vw;
    max-height: 50vh;
  }

  .touch-controller {
    display: flex !important;
  }
}
