/* Custom styles for the color recognition tool - v2.1 */

/* Header collapse functionality */
.hero-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

.hero-section.collapsed {
    max-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
}

.header-toggle-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    backdrop-filter: blur(10px);
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

.header-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05) !important;
}

/* Clean Navigation Bar without black background */
.navbar {
    background: transparent !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0 !important;
    min-height: 50px !important;
}

.navbar-brand {
    font-size: 1.1rem !important;
    padding: 0.25rem 0.75rem !important;
    color: white !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    margin: 0 0.25rem !important;
    transition: all 0.3s ease !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.navbar-nav .nav-link.active {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #6366f1 !important;
}

.dropdown-menu {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
}

/* Enhanced color preview with glassmorphism */
.color-preview {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.color-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.color-preview:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Canvas styling */
#imageCanvas {
    max-width: 100%;
    cursor: crosshair;
    background-color: var(--bs-dark);
}

/* Enhanced color picker styling */
#colorPicker {
    width: 100%;
    height: 50px;
    padding: 0;
    background-color: transparent;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#colorPicker:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

#colorPicker:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(86, 61, 124, 0.3);
}

/* Make the canvas container responsive */
#canvasContainer {
    max-width: 100%;
    overflow: auto;
}

/* Enhanced button styling */
.btn {
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Sidebar toggle functionality */
#sidebarContainer {
    transition: all 0.3s ease-in-out;
}

#toggleSidebar {
    border: 1px solid var(--bs-secondary);
    background: var(--bs-dark);
    color: var(--bs-light);
    transition: all 0.2s ease;
}

#toggleSidebar:hover {
    background: var(--bs-secondary);
    color: var(--bs-dark);
}

/* Main content responsiveness */
#mainContent {
    transition: all 0.3s ease-in-out;
}

/* Enhanced saved color item styling */
.color-item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.color-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.color-item:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* Enhanced color swatch */
.color-swatch {
    width: 100%;
    height: 60px;
    border-radius: 8px 8px 0 0;
    position: relative;
    overflow: hidden;
}

.color-swatch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.color-details {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.color-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
    display: block;
}

.color-code {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Enhanced card styling */
.card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-title {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

/* Enhanced form controls */
.form-control {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Enhanced input groups */
.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Enhanced navigation bar */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Enhanced page header */
.lead {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
}

/* Floating animation for icons */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.fas {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for interactive elements */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.btn-primary:focus {
    animation: pulse 1.5s infinite;
}

/* Enhanced canvas styling */
#imageCanvas {
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#imageCanvas:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Enhanced dominant colors display */
.dominant-color {
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dominant-color:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.dominant-color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.dominant-color:hover .dominant-color-info {
    transform: translateY(0);
}

/* Enhanced toast styling */
.toast {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Loading state animations */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Enhanced hero section */
.hero-background {
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.1), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1), transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05), transparent 70%);
    filter: blur(60px);
    z-index: -1;
    animation: pulse-bg 8s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: float-complex 6s ease-in-out infinite;
}

.orb-1 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.1));
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.1));
    top: 20%;
    right: 15%;
    animation-delay: -2s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.05));
    bottom: 10%;
    left: 20%;
    animation-delay: -4s;
}

@keyframes float-complex {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-15px) translateX(10px) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-5px) translateX(-15px) rotate(180deg);
        opacity: 0.4;
    }
    75% { 
        transform: translateY(-20px) translateX(5px) rotate(270deg);
        opacity: 0.9;
    }
}

/* Enhanced responsive typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem !important;
        letter-spacing: 1px !important;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .floating-orb {
        display: none;
    }
}

/* Enhanced focus states for better accessibility */
.enhanced-focus-ring:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2);
    transform: scale(1.02);
}

/* Smooth animations for better performance */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Enhanced Premium Page Styles */
.premium-crown {
    font-size: 4rem;
    animation: crown-float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 193, 7, 0.4));
}

