/* Container chính */
.wac-coloring-wrapper {
    margin-top: 40px;
    padding: 25px;
    background: #FFFDE7; /* Vàng nh?t kem */
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    /* Áp d?ng Font Roboto */
    font-family: 'Roboto', sans-serif;
    user-select: none; 
    -webkit-user-select: none;
}

.wac-coloring-wrapper h3 {
    color: #FF6B81;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 24px;
}

.wac-instruction {
    color: #777;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 400;
}

/* Layout */
.wac-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
}

/* B?ng màu */
.wac-palette {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #f0f0f0;
    transition: transform 0.2s, border-color 0.2s;
}

.color-swatch.active {
    border-color: #333;
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* Canvas Area */
.wac-canvas-area {
    position: relative;
    background: #fff;
    overflow: hidden;
    max-width: 100%; 
    touch-action: none; 
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
    
    /* CURSOR FIX: S? d?ng ?nh 32x32 chu?n Base64 */
    cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5QsYFh4y5q5x1gAAAjNJREFUWMPt18+LTmEcB/D1nGfmOU+5U2bKkJKs5C4lF664sLBS/gE7WbKwU1YWNlY2lB2bvaOUhR+FpEian2eG8/T4/J7nzIyZx8x46tTz6vN9v9/n+zzP9/t9L/xneI5t2I1d+P5f8R0f8aKq3s9x/j8ALuM6TmI1y7I0DMN4HMe3+I5vVfV+VvFmAhzFSZzGZizLsiRN09A0TSyK4iO+4UNVvZ1VvJ4A53ABp7Eiy7IkTdMwDMOo6/obvuBzVb2ZJbwagPM4j+NYlmVZmqZpGIbRdV18xadZwssBOIuLOI6VLMvSNE3TMAyj67r4jE9V9Wqe8CwAZ3Eep7CcZVmapmmahqqq4hM+VNXLeeJvB+AsLuIkVrIsS9M0TcMwqqqKj/hQVS/miX81AGdwASewKsuylCRJGIbRP49P+FhVr+aJfxmAM7iA41jJsiwlSRKGYYiiKD7iY1W9mid+MgBn8RAncCXLspQkSRiGIYqi+IiPVfVynvjpAJzFQZzA6izLUpIkYRiGKIriIz5U1Yt54l8PwCkcx3GszrIsJUkShmGIoig+4mNVvZwn/m0ATuEwjmM1y7KUJEkYhiGKomg/j4/4WFVv5olfCMApHMRxrMmyLCVJEoZhiKIoPuJjVb2cJ34xAKdwEMexJsuy1H6eKIriIz5W1at54pcDcBIHcRSrsixLSZKEYRiiKIqP+FBVL+aJXw7ASRzEUazKsiztF6Gq4iM+VtWreeKXAxD/G78A0e6W1uR+9wUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTEtMjVUMjI6MzA6NTAKKzA3OjAwv5/LrwAAACV0RVYdGRhdGU6bW9kaWZ5ADIwMjEtMTEtMjVUMjI6MzA6NTAKKzA3OjAwK8i/OAAAAABJRU5ErkJggg==') 0 32, crosshair;
}

/* Controls */
.wac-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.control-group {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.brush-control label {
    font-weight: 500;
    color: #555;
}

input[type=range] {
    accent-color: #FF6B81;
    width: 200px;
}

/* Buttons Design */
.wac-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Roboto', sans-serif;
}

.wac-btn:active {
    transform: translateY(3px);
    box-shadow: none;
}

.btn-undo { background: #FFB74D; color: #5D4037; } /* Màu cam Undo */
.btn-undo:hover { background: #FFA726; }

.btn-clear { background: #E57373; color: white; } /* Màu d? Clear */
.btn-clear:hover { background: #EF5350; }

.btn-download { background: #4DB6AC; color: white; } /* Màu xanh Save */
.btn-download:hover { background: #26A69A; }


/* Responsive */
@media (max-width: 768px) {
    .wac-container {
        flex-direction: column;
        align-items: center;
    }
    .wac-palette {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .color-swatch {
        width: 38px;
        height: 38px;
    }
    .wac-btn {
        width: 100%; /* Nút full chi?u r?ng trên mobile cho d? b?m */
        justify-content: center;
    }
}