@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* Variables de colores inspiradas en Nothing */
:root {
  --primary-color: #f7f7f7;       /* Cian brillante */
  --primary-hover: #cd0000;       /* Cian un poco más oscuro */
  --accent-color: #ff4081;        /* Toque sutil en rosa */
  --overlay-bg: rgba(0, 0, 0, 0.85);
  --bg-gradient-start: #121212;   /* Negro/Gris muy oscuro */
  --bg-gradient-middle: #1e1e1e;  /* Gris oscuro */
  --bg-gradient-end: #2c2c2c;     /* Gris medio oscuro */
  --text-color: #e0e0e0;          /* Blanco suave */
}

/* Global resets y box-sizing */
* {
  box-sizing: border-box;
}
/* Animaciones de transición para todas las pantallas */
.fade-in {
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Fondo animado con un degradado sofisticado */
body {
  margin: 0;
background: #121212;  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
  overflow-x: hidden;
  font-family: 'Orbitron', sans-serif;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Animación del gradiente */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Estilos metalizados para el lobby */
.lobby {
  position: relative; /* necesario para el pseudo-elemento */
  background: #121212;
  background: linear-gradient(135deg, #121212, #2e2e2e, #242424);
  border-radius: 1000px;
  padding: 75px;
  text-align: center;
  max-width: 90%;
  margin: 20px;
  box-shadow: 0 0 50px rgb(255, 255, 255);
  overflow: hidden; /* para que el destello no se salga */
  
}

/* Pseudo-elemento para el destello metalizado */
.lobby::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: shine 2s infinite;
}

/* Animación del destello */
@keyframes shine {
  0% { left: -75%; }
  100% { left: 125%; }
}



.lobby h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  
}
.lobby p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}
#startButton {
  font-size: 1.5rem;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: #121212;
  cursor: pointer;
  transition: transform 0.3s;
  box-shadow: 0 0 10px #121212;
}
#startButton:hover {
  transform: scale(1.05);
  background-color: var(--primary-hover);
  color: var(--primary-color)
}

/* Encabezado del juego */
header {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  
}
header h1 {
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px #000;
}


/* Reglas para el acordeón */
.accordion .accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.accordion .accordion-item.active .accordion-content {
  max-height: 500px; /* Valor suficientemente alto para el contenido */
  opacity: 1;
  padding-top: 10px;
}