@keyframes crown-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.premium-crown-animation {
    position: relative;
    z-index: 2;
}

/* Enhanced Pricing Cards */
.pricing-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.pricing-card-yearly {
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.pricing-card-lifetime {
    border: 2px solid rgba(255, 193, 7, 0.3);
    margin-top: 2rem;
}

/* Ensure the parent column allows overflow for the badge */
.pricing-card-lifetime {
    overflow: visible !important;
}

.col-md-6:has(.pricing-card-lifetime) {
    overflow: visible;
    position: relative;
}

/* Ensure the pricing cards row has proper spacing */
.row:has(.pricing-card-lifetime) {
    overflow: visible;
    padding-top: 2rem;
}

.pricing-card-lifetime .card-body {
    padding-top: 2.5rem !important;
}

.premium-badge {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    min-width: 120px;
    white-space: nowrap;
}

/* Ensure equal height cards */
.pricing-card {
    display: flex;
    flex-direction: column;
}

.pricing-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.pricing-card-glow-premium {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 193, 7, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.pricing-card:hover .pricing-card-glow,
.pricing-card:hover .pricing-card-glow-premium {
    opacity: 1;
}

.pricing-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.premium-icon-wrapper {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.pricing-icon {
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.premium-icon {
    animation: premium-pulse 2s ease-in-out infinite;
}

@keyframes premium-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.price-highlight {
    background: linear-gradient(135deg, currentColor, currentColor);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

.price-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    border-radius: 2px;
}

.pricing-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.button-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.pricing-button:hover .button-shimmer {
    left: 100%;
}

.premium-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.8px;
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
    animation: badge-glow 2s ease-in-out infinite alternate;
    border: 2px solid #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color: #000000 !important;
    padding: 0.6rem 1.2rem !important;
}

@keyframes badge-glow {
    0% { 
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
        transform: translateX(-50%) scale(1);
    }
    100% { 
        box-shadow: 0 8px 30px rgba(251, 191, 36, 0.8);
        transform: translateX(-50%) scale(1.05);
    }
}

/* Enhanced Features Section */
.features-card {
    position: relative;
    overflow: hidden;
}

.features-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

.feature-icon-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-icon-wrapper:hover {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    transition: all 0.3s ease;
}

.feature-icon-wrapper:hover .feature-icon {
    transform: scale(1.1);
}

.feature-description {
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.feature-icon-wrapper:hover + h5 + .feature-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive enhancements for premium page */
@media (max-width: 768px) {
    .premium-crown {
        font-size: 3rem;
    }
    
    .pricing-card {
        margin-bottom: 2rem;
    }
    
    .pricing-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .pricing-icon {
        font-size: 2rem;
    }
    
    .feature-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Enhanced Palette Generator Page Styles */
.palette-magic-icon {
    animation: magic-wand 4s ease-in-out infinite;
}

@keyframes magic-wand {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.05); }
    50% { transform: rotate(-5deg) scale(1.1); }
    75% { transform: rotate(3deg) scale(1.05); }
}

.palette-sparkle-icon {
    animation: sparkle-twinkle 2s ease-in-out infinite alternate;
}

@keyframes sparkle-twinkle {
    0% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    100% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

.premium-badge-text {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: premium-shine 3s ease-in-out infinite;
}

@keyframes premium-shine {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Specific orbs for palette generator */
.orb-palette-1 {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.3), rgba(244, 63, 94, 0.1));
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.orb-palette-2 {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1));
    top: 25%;
    right: 20%;
    animation-delay: -1.5s;
}

.orb-palette-3 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), rgba(168, 85, 247, 0.1));
    bottom: 20%;
    left: 25%;
    animation-delay: -3s;
}

