* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#editor-container {
    display: flex;
    width: 95%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    height: 90vh;
    transition: transform 0.3s ease;
}

#editor-container:hover {
    transform: translateY(-5px);
}

#sidebar {
    width: 400px;
    padding: 25px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.input-group {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

input[type="file"],
input[type="text"],
input[type="number"],
input[type="range"] {
    padding: 12px;
    border: 1px solid #34495e;
    border-radius: 5px;
    background: #ecf0f1;
    width: 100%;
    background-color: #faf9f0;
    font-size: 14px;
}

.section {
    margin-bottom: 15px;
}

.section-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: left;
}

.section-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.section-content {
    display: none;
    margin-top: 10px;
}

.section-content.active {
    display: block;
}

.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.controls label {
    font-size: 12px;
    color: #bdc3c7;
}

.controls input {
    width: 100%;
    accent-color: #3498db;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.buttons button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#image-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

#canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

@media (max-width: 768px) {
    #editor-container {
        flex-direction: column;
        height: auto;
        margin: 20px 0;
    }

    #sidebar {
        width: 100%;
        height: auto;
    }

    #image-area {
        height: 60vh;
        padding: 10px;
    }

    .buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}