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

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.description {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

.gradient-container {
    display: flex;
    gap: 40px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls-section {
    flex: 1;
    min-width: 300px;
}

.preview-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    margin-bottom: 24px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.control-group h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

select, input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.color-picker input[type="text"] {
    flex: 1;
}

.opacity-slider {
    margin-top: 10px;
}

.opacity-slider label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.opacity-slider input[type="range"] {
    width: 100%;
    margin: 0;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.preset-btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #e0e0e0;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.action-buttons button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: #3498db;
    color: white;
    grid-column: span 2;
}

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

.secondary-btn {
    background: #2ecc71;
    color: white;
}

.secondary-btn:hover {
    background: #27ae60;
}

.reset-btn {
    background: #e74c3c;
    color: white;
}

.reset-btn:hover {
    background: #c0392b;
}

.gradient-preview {
    height: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 背景将通过JavaScript动态设置 */
}

.code-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.code-section h3 {
    margin: 0 0 15px 0;
    color: #333;
}

#cssCode {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap;
    margin-bottom: 15px;
}

.code-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.prefix-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prefix-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.copy-download {
    display: flex;
    gap: 10px;
}

.copy-btn, .download-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.copy-btn:hover, .download-btn:hover {
    background: #e0e0e0;
}

.image-size-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.image-size-controls input {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gradient-container {
        flex-direction: column;
    }

    .controls-section {
        min-width: auto;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .primary-btn {
        grid-column: auto;
    }
}