
  .input-3d-obra {
      font-size: 1.3em;
      padding: 0.7em 1.2em;
      border: 0;
      border-radius: 10px;
      background: #222;
      color: #fff;
      box-shadow:
        0 4px 0 #111,
        0 8px 16px rgba(0,0,0,0.4),
        0 0 0 6px #ffeb3b,
        0 0 0 12px #222,
        0 0 0 18px #ffeb3b;
      position: relative;
      margin: 1em 0 0.5em 0;
      outline: none;
      z-index: 1;
      border: 6px solid transparent;
      background-clip: padding-box;
      /* Borde de rayas negras y amarillas */
      box-shadow:
        0 4px 0 #111,
        0 8px 16px rgba(0,0,0,0.4),
        0 0 0 6px #ffeb3b,
        0 0 0 12px #222,
        0 0 0 18px #ffeb3b,
        0 0 0 24px #222;
      background-image:
        repeating-linear-gradient(135deg, #ffeb3b 0 12px, #222 12px 24px);
    }
.input-3d-obra::-webkit-outer-spin-button,
.input-3d-obra::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*.input-3d-obra {
  -moz-appearance: textfield; /* Para Firefox */
/*}*/

    /*AQUI SE CAMBIA LA IMAGEN DEL FONDE LA WEB  --------------------------------------------------------------------------------*/
/* Estilo general para móviles y tablets */
body {
  background-image: url('imagenes/fondomovil.jpeg');
  background-size: auto 100vh;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center top;
  position: relative;
  z-index: 0;
}

/* Estilo específico para pantallas grandes (ordenadores) */
@media (min-width: 720px) {
  body {
    background-image: url('imagenes/fondomovil.jpeg');
    background-size: cover; /* Ajusta a toda la pantalla */
    background-repeat: no-repeat;
    background-position: center center;
  }
}

  /*  body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0,0,0,0.45); /* Ajusta la opacidad para más o menos oscuridad 
      pointer-events: none;
      z-index: 1;
}
/* Nombre de los botones multiestado: cuadro azul, texto blanco, centrado, fuente flexible */
.nombre-multiestado {
  background: #444444;
  color: #00ff00;
  text-align: center;
  padding: 1px 0;
  border-radius: 8px;
  font-size: clamp(0.9em, 2vw, 1.2em);
  margin: 0 0 6px 0;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  letter-spacing: 1px;
  font-family: 'Ethnocentric Rg', 'Orbitron', 'Audiowide', 'Share Tech Mono', 'Courier New', Courier, monospace;
  width: 100%;
  max-width: 150px;
  box-sizing: border-box;
  min-height: 23px
  



}
/* Valor de los botones multiestado: cuadro negro, texto blanco, centrado */
.valor-multiestado {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1px 0;
  border-radius: 8px;
  font-size: 1.1em;
  margin: 6px 0 0 0;
  min-width: 48px;
  max-width: 100%;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  letter-spacing: 1px;
    font-family: 'Ethnocentric Rg', 'Orbitron', 'Audiowide', 'Share Tech Mono', 'Courier New', Courier, monospace;
  width: 100%;
  max-width: 150px;
  box-sizing: border-box;
}
#contenedorSuperior {
  position: fixed;
  top: 0px;
  right: 0px;
  display: flex;
  gap: 10px; /* espacio entre el botón y la puntuación */
  align-items: center;
  z-index: 9999;
  background-color: #f0f0f0; /* Gris claro */
  /* otros estilos opcionales */
  padding: 20px;
  border-radius: 8px;
}
/* Espacio para que debajo del contenedor superior se quede en blanco al principio del a pagina */

body {
  margin-top: 60px; /* mismo valor que el height del contenedorSuperior */
}


/* Panel de puntuación */
#puntuacionDisplay {
  background-color: #1a1a1a;
  color: #00ff00;
  padding: 8px 12px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  border: 2px solid #00ff00;
  border-radius: 5px;
  box-shadow: 0 0 8px #00ff00;
}