/* Estilos para el header de reglas */
.rules-header {
  width: 100%;
  padding: 20px;
  background: linear-gradient(-45deg, var(--bg-gradient-start), var(--bg-gradient-middle), var(--bg-gradient-end), #3a3a3a);

  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.rules-header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary-color);
}
.rules-nav {
  margin-top: 10px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.rules-nav .home-btn,
.rules-nav .toggle-details-btn {
  background: #121212;
  color: #f7f7f7;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: #ffffff 0 0 10px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.rules-nav .home-btn:hover,
.rules-nav .toggle-details-btn:hover {
  background: #f7f7f7;
  color: #121212;
  transform: scale(1.05);
  box-shadow: #f7f7f7 0 0 10px;
}

/* Estilos para el contenedor principal */
.rules-container {
  width: 90%;
  max-width: 800px;
  margin: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Estilos para las tarjetas (cards) */
.card {
  background: rgba(30, 30, 30, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgb(255, 255, 255);
  transition: transform 0.3s ease;
  border-radius: 50px;
}
.card:hover {
  transform: scale(1.02);
}

/* Footer para reglas */
.rules-footer {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
  background: var(--bg-gradient-end);
  width: 100%;
  color: var(--text-color);
  font-size: 0.9rem;
}


/* Estilos para el catálogo de cartas estilo Pokémon */
.card-catalog {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pokemon-card {
  width: 220px;
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.card-frame {
  background: linear-gradient(145deg, #e6e6e6, #1a1a1a, #f7f7f7, #121212);
  border: 2px solid #f7f7f7;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 
    0 0 25px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(20, 20, 20, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.6s, box-shadow 0.6s;
}

.pokemon-card:hover .card-frame {
  transform: scale(1.15) rotateY(10deg) rotate3d(1, -5, 1, 15deg);
  box-shadow: 
    0 0 25px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(255, 255, 255, 0.3),
    inset 20px 20px 20px rgba(255, 255, 255, 0.3);
    
  
}

/* Brillo animado como destello */
.card-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-25deg);
  animation: shine 3s infinite;
  pointer-events: none;
}

/* Mantén o mejora esta animación existente */
@keyframes shine {
  0% { left: -75%; }
  100% { left: 125%; }
}


.card-header {
  background: linear-gradient(135deg, #333, #121212);
  color: #f7f7f7;
  padding: 5px;
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
}

.card-image {
  padding: 10px;
  background: linear-gradient(135deg, #121212, #f7f7f7, #333);
  display: flex;
  justify-content: center;
  align-items: center;
  
}

.card-image img {
  width: 100%;
  border-radius: 10px;
}

.card-footer {
  background: #121212;
  color: #f7f7f7;
  padding: 5px;
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 13px;
  text-align: center;
  font-size: 0.9rem;
}

.pokemon-card.selected .card-frame {
  
  border-color: red;
  box-shadow: 0 0 30px red;
  background: linear-gradient(135deg, #a30000, #f7f7f7, #121212, #580000, #afafaf);
  transform: rotate3d(1, 1, 1, 10deg);
}

/* Estilos adicionales para encabezado y pie en naves.html */
.naves-header {
  text-align: center;
  margin-top: 20px;
  color: var(--primary-color);
}
.naves-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.naves-container {
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}
.naves-footer {
  text-align: center;
  margin: 20px;
}

/* Contenedor principal del juego */
.game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 600px;
  margin-bottom: 20px;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 0 50px var(--primary-color);
}

/* Estilos para el canvas del juego */
canvas {
  background: #201f1f;
  border: 3px solid var(--primary-color);
  box-shadow:  0 0 30px var(--primary-color);
  animation: pulse 2s infinite;
  border-radius: 25px;
  width: 100%;
  height: auto;
}



@keyframes pulse {
  0% { box-shadow: 0 0 20px var(--primary-color); }
  50% { box-shadow: 0 0 40px var(--primary-color); }
  100% { box-shadow: 0 0 20px var(--primary-color); }
}

/* Estilos para overlays (pausa y fin de partida) */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.overlay-content {
  text-align: center;
}
.overlay-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}
.overlay-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.overlay-buttons button {
  font-size: 1rem;
  padding: 15px 20px;
  border: none;
  border-radius: 50px;
  background-color: var(--primary-color);
  color: #000;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-color);
  transition: background-color 0.3s, transform 0.3s;
}
.overlay-buttons button:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
  color: #f7f7f7;
}

/* Clase para ocultar elementos */
.hidden {
  display: none;
}

/* Estilos para controles táctiles, ubicados fuera del canvas */
.touch-controls {
  width: 90%;
  max-width: 600px;
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}
.touch-controls button {
  font-size: 1.5rem;
  padding: 15px 20px;
  border: #121212 solid 3px;
  border-radius: 50px;
  background-color: rgb(255, 255, 255);
  color: #121212;
  box-shadow: 0 0 10px #000000;
}

/* Mostrar controles táctiles solo en móviles */
@media (min-width: 768px) {
  .touch-controls {
    display: none;
  }
}




/* Botón general */
.btn {
  display: inline-block;
  padding: 12px 24px;
  margin: 10px;
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  background-color: #333;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(219, 219, 219, 0.3);
}

.btn:hover {
  background-color: #a30000;
  transform: translateY(-2px);
}

/* Contenedor para agrupar y centrar botones */
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Botón redondo (home y play) */
.home-btn {
  width: 50px;
  height: 50px;
  background-color: #121212;
  color: #f7f7f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s ease;
  z-index: 1100;
}

.home-btn:hover {
  color: #121212;
  background-color: #f7f7f7;
  box-shadow: 0 4px 4px rgb(255, 253, 253);
  transform: translateY(-2px);
}

/* Configuración del icono de Google Fonts */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}


/* Estilos para el selector de skin */
.skin-selector {
  margin: 20px 0;
  text-align: center;
}

.skin-selector p {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.skin-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.skin-option {
  width: 80px;
  height: auto;
  border: 2px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: border 0.3s;
}

.skin-option:hover {
  border: 2px solid var(--primary-color);
}

.skin-option.selected {
  border: 2px solid var(--primary-color);
  background: linear-gradient(-45deg, var(--bg-gradient-start), var(--bg-gradient-middle), var(--bg-gradient-end), #afafaf);
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}



body#lobby {
  background: url('espacio.gif') no-repeat center center fixed;
  background-size: cover;
  animation: none; /* Desactiva la animación del gradiente para el lobby */
}



/* === 1. ESTILO NEO-TECHNO ESPACIAL (HUD & PARTICULAS) === */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('stars-overlay.gif') repeat;
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
}

button, .home-btn, .btn {
  position: relative;
  overflow: hidden;
}

button::before, .home-btn::before, .btn::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 70%);
  transform: rotate(45deg);
  animation: shineBtn 4s linear infinite;
  pointer-events: none;
}

@keyframes shineBtn {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* === 2. CARTAS HOLOGRÁFICAS === */
.card-frame {
  background: linear-gradient(135deg, #1b1b1b, #2a2a2a);
  border: 2px solid #d8d8d8;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
  position: relative;
  transition: transform 0.4s, box-shadow 0.4s;
}

.card-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 2;
}



/* Auras especiales por clase */
.card-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  background: linear-gradient(to right, #fff, #999);
  color: #000;
  box-shadow: 0 0 10px rgba(255,255,255,0.4);
}


.card {
  background: rgba(30, 30, 30, 0.9);
  padding: 20px;
  border-radius: 50px;
  box-shadow: 0 0 20px var(--text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px var(--primary-hover); /* Glow rojo sutil */
}

.accordion-header {
  cursor: pointer;
  padding: 10px;
  background: linear-gradient(-45deg, var(--bg-gradient-start), var(--bg-gradient-middle));
  transition: color 0.3s ease;
}

.accordion-item.active .accordion-header {
  color: var(--primary-hover); /* En rojo al estar activo */
  border-bottom: 2px solid var(--primary-hover);
}


.rules-container section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.rules-container section.visible {
  opacity: 1;
  transform: translateY(0);
}



