* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Mejorar respuesta táctil en móviles */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

html {
  height: 100%;
  height: -webkit-fill-available;
}

:root {
  --ink: #11121f;
  --panel: #20284a;
  --panel-edge: #64ffda;
  --text: #f4fbff;
  --muted: #9bf0ff;
  --accent: #ff417d;
  --grid: rgba(100, 255, 218, 0.18);
}

body {
  font-family: "Press Start 2P", monospace;
  background: linear-gradient(180deg, #05070f 0%, #11121f 70%, #06070d 100%);
  color: var(--text);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  letter-spacing: 0.08em;
  overflow-x: hidden;
  position: relative;

  /* Custom Default Cursor (Hand) */
  cursor: url("../assets/cursor/Arrow.png?v=2"), auto;
}

/* Custom Pointer Cursor (Hand Pointer) */
a,
button,
input,
select,
textarea,
[role="button"],
.pointer {
  cursor: url("../assets/cursor/Hand_pointer.png"), pointer !important;
}

/* Game Screen Cursor (Crosshair) */
.cabinet-screen {
  cursor: url("../assets/cursor/Arrow.png?v=2"), auto !important;
}

/* Fondo arcade mejorado con cuadrícula más visible */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(100, 255, 218, 0.12) 25%,
      rgba(100, 255, 218, 0.12) 26%,
      transparent 27%,
      transparent 74%,
      rgba(100, 255, 218, 0.12) 75%,
      rgba(100, 255, 218, 0.12) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(100, 255, 218, 0.12) 25%,
      rgba(100, 255, 218, 0.12) 26%,
      transparent 27%,
      transparent 74%,
      rgba(100, 255, 218, 0.12) 75%,
      rgba(100, 255, 218, 0.12) 76%,
      transparent 77%,
      transparent
    );
  background-size: 60px 60px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 1;
}

/* Líneas adicionales para efecto más cyberpunk */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      0deg,
      transparent 23%,
      rgba(100, 255, 218, 0.05) 24%,
      transparent 25%
    ),
    linear-gradient(
      90deg,
      transparent 23%,
      rgba(100, 255, 218, 0.05) 24%,
      transparent 25%
    );
  background-size: 20px 20px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 2;
}

.cabinet {
  width: 840px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  background: var(--ink);
  border: 5px solid var(--panel-edge);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 10;
}

.cabinet-header,
.cabinet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.cabinet-title {
  color: var(--text);
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
}

.cabinet-stat,
.cabinet-stage {
  padding: 6px 10px;
  border: 2px solid var(--panel-edge);
  background: var(--panel);
  color: var(--text);
  letter-spacing: 0.12em;
}

.cabinet-screen {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 0;
  padding-bottom: 75%; /* Aspect ratio 4:3 (600/800 = 0.75) */
  margin: 0 auto;
  border: 4px solid var(--panel-edge);
  background: #05070f;
  image-rendering: pixelated;
  overflow: hidden;
  /* Optimizaciones para respuesta táctil rápida */
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
