
#color-drawing .image-display {
    width: 80%;
    height: 100%;
    background-size: contain; /* 이미지가 잘리지 않고 전체가 보이도록 */
    background-position: center;
    background-repeat: no-repeat;
    max-width: 100%; /* 컨테이너를 벗어나지 않도록 */
    max-height: 100%; /* 컨테이너를 벗어나지 않도록 */
}

#color-drawing .person-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
    background-size: contain;
    background-position: bottom center;
    background-repeat: no-repeat;
    max-width: 100%; /* 추가 */
    max-height: 100%; /* 추가 */
}

#color-drawing .container, .image-selector, #drawing-section {
    overflow: hidden;
}

#color-drawing  {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#color-drawing .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#color-drawing canvas {
    border: 1px solid #ccc;
    margin-top: 20px;
    cursor: crosshair;
}

#color-drawing .controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#color-drawing button {
    padding: 10px 12px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#color-drawing .image-selector {
    margin: 20px 0;
    width: 100%;
    max-width: 800px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    background-color: white;
}

#color-drawing .image-carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

#color-drawing .carousel-arrow {
    cursor: pointer;
    width: 50px;
    height: 50px;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: transform 0.2s;
}

#color-drawing .carousel-arrow:hover {
    transform: scale(1.1);
}

#color-drawing .carousel-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#color-drawing .carousel-image-container {
    width: 600px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    position: relative;
}

#color-drawing .preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#color-drawing .image-counter {
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
    color: #666;
}

#color-drawing .confirm-button {
    display: block;
    margin: 0 auto;
    width: 60px;
    height: 60px;
    background: url('/assets/view/images/icon/check.png') no-repeat center;
    background-size: contain;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    text-indent: -9999px;
}

#drawing-section {
    display: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    margin: 10px;
}

#color-drawing .image-button {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    text-indent: -9999px;
    background-color: transparent;
    margin: 0 15px;
}

#color-drawing .image-button:hover {
    transform: scale(1.1);
}

#resetButton {
    background-image: url('/assets/view/images/icon/x.png');
}

#saveButton {
    background-image: url('/assets/view/images/icon/download.png');
}


#eraserButton {
    background-image: url('/assets/view/images/icon/eraser.png'); /* ★ 지우개 아이콘 경로! */
}

#color-drawing .drawing-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    border: none;
    padding: 10px;
}

#color-drawing .canvas-container {
}

#color-drawing .color-palette-container {
    flex: 1;
    margin-left: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 350px;
    gap: 0px;
}

#color-drawing .color-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 15px;
    margin-bottom: 15px;
}

#color-drawing .color-item {
    width: 40px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.2s;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#color-drawing .color-item:hover {
    transform: scale(1.1);
}

#color-drawing .color-item.active {
    box-shadow: 0 0 0 0px #000, 0 0 0 0px #fff;
}

#color-drawing .buttons-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

#color-drawing .palette-title {
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    font-size: 20px;
}

#color-drawing .image-selector, #drawing-section {
    position: relative;
}

#color-drawing .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-image: url('/assets/view/images/icon/x.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}



#color-drawing .brush-size-container {
    margin-top: 5px;
    display: flex;
    align-items: center;
    width: 100%;
    height:30px;
    justify-content: space-between;
}

#color-drawing .brush-size-container label {
    font-size: 16px;
    white-space: nowrap;
    flex: 0 0 10%;
    text-align: center;
    color : black;
}

#brush-size {
    flex: 0 0 60%;
    height: 30px; /* 슬라이더 높이 고정 */
}

#brush-preview {
    flex: 0 0 20%;
    height: 60px;  /* brush-preview 영역 고정 */
    width: 100%;   /* 20%안에서 채움 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 원이 preview 벗어나도 숨김 */
    position: relative;
}

#brush-preview-circle {
    width: 12px; /* 초기 */
    height: 12px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute; /* 원을 중앙 배치 */
}

#color-drawing #homeButton {
    background-image: url('/assets/view/images/icon/back.png');
    width: 150px;
}

