/* Custom styles for FoodieLog */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #FEF7ED;
}

/* Smooth transitions for all interactive elements */
button, input, textarea {
    transition: all 0.2s ease-in-out;
}

/* Focus states for accessibility */
input:focus, textarea:focus, button:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .flex-col.md\:flex-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Loading animation for food images */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Star rating hover effects */
.star-rating button:hover {
    transform: scale(1.1);
}

/* Form validation styles */
.error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Success animations */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: success 0.3s ease-in-out;
}

/* Custom gradient for header */
.header-gradient {
    background: linear-gradient(135deg, #FB923C 0%, #8B5CF6 100%);
}

/* Card hover effects */
.memory-card {
    transition: all 0.3s ease;
}

.memory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Tag animations */
.tag {
    transition: all 0.2s ease;
}

.tag:hover {
    transform: scale(1.05);
}

/* Modal backdrop blur effect */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8B5CF6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
}