.gradient-preview {
    height: 300px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #000000;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.gradient-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gradient-preview::after {
    content: 'Click to copy CSS';
    position: absolute;
    bottom: 15px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gradient-preview:hover::after {
    opacity: 1;
}

.color-stops {
    margin-bottom: 20px;
}

.stops-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

/* Gradient Generator Styles */

.gradient-presets-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.gradient-presets-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1em;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.preset-item {
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    border: 2px solid #000000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.preset-name {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preset-item:hover .preset-name {
    opacity: 1;
}

.gradient-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
    align-items: start;
}

.gradient-controls-panel {
    position: sticky;
    top: 20px;
}

.gradient-controls-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.gradient-controls-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1em;
}

.gradient-preview-panel {
    min-height: 400px;
}

.gradient-type-tabs {
    margin-bottom: 15px;
}

.gradient-type-tabs .tab-container {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 4px;
    gap: 2px;
}

.gradient-type-tabs .tab {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    background: transparent;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    color: #666;
    transition: all 0.2s ease;
}

.gradient-type-tabs .tab.active {
    background: white;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gradient-type-tabs .tab:hover {
    background: rgba(255,255,255,0.7);
    color: #333;
}

.color-stop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* NEW: Delete button styles */
.delete-stop {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.delete-stop:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.delete-stop:active {
    transform: scale(0.95);
}

.position-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
}

.position-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.position-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.direction-controls {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.direction-controls label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.angle-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.angle-control .angle-slider {
    flex: 1;
}

.gradient-type-settings {
    margin-top: 20px;
}

.type-settings {
    display: none;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.type-settings.active {
    display: block;
}

.type-settings .setting-group {
    background: transparent;
    padding: 0;
    border: none;
    margin-bottom: 15px;
}

.type-settings .setting-group:last-child {
    margin-bottom: 0;
}

.stop-color {
    width: 35px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.stop-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.stop-color::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.stop-position {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
}

.stop-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.stop-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-control, .btn-random {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-control {
    background: #6c757d;
    color: white;
}

.btn-control:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-random {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-random:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gradient-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.setting-group {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setting-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
}

.setting-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.angle-slider {
    width: 100%;
    margin: 8px 0 4px 0;
    -webkit-appearance: none;
    height: 5px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

.angle-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.angle-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#angleDisplay, #conicAngleDisplay {
    font-weight: 600;
    color: #007bff;
    font-size: 13px;
}

.gradient-tip {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 13px;
    color: #000000;
    line-height: 1.4;
}

.css-output {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.css-output label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.css-output textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: white;
    resize: vertical;
    margin-bottom: 8px;
}

.copy-css {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 13px;
}

.copy-css:hover {
    background: #218838;
    transform: translateY(-1px);
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.copy-notification.show {
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .gradient-main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gradient-controls-panel {
        position: static;
    }
    
    .gradient-preview {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .presets-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .preset-item {
        height: 50px;
    }
    
    .gradient-preview {
        height: 200px;
    }
    
    .stops-container {
        gap: 8px;
    }
    
    .color-stop {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .gradient-presets-section, .gradient-controls-section, .css-output {
        padding: 15px;
    }
    
    .gradient-preview {
        height: 150px;
    }
    
    .presets-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .preset-item {
        height: 40px;
    }
    
    .tab {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Enhanced tab styling */
.tab-container .tab {
    transition: all 0.3s ease;
}

.tab-container .tab:hover {
    transform: translateY(-1px);
}

/* Tab content styling */
.tab-content h2 {
    margin-bottom: 8px;
    color: #333;
    font-size: 1.3em;
}

.tab-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 14px;
}