/* CSS Gradient Generator Custom Styles */

/* Gradient Type Button Active State */
.gradient-type-btn {
    transition: all 0.2s ease;
    user-select: none;
    cursor: pointer;
}

.gradient-type-btn[data-active="true"] {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
    color: #1d4ed8;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.gradient-type-btn[data-active="true"] .text-gray-700 {
    color: #1d4ed8 !important;
}

.gradient-type-btn[data-active="true"] .text-gray-500 {
    color: #3b82f6 !important;
}

.gradient-type-btn:hover:not([data-active="true"]) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Preset Button Styles */
.preset-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preset-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.preset-btn:active {
    transform: translateY(0) scale(0.98);
}

.preset-btn span {
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.preset-btn:hover span {
    background-color: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}

/* Preset Grid Scroll */
.preset-grid {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.preset-grid::-webkit-scrollbar {
    width: 6px;
}

.preset-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.preset-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.preset-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Variation Button Styles */
.variation-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.variation-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.variation-btn:active {
    transform: translateY(0) scale(0.98);
}

.variation-btn span {
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.variation-btn:hover span {
    background-color: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}

/* Quick Actions Section */
.quick-actions-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.quick-actions-section h3 {
    color: #1e293b;
    font-weight: 600;
}

.quick-actions-section button {
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.quick-actions-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Color Stop Animations */
.color-stop {
    transition: all 0.3s ease;
}

.color-stop:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Color Preview Hover Effect */
.color-preview {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-preview::after {
    content: "🎨";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.color-preview:hover::after {
    opacity: 1;
}

/* Preview Size Button Active State */
.preview-size-btn[data-active="true"] {
    border-color: #3b82f6;
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Export Format Button Active State */
.export-format-btn.border-blue-500 {
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Gradient Preview Enhancements */
#gradientPreview {
    position: relative;
    overflow: hidden;
}

#gradientPreview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f8f9fa 75%), linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
    z-index: -1;
}

/* Preset Button Hover Effects */
.preset-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preset-btn:hover::before {
    opacity: 1;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Variation Button Effects */
.variation-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.variation-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.variation-btn:hover::before {
    opacity: 1;
}

.variation-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Slider Customizations */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    transition: background 0.3s ease;
}

input[type="range"]:hover {
    background: #d1d5db;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Position Slider Special Styling for Color Stops */
.position-slider {
    background: linear-gradient(90deg, #ef4444 0%, #eab308 25%, #22c55e 50%, #3b82f6 75%, #8b5cf6 100%);
}

/* Remove Button Hover Effect */
.remove-color {
    transition: all 0.2s ease;
    border-radius: 6px;
}

.remove-color:hover {
    background-color: #fef2f2;
    transform: scale(1.1);
}

/* CSS Output Code Block */
#cssOutput {
    transition: all 0.3s ease;
}

#cssOutput:hover {
    background-color: #1f2937;
}

/* Loading Animation Enhancement */
@keyframes pulse-gradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.loading-gradient {
    background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #06b6d4, #10b981);
    background-size: 400% 400%;
    animation: pulse-gradient 2s ease-in-out infinite;
}

/* Notification Slide Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-enter {
    animation: slideInRight 0.3s ease-out;
}

/* Button Hover Effects */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Focus States for Accessibility */
input:focus,
select:focus,
button:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-opacity: 0.5;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .color-stop {
        flex-direction: column;
        align-items: stretch;
    }

    .color-stop .flex-1 {
        width: 100%;
    }

    .color-preview {
        width: 100%;
        height: 48px;
        margin-bottom: 12px;
    }

    #gradientPreview {
        height: 200px !important;
    }
}

/* Advanced Features Grid */
.advanced-feature {
    transition: all 0.3s ease;
}

.advanced-feature:hover {
    transform: translateY(-4px);
}

.advanced-feature .feature-icon {
    transition: all 0.3s ease;
}

.advanced-feature:hover .feature-icon {
    transform: scale(1.1);
}

/* Smooth scrolling for internal navigation */
html {
    scroll-behavior: smooth;
}

/* Copy success feedback */
@keyframes copySuccess {
    0% {
        background-color: #10b981;
    }
    100% {
        background-color: #059669;
    }
}

.copy-success {
    animation: copySuccess 0.3s ease-in-out;
}

/* Fullscreen preview enhancements */
.fullscreen-preview {
    backdrop-filter: blur(10px);
}

.fullscreen-preview .gradient-info {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fullscreen-preview .gradient-info:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
