body {
  margin: 0;
  font-family: 'Press Start 2P', cursive;
  background-color: #111;
  color: #f8f8f8;
  overflow: hidden;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background-color: #000a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  z-index: 100;
  user-select: none;
  font-family: 'Press Start 2P', cursive;
  color: #00ffff;
  text-shadow: 2px 2px 5px #000;
}

header .sello {
  height: 100px;
  width: auto;
  object-fit: contain;
}

header .titulo-header {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-family: 'Press Start 2P', cursive;
  line-height: 1.3;
  white-space: pre-line;
  user-select: none;
  color: #00ffff;
  text-shadow: 2px 2px 4px #000000cc;
  padding: 0 20px;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 50px;
  background-color: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.8);
  user-select: none;
  z-index: 100;
}

#background {
  position: fixed;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  z-index: -2;
  transition: transform 0.2s ease;
  filter: brightness(1.3) contrast(1.2);
}

.pantalla {
  text-align: center;
  padding-top: 140px;  /* espacio para header */
  padding-bottom: 70px; /* espacio para footer */
}

.titulo-animado {
  font-size: 48px;
  margin-bottom: 50px;
}

.formulario-inicio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
  font-size: 22px;
}

.campo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

select {
  margin-top: 10px;
  font-size: 22px;
  padding: 12px 24px;
  border-radius: 10px;
  background: #0055ff;
  color: white;
  border: none;
}

.colores {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.color-opcion {
  width: 45px;
  height: 45px;
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-opcion.activo {
  box-shadow: 0 0 10px 4px white;
  transform: scale(1.2);
}

.boton-jugar button,
.boton-estilo {
  font-size: 24px;
  padding: 16px 40px;
  background: #00aa00;
  border-radius: 12px;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Press Start 2P', cursive;
}

.boton-jugar button:hover,
.boton-estilo:hover {
  background-color: #007700;
  transform: scale(1.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-contenido {
  background: #222;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  font-size: 18px;
}

.modal input {
  margin: 10px auto;
  padding: 10px;
  font-size: 18px;
  text-align: center;
  text-transform: uppercase;
  width: 80px;
}

.oculto {
  display: none;
}

/* --- NUEVOS ESTILOS para ejemplo animado --- */
#ejemploAnimado {
  margin: 30px auto 40px;
  width: 200px;
}

#ejemploAnimado canvas {
  background-color: #222;
  border: 3px solid #00ffff;
  border-radius: 12px;
  display: block;
  margin: 0 auto 15px;
}

.leyenda {
  color: white;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  user-select: none;
}

.leyenda div {
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ejemplo-serpiente {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #ffff00;
  border-radius: 3px;
  box-shadow: 0 0 10px 2px #ffff00;
}

.ejemplo-comida {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: red;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px red;
}
