
.tools-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: none;
    background: transparent;
}


.tool-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tool-btn:hover {
    background: #e9ecef;
}

.tool-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.color-picker {
    display: flex;
    gap: 4px;
    align-items: center;
}

.color-btn {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-btn:hover,
.color-btn.active {
    border-color: #007bff;
    transform: scale(1.1);
}

#custom-color {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

#brush-size {
    width: 80px;
}

#download-btn {
    background: #28a745;
}

#download-btn:hover {
    background: #218838;
}

.text-controls {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: none;
}

#text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 16px;
}

#font-size {
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

#add-text-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.canvas-container {
    text-align: center;  
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    background: repeating-conic-gradient(rgba(30, 33, 48, .6) 0 25%, rgba(37, 40, 55, .6) 0 50%) 50% / 20px 20px;
    touch-action: none;
}

#canvas { 
    border-radius: 4px;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

#canvas.text-mode {
    cursor: text;
}

.canvas-text-input {
    font-family: Arial, sans-serif;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    touch-action: manipulation;
}

.canvas-text-input:focus {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .tools-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .tool-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .text-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #text-input {
        margin-bottom: 10px;
    }
}
   