/* Enhanced harmony options */
.harmony-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 16px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.harmony-option:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.harmony-option.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.harmony-preview {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.harmony-option:hover .harmony-preview {
    transform: scale(1.05);
}

.harmony-color {
    transition: all 0.3s ease;
}

.harmony-option:hover .harmony-color {
    transform: skew(-2deg);
}

/* Enhanced color preview */
.color-preview {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.color-preview:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced generated palette */
.generated-palette {
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.generated-palette:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.palette-color {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.palette-color:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.palette-color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.palette-color:hover .palette-color-info {
    transform: translateY(0);
}

/* Enhanced save/export buttons */
.action-buttons .btn {
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.action-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-buttons .btn:hover::before {
    left: 100%;
}

/* Enhanced saved palettes section */
.saved-palette {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.saved-palette:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.saved-palette-colors {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.saved-palette-color {
    transition: transform 0.3s ease;
}

.saved-palette:hover .saved-palette-color {
    transform: scale(1.05);
}

/* Loading and shimmer effects for palette generator */
.palette-loading {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes palette-generate {
    0% { opacity: 0; transform: scale(0.8) rotateX(90deg); }
    100% { opacity: 1; transform: scale(1) rotateX(0deg); }
}

.palette-generate-animation {
    animation: palette-generate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.color-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch {
    height: 80px;
    width: 100%;
}

.color-details {
    padding: 8px;
    background-color: var(--bs-gray-800);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
}

.color-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.color-code {
    opacity: 0.8;
}

/* Dominant colors styling */
.dominant-color {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dominant-color:hover {
    transform: scale(1.1);
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dominant-color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 2px 4px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dominant-color:hover .dominant-color-info {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-preview {
        width: 80px;
        height: 80px;
    }
    
    .color-swatch {
        height: 60px;
    }
    
    .dominant-color {
        width: 50px;
        height: 50px;
    }
}

/* Gradient button for premium styling */
.btn-gradient {
    background: linear-gradient(45deg, #fbbf24, #f59e0b) !important;
    border: none !important;
    color: #000 !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #f59e0b, #fbbf24) !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4) !important;
}

.btn-gradient:focus,
.btn-gradient:active {
    background: linear-gradient(45deg, #f59e0b, #fbbf24) !important;
    color: #000 !important;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4) !important;
}

/* Color History Styles */
.color-history-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.color-history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.color-history-item .color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-right: 8px;
    flex-shrink: 0;
}

.color-history-item .color-details {
    flex: 1;
    min-width: 0;
}

.color-history-item .color-name {
    display: block;
    font-weight: 500;
    color: #fff;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-history-item .color-code {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    font-family: monospace;
}

.color-history-item .color-source {
    display: block;
    font-size: 0.6rem;
    color: #6b7280;
    margin-top: 2px;
}

.color-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.color-history-item:hover .color-actions {
    opacity: 1;
}

.color-actions .btn {
    padding: 2px 6px;
    font-size: 0.7rem;
}

/* History panel styling */
#colorHistoryPanel {
    max-height: 400px;
    overflow-y: auto;
}

#colorHistoryPanel .card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#colorHistoryList {
    max-height: 300px;
    overflow-y: auto;
}

/* Scrollbar styling for history list */
#colorHistoryList::-webkit-scrollbar {
    width: 4px;
}

#colorHistoryList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

#colorHistoryList::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#colorHistoryList::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Color Harmony Styles */
.harmony-palette .color-harmony-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.harmony-palette .color-harmony-item:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.harmony-palette .color-harmony-item .color-info {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.harmony-palette .color-harmony-item:hover .color-info {
    opacity: 1;
}

.btn-group .btn {
    font-size: 0.9rem;
    border-radius: 6px;
    margin: 2px;
    white-space: nowrap;
}

.harmony-description .alert {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.05));
    border-left: 4px solid var(--bs-info);
}

.harmony-palette {
    min-height: 120px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column !important;
    }
    
    .btn-group .btn {
        border-radius: 6px !important;
        margin: 2px 0 !important;
    }
    
    .harmony-palette .color-harmony-item {
        width: 60px;
        height: 60px;
    }
}
