/* Main Styles for Purple Colors Tool */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.5;
}

/* Header and Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #8A2BE2;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Color Picker Styles */
#currentColor {
    transition: background-color 0.3s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8A2BE2;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8A2BE2;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Hue slider gradient */
#hueSlider {
    background: linear-gradient(to right, 
        hsl(250, 76%, 53%), 
        hsl(260, 76%, 53%), 
        hsl(270, 76%, 53%), 
        hsl(280, 76%, 53%), 
        hsl(290, 76%, 53%), 
        hsl(300, 76%, 53%)
    );
}

/* Saturation slider gradient */
#saturationSlider {
    background: linear-gradient(to right, 
        hsl(271, 0%, 53%), 
        hsl(271, 100%, 53%)
    );
}

/* Lightness slider gradient */
#lightnessSlider {
    background: linear-gradient(to right, 
        hsl(271, 76%, 0%), 
        hsl(271, 76%, 50%), 
        hsl(271, 76%, 100%)
    );
}

/* Preset color buttons */
.preset-color {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.preset-color:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preset-color:focus {
    outline: none;
    border-color: #8A2BE2;
}

/* Palette colors */
.palette-color {
    transition: transform 0.2s ease;
    cursor: pointer;
    position: relative;
}

.palette-color:hover {
    transform: translateY(-4px);
}

.palette-color:hover::after {
    content: 'Click to select';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* Copy buttons */
.copy-icon {
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.copy-icon:focus {
    outline: none;
}

.copy-icon:hover i {
    color: #8A2BE2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #currentColor {
        height: 120px;
    }
    
    .grid-cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    
    .palette-color {
        height: 24px;
    }
}

/* Footer styles */
footer {
    margin-top: 3rem;
}

/* Animation for color changes */
@keyframes colorPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.color-transition {
    animation: colorPulse 0.3s ease;
}

/* Purple-specific styles */
.text-purple-800 {
    color: #5B21B6;
}

.focus\:ring-purple-500:focus {
    --tw-ring-color: rgba(139, 92, 246, 0.5);
}

/* Shade display styles */
.prose h3 {
    color: #5B21B6;
}

.prose strong {
    color: #6D28D9;
}