.boton {
  display: inline-block;
  padding: 12px 24px;
   background-color: #28a745; /* Verde vibrante, acorde al efecto 3D */
 /* background-image: url('boton-fondo.jpg'); /* Cambia por la ruta de tu imagen */
 /* background-size: cover;
 /* background-position: center;  */
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 5px 0 #1c6b2e; /* efecto 3D base */
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

/* Animación cuando se presiona el botón */
.boton:active {
  box-shadow: 0 2px 0 #1c6b2e;
  transform: translateY(3px);
}

/* Opcional: efecto hover para reforzar interactividad */
.boton:hover {
  filter: brightness(1.1);
}

.boton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  max-width: 400px;
  margin: 40px auto;
  padding: 10px;
}

.botonretro {
  display: flex;
  align-items: center;       /* Centra verticalmente */
  justify-content: center;   /* Centra horizontalmente */
  padding: 12px 24px;
  background-color: #3b3b3b;            /* Gris oscuro, como carcasa metálica */
  color: #00ff00;                       /* Verde fósforo típico de pantallas CRT */
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-family: 'Ethnocentric Rg', 'Courier New', monospace;/* Tipografía retro */
  font-weight: bold;
  box-shadow: 0 5px 0 #1f1f1f;          /* Sombra negra profunda para simular relieve físico */
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center; 
  width: 100%;
  max-width: 150px;
  box-sizing: border-box;
  /* min-height: 50px;          /* Establece una altura mínima para consistencia */
}

/* Animación al presionar el botón */
.botonretro:active {
  box-shadow: 0 2px 0 #1f1f1f;
  transform: translateY(3px);
}

/* Efecto hover con brillo tenue */
.botonretro:hover {
  filter: brightness(1.2);
}

.botonretrocontenedorsup {
  display: flex;
  align-items: center;       /* Centra verticalmente */
  justify-content: center;   /* Centra horizontalmente */
  padding: 12px 24px;
  background-color: #3b3b3b;            /* Gris oscuro, como carcasa metálica */
  color: #00ff00;                       /* Verde fósforo típico de pantallas CRT */
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-family: 'Ethnocentric Rg', 'Courier New', monospace;/* Tipografía retro */
  font-weight: bold;
  box-shadow: 0 5px 0 #1f1f1f;          /* Sombra negra profunda para simular relieve físico */
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center; 
  width: 100%;
  max-width: 120px;
  box-sizing: border-box;
  /* min-height: 50px;          /* Establece una altura mínima para consistencia */
}

/* Animación al presionar el botón */
.botonretrocontenedorsup:active {
  box-shadow: 0 2px 0 #1f1f1f;
  transform: translateY(3px);
}

/* Efecto hover con brillo tenue */
.botonretrocontenedorsup:hover {
  filter: brightness(1.2);
}

.botonretrocontenedorsupbloqueable {
  display: flex;
  align-items: center;       /* Centra verticalmente */
  justify-content: center;   /* Centra horizontalmente */
  padding: 12px 24px;
  background-color: #3b3b3b;            /* Gris oscuro, como carcasa metálica */
  color: #00ff00;                       /* Verde fósforo típico de pantallas CRT */
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-family: 'Ethnocentric Rg','Courier New', monospace;/* Tipografía retro */
  font-weight: bold;
  box-shadow: 0 5px 0 #1f1f1f;          /* Sombra negra profunda para simular relieve físico */
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center;
  width: 100%;
  max-width: 120px;
  box-sizing: border-box;
  position: relative; /* Necesario para el pseudo-elemento de bloqueo */
}

/* Animación al presionar el botón */
.botonretrocontenedorsupbloqueable:active {
  box-shadow: 0 2px 0 #1f1f1f;
  transform: translateY(3px);
}

/* Efecto hover con brillo tenue */
.botonretrocontenedorsupbloqueable:hover {
  filter: brightness(1.2);
}

