/* Global theme for AI Headshot Studio */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core palette */
    --primary-blue: #667eea;
    --secondary-purple: #764ba2;
    --secondary-gray: #6c757d;
    --success-green: #17a2b8; /* reused for accents */
    --info-cyan: #0dcaf0;
    --warning-yellow: #ffc107;
    --danger-red: #ff416c;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --premium-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Global Enhancements */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utilities for consistent color/opacity */
.text-white-50 { color: rgba(255,255,255,0.5) !important; }
.text-white-60 { color: rgba(255,255,255,0.6) !important; }
.text-white-75 { color: rgba(255,255,255,0.75) !important; }
.text-white-85 { color: rgba(255,255,255,0.85) !important; }
.border-white-25 { border-color: rgba(255,255,255,0.25) !important; }
.border-white-10 { border-color: rgba(255,255,255,0.10) !important; }

/* Themed sections */
.hero-bg {
    background: linear-gradient(135deg, rgba(15,12,41,0.9) 0%, rgba(48,43,99,0.9) 50%, rgba(36,36,62,0.9) 100%);
    position: relative;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" style="stop-color:%23667eea;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%23764ba2;stop-opacity:0"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)"/><circle cx="800" cy="300" r="100" fill="url(%23a)"/><circle cx="400" cy="700" r="200" fill="url(%23a)"/></svg>') no-repeat center / cover;
    opacity: 0.3;
    z-index: 1;
}

.floating-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.shape { position: absolute; border-radius: 50%; animation: float 8s ease-in-out infinite; }
.shape-1 { width: 80px; height: 80px; background: var(--success-gradient); top: 10%; left: 5%; opacity: .1; animation-delay: 0s; }
.shape-2 { width: 120px; height: 120px; background: var(--warning-gradient); top: 60%; right: 10%; opacity: .08; animation-delay: -3s; }
.shape-3 { width: 60px; height: 60px; background: var(--secondary-gradient); bottom: 20%; left: 20%; opacity: .12; animation-delay: -6s; }
@keyframes float { 0%,100%{transform:translateY(0) rotate(0)} 33%{transform:translateY(-30px) rotate(120deg)} 66%{transform:translateY(15px) rotate(240deg)} }

/* Shared glassmorphism container for consistent styling */
.glass-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

/* Premium card component */
.premium-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card:hover { transform: translateY(-8px); box-shadow: 0 35px 70px rgba(0,0,0,.3); border-color: rgba(255,255,255,0.2); }

.gradient-text {
    background: var(--premium-gradient);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Navbar */
.nav-premium {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}
.nav-link-pill {
    color: #fff !important;
    font-weight: 700;
    border-radius: 999px;
    padding: .5rem 1rem !important;
    background: rgba(255,255,255,0.1);
    transition: all .3s ease;
}
.nav-link-pill:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero Section */
.display-4 { line-height: 1.2; }

.lead { font-size: 1.25rem; font-weight: 300; }

/* Enhanced Cards with More Dynamic Effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    border: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

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

/* Colorful Card Variants */
.card-gradient-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.card-gradient-success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.1));
    border: 1px solid rgba(17, 153, 142, 0.2);
}

.card-gradient-warning {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 171, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.card-gradient-danger {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.1), rgba(255, 75, 43, 0.1));
    border: 1px solid rgba(255, 65, 108, 0.2);
}

/* Pulsing Effect for Special Cards */
.card-pulse {
    animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    }
    50% { 
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    }
}

/* Enhanced Buttons with Haptic Feedback */
.btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 12px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
    border-radius: 16px;
    font-weight: 700;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

/* Gradient Button Styles */
.btn-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    color: white;
}

.btn-gradient-warning {
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    border: none;
    color: white;
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
    color: white;
}

/* Shimmer Effect for Premium Buttons */
.btn-shimmer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    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;
}

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

/* Premium CTA button */
.btn-premium {
    background: var(--premium-gradient);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(250, 112, 154, 0.3);
    z-index: 1;
}
.btn-premium::before {
    content: '';
    position: absolute; inset: 0; left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left .5s;
}
.btn-premium:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(250,112,154,.4); }
.btn-premium:hover::before { left: 100%; }

