* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.editor-container {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-container.highlight {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.upload-info {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 400px;
    position: relative;
}

canvas {
    max-width: 100%;
    max-height: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.tools-container {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.tools-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.tool-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tool-group:last-child {
    border-bottom: none;
}

.tool-btn {
    background-color: #ecf0f1;
    border: none;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2c3e50;
}

.tool-btn:hover {
    background-color: #dfe6e9;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn:hover {
    background-color: #2980b9;
}

.download-btn {
    background-color: #27ae60;
    width: 100%;
}

.download-btn:hover {
    background-color: #219653;
}

.slider {
    width: 100%;
    margin: 10px 0;
}

label {
    display: block;
    margin-top: 10px;
    color: #34495e;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.filter-btn {
    background-color: #ecf0f1;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2c3e50;
}

.filter-btn:hover {
    background-color: #dfe6e9;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

/* Crop tool styles */
.crop-container {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10;
    overflow: hidden;
}

.crop-area {
    position: absolute;
    border: 2px dashed white;
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    background-color: transparent;
    z-index: 11;
}

.crop-handle {
    width: 10px;
    height: 10px;
    background-color: white;
    position: absolute;
    z-index: 12;
}

.crop-handle.tl {
    top: -5px;
    left: -5px;
    cursor: nwse-resize;
}

.crop-handle.tr {
    top: -5px;
    right: -5px;
    cursor: nesw-resize;
}

.crop-handle.bl {
    bottom: -5px;
    left: -5px;
    cursor: nesw-resize;
}

.crop-handle.br {
    bottom: -5px;
    right: -5px;
    cursor: nwse-resize;
}

.crop-actions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 13;
}

/* Responsive styles */
@media (max-width: 768px) {
    .editor-container {
        padding: 10px;
    }
    
    .tool-btn, .filter-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .canvas-container {
        min-height: 300px;
    }
}
