#imageGallery {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-content: space-between;
}

#drawingCanvas {
    cursor: crosshair;
}

.imageContainer {
    position: relative;
    display: inline-block;
    margin: 10px;
    width: 31%;
    box-shadow: 0 2px 2px rgba(0,90,250,0.05),
      0 4px 4px rgba(0,90,250,0.05),
      0 8px 8px rgba(0,90,250,0.05),
      0 16px 16px rgba(0,90,250,0.05);
    color: #fff;
    padding: 15px;
    box-sizing: border-box;
}

.galleryImage {
    height: auto;
    cursor: pointer;
}

.imageContainer .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: red; 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 25px;
    font-weight: 600;
    text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
               1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

.imageContainer:hover .overlay {
    opacity: 1;
}

#canvasContainer {
    position: relative;
    width: 800px;
    height: 800px;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    border: 1px solid #000;
}

.coloring-image-elm{
    margin: auto;
    display: table;
}

.toolbar-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-action button {
    margin-right: 0;
    margin: 0 15px;
    margin-bottom: 20px;
}

.toolbar-action button#drawMode {
    background: #ffac00;
    color: #fff;
}

.toolbar-action button#eraseMode {
    background: #ff0028;
    color: #fff;
}
.toolbar-action button#resetCanvas {
    background: #009570;
    color: #fff;
}
.toolbar-action button#downloadImage {
    background: #00b3bc;
    color: #fff;
}
.toolbar-action button#printImage {
    background: #ff6c0b;
    color: #fff;
}

.coloring-post-title{
    margin: 0;
}

.entry-author.author-box.author-box-coloring {
    padding: 0;
}

.drawing-elm{
    display: flex;
    justify-content: space-between;
}

.control-ui#cntr-left {
    margin-right: 20px;
}

.control-ui#cntr-right {
    margin-left: 20px;
}
.control-ui .color-option{
    width: 35px;
    height: 35px;
    margin-bottom: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-ui .color-option.active::before {
    position: absolute;
    z-index: 1;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    content: "";
}

#drawingCanvas {
    margin: 0px !important;
}

button#drawMode.active {
    transform: scale(1.2);
    box-shadow: 5px 5px #888888;
}

button#eraseMode.active {
    transform: scale(1.2);
    box-shadow: 5px 5px #888888;
}

#colorPicker{
    max-width: 50px;
    margin-right: 10px;
}


@media only screen and (max-width: 820px) {
    .col.header-coloring{
        padding-bottom: 0;
        margin-top: 20px;
    }

    .toolbar-action{
        flex-wrap: wrap;
    }

    #canvasContainer {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 15px auto;
        max-width: 800px;
        width: 100%;
        min-height: 400px;
        height: auto;
    }
    
    canvas {
        display: block; /* Đảm bảo canvas không có khoảng trắng dưới cùng */
        max-width: 100%; /* Đảm bảo canvas không vượt quá kích thước của container */
    }

    .imageContainer {
        width: 30%;
    }
}

@media only screen and (max-width: 768px) {
    .toolbar-action{
        flex-wrap: wrap;
    }
}

@media only screen and (max-width: 600px) {
    .control-ui {
        display: none;
    }

    .imageContainer {
        width: 44%;
    }

    input#colorPicker {
        margin-left: 10px;
        margin-right: 10px;
    }
}