/* Outline glass button */
.btn-outline-glass { border: 2px solid rgba(255,255,255,0.3) !important; border-radius: 50px !important; backdrop-filter: blur(10px); color: #fff !important; }
.btn-outline-glass:hover { border-color: rgba(255,255,255,0.5) !important; }

.pulse-glow { animation: pulse-glow 2s ease-in-out infinite alternate; }
@keyframes pulse-glow { from { box-shadow: 0 0 20px rgba(250,112,154,.3) } to { box-shadow: 0 0 40px rgba(250,112,154,.6) } }

/* Upload Area Styles */
.upload-area {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    border: 3px dashed rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
}

.upload-area.dragover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

/* Preview Image */
.preview-image {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
    border: 2px solid var(--bs-border-color);
    object-fit: scale-down;
    border-radius: 16px;
}

/* Progress Bars */
.progress {
    height: 0.75rem;
    border-radius: 0.5rem;
}

.progress-bar {
    border-radius: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border {
    border-width: 0.25rem;
}

/* Processing Overlay */
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    color: #fff;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.processing-content {
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
}

/* Glass box panel */
.glass-box { background: rgba(255,255,255,0.08); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 1rem; }

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.alert-info {
    border-left-color: var(--bs-info);
}

.alert-success {
    border-left-color: var(--bs-success);
}

.alert-danger {
    border-left-color: var(--bs-danger);
}

/* Plans / pricing */
.plan-card { position: relative; border-radius: 18px; overflow: hidden; cursor: pointer; }
.plan-card .inner { position: relative; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); padding: 20px; border-radius: 18px; transition: all .25s ease; height: 100%; }
.plan-card:hover .inner { transform: translateY(-6px) scale(1.01); border-color: rgba(255,255,255,0.28); box-shadow: 0 18px 45px rgba(0,0,0,.28); }
.plan-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.plan-card input[type=radio]:checked + .inner { background: linear-gradient(180deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12)); border-color: rgba(255,255,255,0.45); box-shadow: 0 22px 55px rgba(0,0,0,.35), inset 0 0 0 2px rgba(102,126,234,.35); }
.plan-price { font-size: 1.6rem; font-weight: 800; letter-spacing: .2px; }
.plan-meta { font-size: .95rem; opacity: .95; }
.plan-feats { font-size: .9rem; opacity: .9; }
.plan-feats i { color: #a3b1ff; }
.badge-popular { position: absolute; top: 10px; right: 10px; background: linear-gradient(135deg,#ffd700,#ffab00); color: #222; font-weight: 800; border-radius: 999px; padding: 6px 10px; font-size: .72rem; box-shadow: 0 6px 18px rgba(255,171,0,.35); }

/* Soft background helpers */
.soft-info { background: rgba(13,202,240,0.12) !important; border: 1px solid rgba(13,202,240,0.25) !important; }
.soft-success { background: rgba(25,135,84,0.12) !important; border: 1px solid rgba(25,135,84,0.25) !important; }
.soft-warning { background: rgba(255,193,7,0.12) !important; border: 1px solid rgba(255,193,7,0.25) !important; }
.soft-danger { background: rgba(220,53,69,0.12) !important; border: 1px solid rgba(220,53,69,0.25) !important; }

/* Inputs */
.enhanced-input { border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; }
.enhanced-input::placeholder { color: rgba(255,255,255,0.7); }
.enhanced-input:focus { outline: none; border-color: rgba(102,126,234,.65); box-shadow: 0 0 0 4px rgba(102,126,234,.25); background: rgba(255,255,255,0.1); }


/* Badge Styles */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Form Enhancements */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid var(--bs-border-color);
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

/* Mobile Responsiveness & Touch Optimization */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .display-5 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    /* Enhanced touch-friendly buttons */
    .btn-lg {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        min-height: 60px; /* Minimum touch target size */
        border-radius: 30px;
        transition: all 0.2s ease;
    }
    
    .btn-premium {
        padding: 1.5rem 2.5rem;
        font-size: 1.2rem;
        min-height: 70px;
        touch-action: manipulation; /* Prevents double-tap zoom */
    }
    
    /* Touch-optimized upload area */
    .upload-area {
        padding: 3rem 1.5rem;
        min-height: 250px;
        border-width: 4px; /* Thicker border for better visibility */
        touch-action: manipulation;
    }
    
    .preview-image {
        max-height: 250px;
        border-radius: 15px;
    }
    
    /* Mobile-optimized cards */
    .premium-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem !important;
        border-radius: 20px;
    }
    
    /* Touch-friendly plan selection */
    .plan-card {
        margin-bottom: 1rem;
        min-height: 200px;
    }
    
    .plan-card .inner {
        padding: 1.5rem;
        min-height: 180px;
    }
    
    /* Mobile navigation improvements */
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem !important;
        margin: 0.25rem 0;
        border-radius: 15px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    /* Mobile testimonials */
    .testimonial-card {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    /* Mobile pricing cards */
    .card {
        margin-bottom: 2rem;
        border-radius: 20px;
        min-height: 350px;
    }
    
    /* Touch-optimized form elements */
    .form-control, .form-select {
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
        min-height: 50px;
        border-radius: 15px;
        touch-action: manipulation;
    }
    
    /* Mobile-optimized social proof elements */
    .premium-card.d-inline-block {
        padding: 1rem 1.5rem;
        margin: 0.5rem;
        font-size: 1rem;
        min-height: 50px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* Light Mode Enhancements */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
}

[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-bs-theme="light"] .upload-area {
    background: rgba(13, 110, 253, 0.05);
    border: 2px dashed #dee2e6;
}

[data-bs-theme="light"] .upload-area:hover,
[data-bs-theme="light"] .upload-area.dragover {
    background: rgba(13, 110, 253, 0.1);
    border-color: #0d6efd;
}

[data-bs-theme="light"] .bg-dark {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Conversion-Focused Micro-Interactions */
.conversion-pulse {
    animation: conversionPulse 3s ease-in-out infinite;
}

@keyframes conversionPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 112, 154, 0.7);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(250, 112, 154, 0);
    }
}

/* Urgency Indicators */
.urgency-blink {
    animation: urgencyBlink 2s ease-in-out infinite;
}

@keyframes urgencyBlink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.7; }
}