/* Estado bloqueado */
.botonretrocontenedorsupbloqueable.bloqueado {
  background-color: #aa0000;
  box-shadow: none;
  transform: translateY(0);
  cursor: not-allowed;
  color: #ff5555;
}

.botonretrocontenedorsupbloqueable.bloqueado:hover {
    filter: brightness(1);
}

.botonretrocontenedorsupbloqueable.bloqueado:active {
    box-shadow: none;
    transform: translateY(0);
}


/*.grid-botones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  max-width: 100%;
  margin: 30px auto;
  justify-content: center;
  grid-auto-rows: 270px;
}*/
.grid-botones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  column-gap: 1px;
  row-gap: 10px;
  justify-items: center;
  grid-auto-rows: 260px;
  max-width: calc(150px * 7 + 1px * 6); /* Máximo 7 columnas con 6 gaps */
  margin: 5px auto;
  overflow: visible
}

@media (max-width: 600px) {
  .grid-botones {
    grid-template-columns: repeat(2, 1fr); /* Fuerza 2 columnas */
    justify-content: center;
  }
  
  .par-boton {
    max-width: 100%; /* Permite que se ajusten al ancho disponible */
    height: auto;     /* Opcional: si quieres que se adapten en altura también */
  }
}

.par-boton {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 170px;
  min-width: 160px;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;

}

.btn-personaje {
  height: 30px;
  max-height: 100%;
  width: 100%;  
  /* width: auto;  */             /* El botón se ajusta al tamaño del contenido */
  /* max-width: 100%; */
  max-width: 130px; 
  white-space: nowrap;
  margin-top: 5px;
  /* display: flex; */
  font-size: clamp(12px, 2vw, 16px); /* 🔍 Ajusta automáticamente el tamaño del texto */
  display: inline-flex;
  align-items: center;       /* Centra verticalmente */
  justify-content: center;   /* Centra horizontalmente */
  padding: 1px 6px;
  background-color: #3b3b3b;            /* Gris oscuro, como carcasa metálica */
  color: #00ff00;                       /* Verde fósforo típico de pantallas CRT */
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-family: 'Ethnocentric Rg', 'Courier New', monospace;/* Tipografía retro */
  font-weight: bold;
  box-shadow: 0 5px 0 #1f1f1f;          /* Sombra negra profunda para simular relieve físico */
  transform: translateY(0);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center; 
  /* margin-bottom: 30px; /* Agrega espacio debajo de cada botón */
  /* min-height: 50px;          /* Establece una altura mínima para consistencia */

}



.boton-multiestado {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1 / 1 !important; /* Mantiene el botón cuadrado */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 0;
  color: transparent;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 5px 0 #1f1f1f; /* 3D hacia afuera */
  transition: all 0.2s ease-in-out;
  text-align: center;
  min-height: 0;
  min-width: 0;
  /* max-height: calc(100% - 56px - 40px - 44px);  Altura grid menos nombre, valor y ficha aprox */
  margin-bottom: 0;
  max-height: 150px; /* Altura máxima para evitar que crezca demasiado */
}

/* Estado: sin pulsar */
.sin-pulsar {
  background-color: #00aa00;
}

/* Estado: pulsado (verde parpadeante, hundido) */
.pulsado {
  background-color: #00aa00;
  box-shadow: 0 2px 0 #1f1f1f;
  transform: translateY(3px);
  animation: parpadeo 0.6s infinite;
}

/* Estado: bloqueado (rojo, plano, cruz roja) */
.bloqueado {
  background-color: #aa0000;
  box-shadow: none;
  position: relative;
}

.bloqueado::after {
  content: "✖";
  position: absolute;
  font-size: 28px;
  color: #ff5555;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Animación parpadeante */
@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


/* Contenedor inferio en modo vertical, los personajes aparecen unos debajo de otro*/
/*
#contenedorInferior {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f0f0f0;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}*/

#contenedorInferior {
  display: grid !important;
/* justify-self: start; esto recorta el cuadro ingerior */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) ; 
  gap: 1px;
  padding: 1px;
  background: #f0f0f0;
  border-top: 1px solid #ccc;
  overflow-y: auto;  /* permite scroll vertical si se supera el alto */
}

