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

/* Configuración básica */
:root {
  --neon-green: #39ff14;
  --neon-red: #ff073a;
  --cabinet-bg: #1a1a24;
  --screen-bezel: #2d2d3a;
  --glow-color: rgba(57, 255, 20, 0.4);
}

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

body {
  background-color: #0b0b10;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(57, 255, 20, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 7, 58, 0.08) 0%, transparent 50%);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 20px;
}

/* Contenedor del Gabinete de Arcade */
.arcade-cabinet {
  background: var(--cabinet-bg);
  border: 8px solid #282836;
  border-radius: 30px;
  width: 900px;
  padding: 25px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    inset 0 0 40px rgba(0,0,0,0.6),
    0 0 30px rgba(57, 255, 20, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Marcos laterales de madera sintética */
.arcade-cabinet::before,
.arcade-cabinet::after {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 12px;
  border-radius: 6px;
  background: linear-gradient(to bottom, #d32f2f, #7b1fa2);
  box-shadow: 0 0 15px rgba(211, 47, 47, 0.5);
}
.arcade-cabinet::before { left: -10px; }
.arcade-cabinet::after { right: -10px; }


/* Área de la Pantalla CRT (Bezel) */
.screen-bezel {
  background: var(--screen-bezel);
  border-radius: 24px;
  padding: 20px;
  width: 100%;
  box-shadow: 
    inset 0 10px 30px rgba(0,0,0,0.9),
    0 4px 10px rgba(0,0,0,0.5);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenedor de la pantalla con efecto de tubo CRT curvado */
.screen-container {
  position: relative;
  width: 800px;
  height: 450px;
  background: #050508;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 35px rgba(0,0,0,0.95);
  border: 4px solid #1a1a24;
}

/* Filtro CRT: Curvatura radial simulada y brillo */
.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(circle, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9);
}

/* Filtro CRT: Scanlines */
.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Filtro CRT: Parpadeo de fósforo sutil */
.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  background: rgba(18, 16, 16, 0.05);
  opacity: 0.95;
  animation: crtFlicker 0.15s infinite;
}

/* Reflejo de Vidrio templado en diagonal */
.screen-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 20%, transparent 20%, transparent 100%);
}

/* Canvas del juego */
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Panel de Control (Bajos de la Cabina) */
.arcade-controls {
  width: 100%;
  background: #252535;
  border-top: 6px solid #1a1a24;
  border-radius: 0 0 20px 20px;
  padding: 20px;
  margin-top: 15px;
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Información del panel */
.control-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  color: #888;
}

.control-keys {
  font-size: 11px;
  color: #ccc;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.key-badge {
  background: #151520;
  border: 1px solid #444;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  color: #fff;
}

/* Botón SUSCRÍBETE Pulsante (Físico 3D de color blanco y flechas amarillas) */
.subscribe-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px; /* Espacio entre flechas y botón */
}

.subscribe-button-container::before {
  content: '>>>';
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #d4c326; /* Amarillo mostaza retro */
  text-shadow: 1.5px 1.5px 0 #000000;
  animation: arrowBounceLeft 0.6s infinite alternate;
}

.subscribe-button-container::after {
  content: '<<<';
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #d4c326;
  text-shadow: 1.5px 1.5px 0 #000000;
  animation: arrowBounceRight 0.6s infinite alternate;
}

.btn-subscribe {
  background: linear-gradient(to bottom, #ffffff 65%, #dcdcdc 100%);
  border: 4px solid #000000;
  border-radius: 30px;
  color: #000000;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  padding: 0 30px;
  height: 48px;
  cursor: pointer;
  box-shadow: 
    0 6px 0 #000000,
    0 12px 20px rgba(0, 0, 0, 0.3);
  text-shadow: none;
  transition: all 0.1s ease;
  animation: pulseButton 1.5s infinite alternate;
  outline: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 4px; /* Fix para la fuente Press Start 2P que tiene padding asimétrico */
}

.btn-subscribe:hover {
  background: linear-gradient(to bottom, #ffffff 40%, #e6e6e6 100%);
}

.btn-subscribe:active {
  transform: translateY(4px);
  box-shadow: 
    0 2px 0 #000000,
    0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes arrowBounceLeft {
  0% { transform: translateX(-4px); }
  100% { transform: translateX(4px); }
}

@keyframes arrowBounceRight {
  0% { transform: translateX(4px); }
  100% { transform: translateX(-4px); }
}
/* Botones de acción táctiles virtuales para móviles */
.mobile-controls {
  display: none; /* Se activa mediante CSS adaptativo si es táctil */
  gap: 20px;
  margin-top: 15px;
  width: 100%;
  justify-content: space-around;
  align-items: center;
}

.joystick-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

#joystickContainer {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  position: relative;
  touch-action: none;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

#joystickKnob {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  touch-action: none;
}

#joystickContainer:active #joystickKnob {
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

.mobile-action-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.mobile-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #333;
  border: 3px solid #555;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  box-shadow: 0 4px 0 #111;
  user-select: none;
  touch-action: none;
}

.mobile-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #111;
}

.mobile-btn.green {
  background: #39ff14;
  border-color: #2ecf10;
  color: black;
  box-shadow: 0 4px 0 #19700a;
}
.mobile-btn.red {
  background: #ff073a;
  border-color: #cf052e;
  color: white;
  box-shadow: 0 4px 0 #700319;
}
.mobile-btn.blue {
  background: #00d2ff;
  border-color: #00a8cc;
  color: black;
  box-shadow: 0 4px 0 #005c73;
}
/* Animaciones */
@keyframes crtFlicker {
  0% { opacity: 0.97; }
  50% { opacity: 1.00; }
  100% { opacity: 0.98; }
}


@keyframes pulseButton {
  0% {
    box-shadow: 
      0 6px 0 #000000,
      0 8px 15px rgba(0, 0, 0, 0.3);
  }
  100% {
    box-shadow: 
      0 6px 0 #000000,
      0 12px 25px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(255, 255, 255, 0.6);
  }
}

/* Modo Responsive */
@media (max-width: 950px) {
  .arcade-cabinet {
    width: 100%;
    padding: 15px;
    border-radius: 20px;
  }
  .screen-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .mobile-controls {
    display: flex;
  }
  .arcade-controls {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
}

/* Estilos de Branding Erick & Gonzalo en Pantalla */
.screen-branding {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  font-family: 'Press Start 2P', monospace;
  transform: rotate(-7deg); /* Inclinación global de la marca */
  transform-origin: left top;
  image-rendering: pixelated;
}

.branding-line1 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.branding-line2 {
  display: block;
  margin-top: -1px;
}

.brand-erick, .brand-gonzalo {
  color: #4cd91a; /* Verde brillante exacto */
  font-size: 15px; /* Tamaño adaptado para el bezel */
  letter-spacing: 0.5px;
  text-shadow: 2px 2.5px 0 #133803; /* Sombra profunda verde bosque retro */
  font-weight: 900;
}

.brand-ampersand {
  background: #d31d1d; /* Rojo exacto de la referencia */
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 5px;
  border: 2px solid #ffffff; /* Borde blanco fino retro */
  transform: rotate(-5deg); /* Inclinación extra del ampersand */
  box-shadow: 2.5px 2.5px 0 #000000; /* Sombra negra */
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
