/* ===== RESET Y GLOBAL ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: #000000;
  color: #ffffff;
  font-family: 'Arial', 'Helvetica', sans-serif;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ===== GAME CONTAINER ===== */
#game {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* ===== RESPONSIVO / PWA ===== */
/* El escalado se maneja dinámicamente con JS (resizeGame) */
#game {
  /* Asegurar que el canvas no se salga de la pantalla */
  max-width: 100vw;
  max-height: 100vh;
}

canvas {
  display: block;
  /* Touch events nativos en móvil */
  touch-action: none;
}

/* Safe area para notch (iPhone X+) */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Orientación portrait - sugerencia de rotar */
@media (orientation: portrait) and (max-width: 600px) {
  body::before {
    content: '↻ Gira tu dispositivo para mejor experiencia';
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    z-index: 10000;
    pointer-events: none;
  }
}

/* Modo standalone (instalado como PWA) */
@media (display-mode: standalone) {
  body {
    user-select: none;
    -webkit-user-select: none;
  }
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #648dff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7ba3ff;
}

/* ===== ANIMACIONES ===== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.nav-links{
  display:flex;
  gap:18px;
  overflow-x:auto;
  white-space:nowrap;
}
.nav-links a.active {
  color: var(--gold) !important;
  border-bottom: 2px solid var(--gold);
}