/* Social Proof Counters */
.counter-animate {
    animation: counterUp 0.8s ease-out;
}

@keyframes counterUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Trust Badge Glow */
.trust-glow {
    animation: trustGlow 4s ease-in-out infinite;
}

@keyframes trustGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
}

/* CTA Button Magnetic Effect */
.btn-magnetic {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.btn-magnetic:hover::before {
    width: 300px;
    height: 300px;
}

.btn-magnetic * {
    position: relative;
    z-index: 1;
}

/* Plan Selection Highlight */
.plan-selected {
    animation: planSelected 0.6s ease-out;
}

@keyframes planSelected {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.3);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Scroll Progress Indicator */
.progress-scroll {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #fa709a, #fee140);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9999;
    transition: transform 0.2s ease;
}

/* Floating Action Elements */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    animation: floatingCTA 3s ease-in-out infinite;
}

@keyframes floatingCTA {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Success Celebration Animation */
.celebrate {
    animation: celebrate 1.5s ease-out;
}

@keyframes celebrate {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Interactive Hover States for Trust Elements */
.trust-element {
    transition: all 0.3s ease;
    cursor: pointer;
}

.trust-element:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Mobile-Specific Touch Feedback */
@media (max-width: 768px) {
    .btn:active,
    .plan-card:active,
    .upload-area:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Haptic-style feedback */
    .touch-feedback:active {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(0.95);
    }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--bs-info), #0dcaf0);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #343a40, #495057);
}

.rounded-xl {
    border-radius: 1.5rem !important;
}

.border-3 {
    border-width: 3px !important;
}

/* Enhanced Transform Effects */
.transform-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transform-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Enhanced Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Colorful Text Gradients */
.text-gradient-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-success {
    background: linear-gradient(45deg, #11998e, #38ef7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-warning {
    background: linear-gradient(45deg, #ffd700, #ffab00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-danger {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Gradient Backgrounds */
.card-gradient-primary {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1)) !important;
    border: 1px solid rgba(102,126,234,0.2);
}

.card-gradient-success {
    background: linear-gradient(135deg, rgba(17,153,142,0.1), rgba(56,239,125,0.1)) !important;
    border: 1px solid rgba(17,153,142,0.2);
}

.card-gradient-info {
    background: linear-gradient(135deg, rgba(13,202,240,0.1), rgba(255,193,7,0.1)) !important;
    border: 1px solid rgba(13,202,240,0.2);
}

/* Upload Area Hover Effects */
.upload-area:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.15)) !important;
    border-color: rgba(102,126,234,0.5) !important;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)) !important;
    border-color: rgba(102,126,234,0.7) !important;
    transform: translateY(-2px) scale(1.01);
}

