

/* .contenedor-dibuja lleva como background una imagen fondo tesoro */
.contenedor-dibuja {
  background-image: url("../img/dibuja/fondo-tesoro.png");
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: bottom center;
  /* padding: 60px 20px 0 20px; */
  min-height: 100vh;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.contenedor-titulo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.contenedor-titulo h1 {
  font-family: var(--font-principal-regular);
}

.contenedor-titulo img {
  width: 60px;
  height: auto;
}

.titulo-dibuja {
  font-family: var(--font-title);
  font-size: 48px;
  color: var(--color-cyan);
  margin: 0;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.container-drawing p {
  font-family: var(--font-principal-regular);
  font-size: 20px;
  color: var(--color-dorado);
  margin: 0;
  text-align: center;
  font-weight: bolder;
  text-transform: uppercase;
}

.container-drawing {
  max-width: 1400px;
  margin: 0 auto;
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px;
}

/* Contenedor del área de dibujo - más grande */
.drawing-area {
  position: relative;
  width: 100%;
  max-width: 950px;
  height: 520px;
  margin: 30px 0 60px 0;
  background-color: transparent;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Contenedor del dibujo - pizarra como fondo */
.drawing {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 100%;
  background-image: url("../img/dibuja/board.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 20px 80px 134px 82px; /* top right bottom left */
  box-sizing: border-box;
}

/* Canvas ocupa todo el espacio disponible */
.drawing-canvas {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  cursor: url("../img/iconos/mateo-puntero.cur") 8 8, url("../img/iconos/mateo-puntero.png") 16 16, auto;
}

/* Contenedor de íconos - posicionado a la izquierda FUERA de la pizarra */
.icons-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
  align-items: center;
  padding: 10px;
  flex-shrink: 0;
}

/* Íconos individuales */
.icons-container img {
  cursor: pointer;
  width: 36px;
  height: 36px;
  transition: transform 0.2s ease;
}

.icons-container img:hover {
  transform: scale(1.1);
}

.icons-weight {
  border: 2px solid var(--color-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  padding: 10px 8px;
  background-color: rgba(255, 255, 255, 0.9);
}

/* Selector de color */
input[type="color"] {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-cyan);
  border-radius: 50%;
  cursor: pointer;
  padding: 2px;
}

/* Estilo para el botón de descarga */
.icons-container button {
  position: relative;
  z-index: 4;
  border: none;
  width: 36px;
  height: 36px;
  background-color: transparent;
  background-size: contain;
  background-position: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.icons-container button:hover {
  transform: scale(1.1);
}

/* ============ RESPONSIVE ============ */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  .container-drawing {
    margin-top: 100px;
  }
  
  .drawing-area {
    max-width: 850px;
    height: 450px;
  }
  
  .drawing {
    max-width: 700px;
    padding: 20px 80px 134px 82px;
  }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
  .contenedor-dibuja {
    padding: 40px 15px 0 15px;
    background-size: 150% auto;
  }
  
  .container-drawing {
    width: 100%;
    margin-top: 80px;
    padding-bottom: 40px;
  }
  
  .titulo-dibuja {
    font-size: 36px;
  }
  
  .contenedor-titulo img {
    width: 45px;
  }
  
  .drawing-area {
    max-width: 100%;
    height: auto;
    flex-direction: column;
    gap: 15px;
    margin: 20px auto 40px auto;
  }
  
  .drawing {
    max-width: 550px;
    height: 350px;
    width: 100%;
    padding: 15px 18px 62px 15px;
  }
  
  .icons-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    order: 2;
  }
  
  .drawing {
    order: 1;
  }
  
  .icons-weight {
    flex-direction: row;
    padding: 8px 12px;
  }
  
  .icons-container img,
  .icons-container button {
    width: 32px;
    height: 32px;
  }
}

/* Móviles */
@media (max-width: 576px) {
  .contenedor-dibuja {
    /* padding: 30px 10px 0 10px; */
    padding: 30px 0 0 0;
    background-size: 180% auto;
    min-height: auto;
    /* bottom: -20px;
    z-index: 1; */
  }
  
  .container-drawing {
    margin-top: 60px;
  }
  
  .titulo-dibuja {
    font-size: 28px;
  }
  
  .contenedor-titulo img {
    width: 35px;
  }
  
  .container-drawing p {
    font-size: 16px;
    padding: 0 10px;
  }
  
  .drawing-area {
    max-width: 100%;
    height: auto;
    margin: 15px auto 30px auto;
  }
  
  .drawing {
    max-width: 100%;
    height: 280px;
    padding: 12px 14px 50px 12px;
  }
  .drawing-canvas {
    padding-left: 20px;
    padding-right: 20px;
  }

  
  .icons-container {
    max-width: 320px;
    gap: 8px;
  }
  
  input[type="color"] {
    width: 35px;
    height: 35px;
  }
  
  .icons-container img,
  .icons-container button {
    width: 28px;
    height: 28px;
  }
  
  .icons-weight {
    gap: 6px;
    padding: 6px 10px;
  }
}

/* Móviles pequeños */
@media (max-width: 430px) {
  .contenedor-titulo h1 {
    font-size: 24px;
  }
  
  .contenedor-titulo img {
    width: 30px;
  }
  
  .container-drawing p {
    font-size: 14px;
  }
  
  .drawing {
    height: 240px;
    padding: 10px 40px 63px 40px;
  }
  
  .icons-container {
    max-width: 280px;
  }
  
  input[type="color"] {
    width: 30px;
    height: 30px;
  }
  
  .icons-container img,
  .icons-container button {
    width: 24px;
    height: 24px;
  }

}