/*-------------------------------------------------
  REGLAS GLOBALES PARA DESACTIVAR SELECCIÓN Y FOCUS
-------------------------------------------------*/
* {
  -webkit-user-select: none; /* Chrome, Safari, Opera */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* Internet Explorer/Edge */
  user-select: none;         /* Propiedad estándar */
  outline: none !important;  /* Elimina el outline por defecto */
  -webkit-tap-highlight-color: transparent;
}

::-moz-focus-inner {
  border: 0;
}

:focus,
:active {
  outline: none !important;

}

/*-------------------------------------------------
  ESTILOS BASE PARA LA INTERFAZ
-------------------------------------------------*/
html,
body {
  height: 100%;
  margin: 0; /* Sin margen en el body */
  padding: 0;
  overflow: hidden; /* Evita scroll en la ventana */
  font-family: Arial, sans-serif;
}

body {
  display: flex;
}

/*-------------------------------------------------
  ESTILOS PARA LA COLUMNA DE CONTROLADORES
-------------------------------------------------*/
#controladores {
  position: relative;
  width: 250px;
  background: #ffffff;
  color: #000;
  padding: 10px;
  box-sizing: border-box;
}

#header {
  text-align: left;
}

#header h1 {
  font-family: "Press Start 2P", cursive;
  margin: 0 0 10px 0;
  max-width: 250px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 23px;
}

#control-content {
  position: absolute;
  top: 150px;
  left: 10px;
  right: 10px;
  text-align: left;
}

#footer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  text-align: left;
  font-size: 12px;
  color: #555;
}

/*-------------------------------------------------
  ESTILOS PARA EL CANVAS DE RESULTADO
-------------------------------------------------*/
#resultCanvas {
  flex: 1;
  display: block;
}

/*-------------------------------------------------
  ESTILOS PARA ELEMENTOS DE FORMULARIO
-------------------------------------------------*/
input[type="file"],
input[type="color"],
label {
  display: block;
  width: 100%;
  margin-bottom: 20px;
}

/* 
   ESTILOS PARA LAS BARRAS DE CONTROL (range)  
   Se personaliza la pista y el "thumb" para mostrar color negro.
   Se añade la propiedad estándar "appearance" para compatibilidad.
*/
input[type="range"] {
  -webkit-appearance: none; /* Quitar estilos predeterminados en Webkit */
  -moz-appearance: none;    /* Quitar estilos en Firefox */
  appearance: none;         /* Propiedad estándar */
  width: 100%;
  background: transparent;
  margin-bottom: 20px;
}

/* Pista personalizada para Webkit (Chrome, Safari, Opera) */
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #000000;
  border: none;
  border-radius: 4px;
}

/* "Thumb" personalizado para Webkit */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #000000;
  border-radius: 50%;
  margin-top: -6px; /* Centra verticalmente el thumb en la pista */
  cursor: pointer;
}

/* Pista personalizada para Firefox */
input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #000000;
  border: none;
  border-radius: 4px;
}

/* "Thumb" personalizado para Firefox */
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #000000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Estilo para Internet Explorer */
input[type="range"]::-ms-track {
  width: 100%;
  height: 8px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower {
  background: #000000;
  border-radius: 4px;
}

input[type="range"]::-ms-fill-upper {
  background: #000000;
  border-radius: 4px;
}

/*-------------------------------------------------
  ESTILOS PARA LOS BOTONES (mismos colores en cualquier estado)
-------------------------------------------------*/


button {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  background-color: #000000 !important; /* Fondo negro */
  color: #ffffff !important;            /* Texto blanco */
  border: none;
  padding: 8px;
  cursor: pointer;
}

button:hover,
button:active,
button:focus {
  background-color: #000000 !important; /* Mantiene fondo negro */
  color: #ffffff;
}

button#exportBtn{
  opacity:1;
  background-color: #000000 !important; /* Mantiene fondo negro */
  color: #ffffff;
}


/*-------------------------------------------------
  ESTILOS PARA LA MINIATURA DE IMAGEN
-------------------------------------------------*/
#thumbnailContainer img {
  margin-top: 20px;
  max-width: 100%;
  display: block;
}

/*-------------------------------------------------
  DEPURACIÓN (DEBUG) ADICIONAL (opcional)
-------------------------------------------------*/
/*
* {
  border: 1px solid rgba(255, 0, 0, 0.2);
}
*/