#contenedorInferior.minimizado {
  height: 40px;
  overflow: hidden;
  padding-top: 5px;
}

/*Esto es los cuadros de texto de cada personaje en el contenedor inferior*/

.cuadroTexto {
  background-color: white;
  border: 2px solid #ccc;
  padding: 0px;
  box-sizing: border-box;
 /* width: 90%; */
 flex: 0 0 auto; /* si usas flexbox */
  max-width: 400px;
 
  display: flex ;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  /*overflow: hidden;*/
  margin-left: 30px;
  
  
}

.contenidoCuadro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filaContenido {
  display: flex;
  flex-wrap: nowrap;
  /*overflow: hidden;*/
  gap: 10px;
}

.textoCuadro {
  white-space: nowrap;
  /*overflow: hidden;*/
  text-overflow: ellipsis;
  text-align: left;
  max-width: 100%;
  font-family: 'Ethnocentric Rg', 'Courier New', monospace;
  font-size: clamp(0.3rem, 2vw, 1rem); /* Tamaño de fuente responsivo */
}

.cuadroTexto .info {
  display: flex;
  flex-direction: column;
  font-family: 'Ethnocentric Rg', 'Courier New', monospace;
  gap: 5px;
}


/* Botones extra en el contenedor inferior los botones de objetos*/
.botonesExtra {
  display: grid;
  grid-template-columns: repeat(4, auto); /* Ajusta ancho según contenido */
  gap: 0px;
  flex-shrink: 1;
  flex-wrap: wrap;
  max-width: 100%;
  
  
/*  overflow: hidden;*/
}


 
  


.botonesExtra button {
  height: 5vh;
  max-height: 40px;
  width: 5vh;
  max-width: 40px;
  font-size: 10px;
  padding: 0;
  background-color: #d4cfc7;
  border: 2px solid #888;
  box-shadow: inset -2px -2px 0 #aaa, inset 2px 2px 0 #fff;
  background-image: url('ruta-de-tu-imagen.jpg'); /* Cambia por la ruta real */
  background-size: cover;
  background-position: top;
  color: #333;
  font-family: 'Courier New', monospace;
  text-shadow: 1px 1px 0 #fff;
  position: relative;
}

.botonesExtra button.pulsado {
  box-shadow: inset 2px 2px 2px #555;
  background-color: #b0aca4;
}

#botonvolverretro {
  background-color: #000;
  color: #0f0;
  font-family: 'Courier New', Courier, monospace;
  border: 2px solid #0f0;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #0f0;
  transition: all 0.2s ease;
}

#botonvolverretro:hover {
  background-color: #0f0;
  color: #000;
  box-shadow: 2px 2px 0 #000;
}

#botonToggleContenedor {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 10;
}

