/* Rose Color Tool CSS */

/* Custom slider styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #f0f0f0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF007F;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF007F;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hover effects for color palette */
.palette-color {
    transition: transform 0.2s;
    position: relative;
}

.palette-color:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.palette-color:active {
    transform: scale(0.98);
}

/* Color sample in table */
.color-sample {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Copy button animations */
.copy-icon {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.copy-icon:hover {
    transform: scale(1.2);
}

.copy-icon:active {
    transform: scale(0.9);
}

/* Preset color buttons */
.preset-color {
    transition: all 0.2s;
    border: 2px solid transparent;
}

.preset-color:hover {
    transform: scale(1.15);
    border: 2px solid white;
}

.preset-color:active {
    transform: scale(0.95);
}

/* Current color display */
#currentColor {
    transition: background-color 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    #currentColor {
        height: 120px;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #FF007F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C71585;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid #FF007F;
    outline-offset: 2px;
}

/* Tooltip styling for preset colors */
.preset-color::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.preset-color:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Enhance text readability */
.text-black {
    color: #333;
}

/* Enhance table hover effect */
.hover\:bg-gray-50:hover {
    background-color: #fff5f8;
}

/* Custom styling for the palette type select */
#palette-type {
    transition: border-color 0.2s;
}

#palette-type:hover {
    border-color: #FF007F;
}

/* Add a subtle rose pattern to the page background */
body.bg-gray-50 {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF007F' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Add a subtle hover effect to the "Explore Other Colors" buttons */
.grid-cols-2 a, .grid-cols-4 a {
    transition: all 0.3s;
}

.grid-cols-2 a:hover, .grid-cols-4 a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header styling */
nav {
    border-bottom: 3px solid #FF007F;
}

/* Footer link hover effect */
footer a:hover {
    color: #FF007F !important;
}

/* Table header styling */
th.bg-gray-50 {
    background-color: #fff5f8;
    border-bottom: 2px solid #FF007F;
}

/* Enhance mobile menu */
#mobile-menu {
    border-top: 1px solid rgba(255, 0, 127, 0.2);
}

/* Add subtle animation to copy success icon */
.fa-check {
    color: #C71585;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Style for the main heading */
h1.text-rose-DEFAULT {
    background: linear-gradient(to right, #FF007F, #C71585);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Add subtle shadow to cards */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(255, 0, 127, 0.05);
}

/* Add hover effect to color variants table rows */
.hover\:bg-gray-50:hover {
    background-color: rgba(255, 0, 127, 0.05);
}

/* Enhance select dropdown */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FF007F' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Add subtle transition to color sample */
.color-sample {
    transition: transform 0.2s;
}

.color-sample:hover {
    transform: scale(1.1);
}

/* Style for code snippets in hex values */
.bg-gray-100 {
    background-color: #fff5f8;
    border: 1px solid rgba(255, 0, 127, 0.1);
}

/* Add subtle animation to page load */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container > * {
    animation: fadeIn 0.5s ease-out forwards;
}

.container > *:nth-child(2) {
    animation-delay: 0.1s;
}

.container > *:nth-child(3) {
    animation-delay: 0.2s;
}

.container > *:nth-child(4) {
    animation-delay: 0.3s;
}

.container > *:nth-child(5) {
    animation-delay: 0.4s;
}

/* Enhance accessibility for color contrast */
.text-gray-600 {
    color: #5a5a5a;
}

/* Add subtle texture to the current color display */
#currentColor {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, transparent 75%, transparent);
    background-size: 4px 4px;
}

/* Improve focus visibility for keyboard navigation */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #DE6FA1;
    outline-offset: 3px;
}

/* Print styles */
@media print {
    nav, footer, .copy-icon, #mobile-menu-button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .shadow-sm {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1a1a1a !important;
    }
    
    .text-black, .text-gray-800 {
        color: #e0e0e0 !important;
    }
    
    .text-gray-600, .text-gray-500 {
        color: #b0b0b0 !important;
    }
    
    .border-gray-200 {
        border-color: #333 !important;
    }
    
    .bg-gray-50 {
        background-color: #111 !important;
    }
    
    .bg-gray-100 {
        background-color: #222 !important;
    }
    
    input[type="range"] {
        background: #333 !important;
    }
    
    .shadow-sm {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhance card transitions */
.bg-white.rounded-lg {
    transition: transform 0.3s, box-shadow 0.3s;
}

.bg-white.rounded-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.1);
}

/* Add rose-themed selection color */
::selection {
    background-color: rgba(255, 0, 127, 0.3);
    color: inherit;
}

/* Enhance table responsiveness */
@media (max-width: 640px) {
    table {
        display: block;
        overflow-x: auto;
    }
    
    th, td {
        white-space: nowrap;
    }
}

/* Add subtle border radius to all elements */
button, input, select, .rounded-md, .color-sample {
    border-radius: 6px !important;
}

/* Improve spacing in mobile view */
@media (max-width: 640px) {
    .p-6 {
        padding: 1rem !important;
    }
    
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
}

/* Add subtle hover effect to the entire page */
.container {
    transition: opacity 0.3s;
}

body:hover .container {
    opacity: 1;
}

body .container {
    opacity: 0.98;
}

/* Add subtle animation to the rose color presets */
.preset-color {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preset-color:nth-child(1) { animation-delay: 0.1s; }
.preset-color:nth-child(2) { animation-delay: 0.2s; }
.preset-color:nth-child(3) { animation-delay: 0.3s; }
.preset-color:nth-child(4) { animation-delay: 0.4s; }
.preset-color:nth-child(5) { animation-delay: 0.5s; }
.preset-color:nth-child(6) { animation-delay: 0.6s; }

/* Add subtle rose-themed scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #FF007F #f5f5f5;
}

/* Enhance form controls */
input, select {
    transition: all 0.3s;
}

input:hover, select:hover {
    border-color: #FF007F;
}

/* Add subtle animation to the page header */
header h1 {
    animation: colorPulse 8s infinite alternate;
}

@keyframes colorPulse {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

h1.text-rose-DEFAULT {
    background-size: 200% 200%;
    background: linear-gradient(90deg, #FF007F, #C71585, #DE6FA1, #FF007F);
}

/* Add subtle rose-themed box shadows */
.shadow-rose {
    box-shadow: 0 4px 6px -1px rgba(255, 0, 127, 0.1), 0 2px 4px -1px rgba(255, 0, 127, 0.06);
}

/* Improve button accessibility */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

button:focus::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}