/* Additional custom styles for Grow a Garden landing page */

/* Enhanced gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 25%, #86efac 50%, #4ade80 75%, #22c55e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

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

.card-hover:hover::before {
    left: 100%;
}

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

/* Glowing button effect */
.btn-glow {
    position: relative;
    overflow: hidden;
}

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

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

/* Loading animations */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Pulse glow effect */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.8), 0 0 30px rgba(74, 222, 128, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
    }
}

.animate-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Rarity-specific glows */
.rarity-common { border: 2px solid #9ca3af; box-shadow: 0 0 10px rgba(156, 163, 175, 0.3); }
.rarity-uncommon { border: 2px solid #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.rarity-rare { border: 2px solid #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }
.rarity-epic { border: 2px solid #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
.rarity-legendary { border: 2px solid #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
.rarity-mythical { border: 2px solid #ec4899; box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); }
.rarity-divine { border: 2px solid #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }

/* Responsive improvements */
@media (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .animate-float {
        animation-duration: 6s;
    }

    /* Mobile-specific improvements */
    .gradient-bg {
        background-attachment: scroll;
    }

    /* Better touch targets */
    .category-tab {
        min-height: 44px;
        min-width: 80px;
    }

    /* Improved text readability */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .text-3xl {
        font-size: 1.75rem;
        line-height: 2rem;
    }

    .text-4xl {
        font-size: 2rem;
        line-height: 2.25rem;
    }

    /* Smaller cards for very small screens */
    #items-container {
        gap: 0.5rem;
    }

    .card-hover {
        min-height: 180px;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #4ade80;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Enhanced SweetAlert2 styling */
.swal2-popup {
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.swal2-title {
    color: #166534 !important;
    font-weight: 700 !important;
}

.swal2-confirm {
    background-color: #4ade80 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm:hover {
    background-color: #22c55e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3) !important;
}

.swal2-cancel {
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
}

/* Progress bar animation */
@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-bar {
    animation: progressFill 3s ease-out forwards;
}

/* Particle effect background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced category tabs */
.category-tab {
    position: relative;
    overflow: hidden;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Item card enhancements */
.item-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
}

/* Testimonial cards */
.testimonial-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Footer enhancements */
footer {
    background: linear-gradient(135deg, #166534, #14532d);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(74, 222, 128, 0.3);
    border-radius: 50%;
    border-top: 3px solid #4ade80;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom SweetAlert button styling */
.swal2-confirm-custom {
    background: linear-gradient(45deg, #10b981, #059669) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm-custom:hover {
    background: linear-gradient(45deg, #059669, #047857) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6) !important;
}

/* Pulse animation for urgent elements */
@keyframes urgentPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.urgent-pulse {
    animation: urgentPulse 2s infinite;
}

/* Scarcity indicator */
.scarcity-indicator {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    animation: urgentPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
