* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.upload-content p {
    font-size: 1.2rem;
    color: #555;
    margin: 0;
}

.upload-content small {
    color: #999;
    font-size: 0.9rem;
}

.gradient-selector {
    margin-bottom: 30px;
}

.gradient-selector h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.gradient-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.gradient-option {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.gradient-option:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gradient-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

.gradient-option:nth-child(1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-option:nth-child(2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gradient-option:nth-child(3) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gradient-option:nth-child(4) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.gradient-option:nth-child(5) { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gradient-option:nth-child(6) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.gradient-option:nth-child(7) { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.gradient-option:nth-child(8) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

.preview-area {
    margin-top: 30px;
}

.preview-area h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

#canvas {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

#newImageBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.3);
}

#newImageBtn:hover {
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .gradient-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gradient-option {
        width: 60px;
        height: 60px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 250px;
    }
}