/* .boton-sumador {
/*  display: flex;
/*  width: 150px;
/*  height: 100px; /* Adjusted height for the sumador button */
/*  max-width: 100%;
  border: 2px solid #333;
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 5px 0 #1f1f1f;
    font-family: 'Ethnocentric Rg', 'Courier New', monospace;
  font-weight: bold;
  color: #00ff00;
  align-items: stretch;
  justify-content: stretch; 
}*/
.boton-sumador {
  display: flex;
  flex-direction: column;
  width: 140px;
/*  height: 100px; /* Igual que multiestado */
  max-width: 100%;
  border: 2px solid #333;
  border-radius: 10px;
  background: #333;
  box-shadow: 0 5px 0 #1f1f1f;
    font-family: 'Ethnocentric Rg', 'Courier New', monospace;
  font-weight: bold;
  color: #00ff00;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  padding: 0;
}
.nombre-sumador {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50%;
  font-size: 0.7em;
  font-weight: bold;
    font-family: 'Ethnocentric Rg', 'Courier New', monospace;
  background: transparent;
  border-bottom: 1px solid #444;
  padding: 0 2px;
  width: 120px;
}
.boton-sumador-controles {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  height: 50%;
}
 /* justify-content: space-between;
  height: 50%;
}*/
.boton-sumador .mitad-resta,
.boton-sumador .valor-sumador,
.boton-sumador .mitad-suma {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
  cursor: pointer;
  user-select: none;
  background: #333;
  transition: background 0.2s;
  height: 100%;
  min-width: 0;
  border: none;
}
.boton-sumador .mitad-resta:hover {
  background: #a00;
  color: #fff;
}
.boton-sumador .mitad-suma:hover {
  background: #0a0;
  color: #fff;
}
.boton-sumador .valor-sumador {
  font-size: 1.2em;
  font-weight: bold;
  background: #111;
  color: #0f0;
  border-left: 1px solid #222;
  border-right: 1px solid #222;
}

      @keyframes parpadeoRojo {
        0%, 100% { color: red; opacity: 1; }
        50% { color: red; opacity: 0.2; }
      }
      .negativo-parpadeante {
        color: red !important;
        animation: parpadeoRojo 0.8s infinite;
        font-weight: bold;
        text-shadow: 0 0 8px #ff0000, 0 0 16px #ff0000;
      }

.caja-inferior {
  min-width: 160px; /* Ajusta según tu diseño */
  max-width: 200px;
  padding: 8px;
  margin-left: 35px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #222;
  color: #fff;
  box-sizing: border-box;
  
}

/*#contenedorInferiorBB {
  display: flex;
  flex-wrap: wrap; /* Permite que los elementos pasen a la siguiente línea */
/*  gap: 10px;        /* Espacio entre cajas */
/*  justify-content: flex-start; /* O center si quieres centrar las filas */
/*  align-items: flex-start;
  padding: 10px;
  position: relative;
  transition: height 0.3s ease;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 30px !important;
   overflow-y: auto;  /* permite scroll vertical si se supera el alto */
/*}

#contenedorInferiorBB.minimizado {
  height: 40px; /* Altura mínima cuando está minimizado */
/*  display: flex;
  align-items: center;
  justify-content: flex-start;
}*/

#contenedorInferiorBB {
  display: grid !important;
/* justify-self: start; esto recorta el cuadro ingerior */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) ; 
  gap: 1px;
  padding: 1px;
  background: #f0f0f0;
  border-top: 1px solid #ccc;
  overflow-y: auto;  /* permite scroll vertical si se supera el alto */
}

#contenedorInferiorBB.minimizado {
  height: 40px;
  overflow: hidden;
  padding-top: 5px;
}

.botonToggleBB {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  text-align: center;
  line-height: 30px;
  background-color: #eee;
  border: 1px solid #ccc;
  cursor: pointer;
  z-index: 10;
}

#botonSuperiorBB {
  top: 5px;
  left: 5px;
}

#botonInferiorBB {
  bottom: 5px;
  left: 5px;
}

.estado-rojo {
    color: red;
    font-weight: bold;
}

.espacio-vacio {
  height: 50vh; /* 50% de la altura de la ventana */
}

.logos {
  display: block;
  margin: 0 auto;               /* Centra la imagen horizontalmente */
  max-height: 100px;            /* Altura máxima (puedes ajustarla) */
  height: auto;                 /* Mantiene la proporción */
  width: 100%;                  /* Se adapta al ancho del contenedor */
  max-width: 400px;             /* Evita que se estire demasiado en pantallas grandes */
  object-fit: contain;         /* Asegura que la imagen se ajuste sin recortarse */
}


.titulo-euphoria {
    font-family: 'Ethnocentric', sans-serif;
    font-size: 36px;
    text-align: center;
    color: #ffffff;
    margin-top: 20px;
}

.descripcion-euphoria {
    font-family: 'Ethnocentric', sans-serif;
    font-size: 20px;
    text-align: center;
    color: #cccccc;
    margin: 10px auto;
    max-width: 800px;
    color: #00ff00;   
}