/* Example Image Styling - Consistent display without cropping */
.example-image {
    object-fit: scale-down !important;
    width: 100%;
}

/* Enhanced Button Animations */
.btn:focus {
    box-shadow: none !important;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Dashboard Enhancements */
.order-list { padding-right: 4px; }
.order-item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: all .2s ease;
}
.order-item:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.order-item.active { background: linear-gradient(135deg,#667eea,#764ba2); border-color: transparent; }
.order-thumb { width:56px; height:56px; overflow:hidden; border-radius:10px; flex: 0 0 56px; }
.order-thumb img { width:56px; height:56px; object-fit:cover; display:block; }
.order-actions { position:absolute; right:10px; bottom:10px; display:flex; gap:8px; opacity:0; transition: opacity .2s ease; }
.order-item:hover .order-actions { opacity:1; }
.order-actions .action { color:#fff; opacity:.85; }
.order-actions .action:hover { opacity:1; }
.order-actions .disabled { pointer-events:none; opacity:.4; }

.status-chip { display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:.75rem; padding:6px 10px; border-radius:999px; border:1px solid transparent; color:#fff; }
.chip-success { background: rgba(56,239,125,0.18); border-color: rgba(56,239,125,0.35); }
.chip-warning { background: rgba(255,193,7,0.18); border-color: rgba(255,193,7,0.35); color: #111; }
.chip-danger  { background: rgba(255,75,43,0.18); border-color: rgba(255,75,43,0.35); }
.chip-secondary{ background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); }
.chip-info     { background: rgba(13,202,240,0.18); border-color: rgba(13,202,240,0.35); }

.preview-frame img { max-height: 320px; object-fit: cover; }
.min-w-0 { min-width: 0; }

/* Enhanced Dashboard Styles */
.dashboard-icon {
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border: 1px solid rgba(102,126,234,0.2);
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    z-index: 10;
}

.search-input {
    padding-left: 40px !important;
}

.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.75rem;
    min-width: 60px;
    transition: all 0.2s ease;
}

.stat-chip:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.stat-chip span {
    font-weight: 700;
    font-size: 1rem;
}

.stat-chip small {
    opacity: 0.8;
    font-size: 0.7rem;
}

/* Project Card Styles */
.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.image-overlay:hover .overlay-content {
    transform: translateY(0);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    backdrop-filter: blur(10px);
}

.badge-success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

.project-details {
    background: rgba(255, 255, 255, 0.02);
}

.project-title {
    font-size: 1.1rem;
    line-height: 1.3;
}

.project-date {
    font-size: 0.85rem;
}

.project-stats {
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s ease;
}

.stat-item:hover {
    background: rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 1.2rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-actions {
    padding-top: 16px;
}

/* Enhanced animations */
@keyframes projectCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-card-container {
    animation: projectCardAppear 0.6s ease-out;
    animation-fill-mode: both;
}

.project-card-container:nth-child(1) { animation-delay: 0.1s; }
.project-card-container:nth-child(2) { animation-delay: 0.2s; }
.project-card-container:nth-child(3) { animation-delay: 0.3s; }
.project-card-container:nth-child(4) { animation-delay: 0.4s; }
.project-card-container:nth-child(5) { animation-delay: 0.5s; }
.project-card-container:nth-child(6) { animation-delay: 0.6s; }

/* Empty state styles */
.empty-state-icon {
    padding: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border: 2px solid rgba(102,126,234,0.2);
    display: inline-block;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 768px) {
    .project-image-container {
        height: 150px;
    }
    
    .stat-chip {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .stat-chip span {
        font-size: 0.9rem;
    }
    
    .project-title {
        font-size: 1rem;
    }
    
    .dashboard-icon {
        padding: 8px;
    }
    
    .stats-overview {
        justify-content: center !important;
    }
}

/* Enhanced Result Page Styles */
.result-icon {
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(250,112,154,0.1), rgba(254,225,64,0.1));
    border: 1px solid rgba(250,112,154,0.2);
}

.project-status-icon {
    padding: 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(40,167,69,0.1), rgba(56,239,125,0.1));
    border: 1px solid rgba(40,167,69,0.2);
}

.tier-badge {
    padding: 4px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,193,7,0.2), rgba(255,171,0,0.2));
    border: 1px solid rgba(255,193,7,0.3);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Before/After Comparison Styles */
.comparison-container {
    padding: 20px 0;
}

.comparison-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.comparison-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.comparison-label {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.quality-badge {
    padding: 4px 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(13,202,240,0.2), rgba(0,242,254,0.2));
    border: 1px solid rgba(13,202,240,0.3);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.comparison-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.2);
}

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.comparison-card:hover .comparison-image {
    transform: scale(1.05);
}

.comparison-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.transformation-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}

