/* Main container */
.wpd-gradient-generator {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Preview area */
.wpd-gradient-preview {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Controls section */
.wpd-controls {
    display: grid;
    gap: 2rem;
}

/* Type selector */
.wpd-type-selector {
    display: flex;
    gap: 1rem;
}

.wpd-type-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.wpd-type-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Color stops */
.wpd-color-stops {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wpd-stops-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wpd-color-stop {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
}

.wpd-color-stop input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}

.wpd-color-stop input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
}

.wpd-color-stop input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.wpd-stop-position {
    min-width: 4rem;
    color: #4b5563;
    font-size: 14px;
}

.wpd-remove-stop {
    padding: 0.25rem 0.5rem;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.wpd-add-stop {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 500;
}

/* Direction controls */
.wpd-direction-controls {
    width: 100%;
}

.wpd-direction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
}

.wpd-direction-grid button {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.wpd-direction-grid button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Angle control */
.wpd-angle-control {
    margin-top: 1rem;
}

.wpd-angle-control label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4b5563;
    font-size: 14px;
}

.wpd-angle-control input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
}

.wpd-angle-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

/* Presets */
.wpd-presets {
    margin-top: 2rem;
}

.wpd-presets h3 {
    margin-bottom: 1rem;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.wpd-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.wpd-preset {
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wpd-preset:hover {
    transform: scale(1.05);
}

/* CSS Output */
.wpd-code {
    margin-top: 2rem;
}

.wpd-css-output {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
}

.wpd-copy-css {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

/* Preview Section */
.wpd-previews {
    margin-top: 2rem;
}

.wpd-previews h3 {
    margin-bottom: 1rem;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.wpd-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.wpd-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.wpd-preview-item span {
    font-size: 14px;
    color: #4b5563;
}

.wpd-preview-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
}

.wpd-preview-card {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpd-preview-text {
    font-size: 24px;
    font-weight: bold;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin: 0;
}