@media screen and (max-width: 768px) {
    #color-drawing  {
        padding: 0 10px;
    }

    #color-drawing .container {
        width: 96%;
        height: 100%;
    }

    #color-drawing .image-selector, #drawing-section {
        width: 96% !important;
        padding: 15px;
        box-sizing: border-box;
    }

    #color-drawing .carousel-image-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 300px;
        display: flex
    ;
        justify-content: center;
        align-items: center;
    }

    #color-drawing .carousel-arrow {
        width: 40px;
        height: 40px;
        margin: 10px 0;
    }

    #color-drawing  .drawing-container {
        flex-direction: column;
        align-items: center;
    }

    #color-drawing .canvas-container {
        width: 100%;
        max-width: 100%;
    }

    #color-drawing canvas {
        max-width: 100%;
        height: auto;
    }

    #color-drawing .color-palette-container {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
    }

    #color-drawing .color-row {
        justify-content: left;
        gap: 10px;
    }

    #color-drawing .color-item {
        width: 50px;
        height: 80px;
    }

    #color-drawing .buttons-container {
        flex-wrap: wrap;
        gap: 10px;
    }


    #color-drawing .close-button {
        top: 3px;
        width: 30px;
        height: 30px;
    }

    #color-drawing .confirm-button {
        top: 3px;
        width: 30px;
        height: 30px;
    }

    #color-drawing .palette-title {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    #color-drawing .carousel-image-container {
        max-height: 200px;
    }

    #color-drawing .color-item {
        width: 20px;
        height: 40px;
    }

    #color-drawing .buttons-container button {
        font-size: 12px;
        padding: 6px 10px;
    }
    #color-drawing .image-button {
        width: 30px;
        height: 30px;
    }

    #homeButton{
        width:90px;
    }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
    #color-drawing  {
        overflow-x: hidden;
    }

    #color-drawing .container {
        width: 97%;
        max-width: 100%;
        padding: 0 10px;
    }

    #color-drawing .drawing-container {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        height: 60vh;
        max-height: 90vh;
        overflow: hidden;
    }

    #color-drawing .image-button {
        width: 40px;
        height: 40px;
    }

    #homeButton{
        width:100px;
    }
    #color-drawing .confirm-button {
        width: 40px;
        height: 40px;
    }

    #color-drawing .canvas-container {
        flex: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 50%;
        padding: 10px;
    }

    #color-drawing  canvas {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    #color-drawing  .color-palette-container {
        flex: 1;
        max-width: 40%;
        margin-left: 10px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #color-drawing  .color-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
        gap: 5px;
        margin-bottom: 10px;
    }

    #color-drawing  .color-item {
        width: 20px;
        height: 40px;
        margin: 2px;
    }

    #color-drawing .buttons-container {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }

    #color-drawing .buttons-container button {
        padding: 6px 10px;
        font-size: 12px;
    }
}
@media screen and (max-width: 640px) {
    #brush-preview {
        height: 60px; /* 모바일에서 고정 높이 지정 */
    }
}
@media screen and (max-width: 640px) and (orientation: landscape) {
    #color-drawing .color-item {
        width: 30px;
        height: 45px;
    }

    #color-drawing .buttons-container button {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media screen and (max-width: 768px) {
    #color-drawing .carousel-image-container {
        width: 100%;
        max-width: 100%;
        height: 300px;
        max-height: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #color-drawing .preview-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

@media screen and (max-width: 480px) {
    #color-drawing  .carousel-image-container {
        height: 200px;
        max-height: 200px;
    }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
    #color-drawing  .image-selector {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        height: 90vh;
        max-height: 90vh;
        box-sizing: border-box;
    }

    #color-drawing .image-carousel {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 70%;
        height: 100%;
    }

    #color-drawing  .carousel-arrow {
        width: 50px;
        height: 50px;
        margin: 0 10px;
    }

    #color-drawing .carousel-image-container {
        flex: 1;
        width: auto;
        height: 80%;
        max-height: 80%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #color-drawing .preview-image {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    #color-drawing .image-counter {
        margin: 10px 0;
        font-size: 14px;
    }

    #color-drawing  .confirm-button {
        margin-right: 5px;
        width: 40px;
        height: 40px;
    }

    #color-drawing .close-button {
        position: absolute;
        top: 10px;
        right: 20px;
        width: 40px;
        height: 40px;
    }


}