.arrow-container {
    text-align: center;
    padding: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.arrow-label {
    margin-top: 10px;
}

/* Edit Interface Styles */
.edit-input-container {
    position: relative;
}

.edit-textarea {
    min-height: 100px;
    resize: vertical;
}

.edit-options {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-credits-card {
    padding: 15px;
    border-radius: 12px;
    background: rgba(13,202,240,0.1);
    border: 1px solid rgba(13,202,240,0.2);
}

.quick-edits {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-edit-btn {
    transition: all 0.2s ease;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.quick-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
}

.gallery-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.edited-card {
    border-color: rgba(250, 112, 154, 0.3);
}

.edited-card:hover {
    border-color: rgba(250, 112, 154, 0.5);
}

.gallery-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.selection-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.selection-checkbox input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

.edit-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fa709a, #fee140);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    z-index: 10;
}

.gallery-footer {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Error/Processing States */
.error-state-icon {
    padding: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,193,7,0.1), rgba(255,171,0,0.1));
    border: 2px solid rgba(255,193,7,0.2);
    display: inline-block;
}

/* Mobile Responsiveness for Result Page */
@media (max-width: 768px) {
    .comparison-container .col-lg-2 {
        display: none;
    }
    
    .transformation-arrow {
        min-height: 60px;
        margin: 20px 0;
    }
    
    .arrow-container {
        padding: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .edit-options {
        margin-top: 20px;
    }
    
    .quick-edits .row {
        --bs-gutter-x: 0.5rem;
    }
    
    .gallery-controls {
        justify-content: center;
        margin-top: 15px;
    }
    
    .result-icon {
        padding: 8px;
    }
}

/* Animation enhancements */
@keyframes galleryItemAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-item {
    animation: galleryItemAppear 0.5s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }

/* Enhanced Comparison Modes */
.comparison-toggle .btn-group {
    margin-bottom: 1rem;
}

/* Image Slider Comparison */
.comparison-slider-container {
    margin: 2rem 0;
}

.image-slider-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.image-slider {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.slider-image {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Scope legacy slider styles to its container to avoid conflicts
   with the new .image-comparison-slider used on Examples */
.image-slider .after-image {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
}

.slider-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.5));
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.slider-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.slider-label {
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Overlay Comparison */
.comparison-overlay-container {
    margin: 2rem 0;
}

.overlay-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.overlay-image {
    width: 100%;
    height: auto;
    display: block;
}

.top-image {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.overlay-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.overlay-controls .form-range {
    width: 100%;
}

.overlay-toggle-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Enhanced Gallery Grid Updates */
.gallery-grid.list-view {
    grid-template-columns: 1fr;
}

.gallery-grid.list-view .gallery-item {
    display: flex;
    align-items: center;
}

.gallery-grid.list-view .gallery-card {
    display: flex;
    width: 100%;
    align-items: center;
}

.gallery-grid.list-view .gallery-image-container {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 1rem;
}

.gallery-grid.masonry-view {
    column-count: auto;
    column-width: 280px;
    column-gap: 1.5rem;
}

.gallery-grid.masonry-view .gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* Image Loading States */
.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.gallery-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image.loaded {
    opacity: 1;
}

/* Progressive Loading Placeholder */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Intersection Observer Loading Enhancement */
.gallery-item.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimizations */
.gallery-image {
    will-change: transform;
    backface-visibility: hidden;
}

.comparison-image, .slider-image, .overlay-image {
    will-change: opacity, clip-path;
    backface-visibility: hidden;
}

/* Preload important images */
.comparison-image::before,
.gallery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.07));
    z-index: -1;
}

/* Enhanced Image Info */
.image-info {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-end;
}

.resolution-badge, .file-size {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Image Rating System */
.image-rating {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    padding: 0.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star-btn {
    background: none;
    border: none;
    color: #ffd700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-btn:hover,
.star-btn.active {
    color: #ffed4e;
    transform: scale(1.2);
}

.star-btn.active i {
    font-weight: 900;
}

/* Image Comparison Panel */
.image-comparison-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    padding: 2rem;
    overflow-y: auto;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.comparison-item {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.comparison-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.comparison-item-footer {
    padding: 1rem;
    text-align: center;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .comparison-toggle .btn-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .comparison-toggle .btn {
        flex: 1;
        min-width: 0;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem !important;
    }
    
    .gallery-controls .btn-group {
        justify-content: center;
    }
    
    .gallery-controls .dropdown {
        width: 100%;
    }
    
    .gallery-controls .dropdown .btn {
        width: 100%;
        justify-content: center;
    }
    
    .overlay-controls {
        position: relative;
        margin-top: 1rem;
        left: auto;
        bottom: auto;
        right: auto;
        min-width: auto;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .slider-button {
        width: 35px;
        height: 35px;
    }
    
    .image-comparison-panel {
        padding: 1rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-optimized comparison modes */
    .image-slider-wrapper {
        max-width: 100%;
        margin: 0;
    }
    
    .overlay-wrapper {
        max-width: 100%;
        margin: 0;
    }
    
    /* Touch-friendly action buttons */
    .action-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .overlay-actions {
        gap: 0.75rem;
    }
    
    /* Mobile-optimized rating stars */
    .star-btn {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    /* Improved mobile gallery layout */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 0.75rem;
    }
    
    .gallery-grid.list-view .gallery-image-container {
        width: 100px;
        height: 100px;
    }
    
    /* Mobile-friendly image info */
    .image-info {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .image-rating {
        bottom: 5px;
        left: 5px;
        padding: 0.25rem;
    }
    
    .selection-checkbox {
        top: 5px;
        left: 5px;
    }
    
    /* Mobile modal improvements */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-body img {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .transformation-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 0.5rem;
    }
    
    /* Ultra-compact mode for small screens */
    .premium-card {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }
    
    .comparison-toggle .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .gallery-controls .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .overlay-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .star-btn {
        width: 20px;
        height: 20px;
        font-size: 0.875rem;
    }
    
    .image-info {
        font-size: 0.75rem;
    }
    
    .resolution-badge, .file-size {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .comparison-container .row {
        flex-direction: row !important;
    }
    
    .transformation-arrow {
        transform: none;
        margin: 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .gallery-image, .comparison-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        animation: none;
    }
    
    .gallery-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .placeholder-shimmer {
        animation: none;
    }
    
    .slider-button {
        transition: none;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .image-info {
        background: rgba(0,0,0,0.9);
    }
    
    .image-rating {
        background: rgba(0,0,0,0.9);
    }
    
    .overlay-controls {
        background: rgba(0,0,0,0.9);
    }
}

/* Enhanced Edit Selection Indicators */
.edit-selection-indicator {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 3px solid #ffc107;
    border-radius: 16px;
    pointer-events: none;
    z-index: 15;
    animation: editSelectionPulse 2s ease-in-out infinite;
}

.edit-selection-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ffc107, #ff6b35);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
    z-index: 20;
}

.gallery-card.selected-for-edit {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.2), 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-3px) !important;
}

.edit-image-btn {
    background: linear-gradient(135deg, #ffc107, #ff6b35) !important;
    color: #000 !important;
    font-weight: 700 !important;
    transform: scale(1.1);
    animation: editButtonGlow 2s ease-in-out infinite;
}

@keyframes editSelectionPulse {
    0%, 100% {
        border-color: #ffc107;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        border-color: #ff6b35;
        box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
    }
}

@keyframes editButtonGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
    }
}

/* Enhanced Current Selection Indicator Styling */
#current-selection-indicator .premium-card {
    animation: currentSelectionGlow 3s ease-in-out infinite;
}

@keyframes currentSelectionGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(250, 112, 154, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(250, 112, 154, 0.5);
    }
}
