@media (min-width: 768px) {
    section {
        flex-direction: row;
    }

    div img {
        max-width: 100%;
        height: auto;
    }
}

/* Modern Recipe Display Styles */
.recipe-title {
    font-size: 2rem;
    font-weight: bold;
    color: #f97316;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #fed7aa;
    text-align: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.recipe-meta {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 1rem;
    font-weight: 600;
    color: #9a3412;
    border-left: 4px solid #f97316;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ea580c;
    margin: 2rem 0 1.5rem 0;
    padding: 1rem 0;
    border-bottom: 2px solid #fed7aa;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

.recipe-item {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(254, 215, 170, 0.2);
    border-radius: 0.75rem;
    color: #92400e;
    line-height: 1.7;
    border-left: 3px solid #fdba74;
    transition: all 0.3s ease;
}

.recipe-item:hover {
    background: rgba(254, 215, 170, 0.3);
    transform: translateX(5px);
}

.recipe-step {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(254, 215, 170, 0.3), rgba(253, 186, 116, 0.2));
    border-radius: 1rem;
    border-left: 4px solid #f97316;
    line-height: 1.7;
    color: #92400e;
    position: relative;
    transition: all 0.3s ease;
}

.recipe-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.15);
}

.recipe-text {
    margin: 1rem 0;
    line-height: 1.7;
    color: #a16207;
    font-style: italic;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.75rem;
}

/* Enhanced Animation classes */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Enhanced Loading spinner with modern design */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(234, 88, 12, 0.95));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.loading-content-modern {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    border-radius: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.cooking-animation {
    position: relative;
    margin-bottom: 2rem;
}

.chef-hat {
    font-size: 4rem;
    display: block;
    animation: bounce 2s infinite;
}

.cooking-tools {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.tool {
    font-size: 1.5rem;
    animation: float 2s ease-in-out infinite;
    display: inline-block;
}

.tool:nth-child(1) { animation-delay: 0s; }
.tool:nth-child(2) { animation-delay: 0.5s; }
.tool:nth-child(3) { animation-delay: 1s; }

.loading-spinner {
    position: relative;
    margin: 2rem auto;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    animation-duration: 1s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    animation-duration: 0.6s;
}

.loading-steps {
    text-align: left;
    margin-top: 1.5rem;
}

.step {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    transform: translateX(-10px);
    opacity: 0.5;
}

.step.active {
    color: white;
    transform: translateX(0);
    opacity: 1;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

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

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

/* Compact spacing for recipe sections */
.compact-spacing h1,
.compact-spacing h2,
.compact-spacing h3,
.compact-spacing h4 {
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

.compact-spacing p {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.5 !important;
}

.compact-spacing ul,
.compact-spacing ol {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
}

.compact-spacing li {
    margin-top: 0.2rem !important;
    margin-bottom: 0.2rem !important;
    line-height: 1.4 !important;
}

.compact-spacing .recipe-meta {
    margin: 0.5rem 0 !important;
    padding: 0.75rem !important;
}

.compact-spacing .section-header {
    margin: 0.75rem 0 0.5rem 0 !important;
    padding: 0.5rem 0 !important;
}

.compact-spacing .recipe-item {
    margin: 0.3rem 0 !important;
    padding: 0.4rem 0.75rem !important;
}

.compact-spacing .recipe-step {
    margin: 0.5rem 0 !important;
    padding: 0.75rem 1rem !important;
}

.compact-spacing .recipe-title {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
}

.compact-spacing .recipe-text {
    margin: 0.3rem 0 !important;
    padding: 0.4rem !important;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Voice input button styles */
.voice-button {
    background: linear-gradient(135deg, #f97316, #ea580c);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.voice-button.listening {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.voice-button::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.5s;
}

.voice-button:hover::before {
    left: 100%;
}

/* Toast notification styles */
.toast-notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.toast-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* Image preview styles */
.image-preview-container {
    border: 2px dashed #fed7aa;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(254, 215, 170, 0.1), rgba(255, 255, 255, 0.5));
}

.image-preview-container:hover {
    border-color: #f97316;
    background: linear-gradient(135deg, rgba(254, 215, 170, 0.2), rgba(255, 255, 255, 0.7));
    transform: scale(1.02);
}

/* Enhanced Card styles */
.recipe-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.15);
}

/* Prose styling for recipe content */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3 {
    color: #111827;
    font-weight: 700;
}

.prose strong {
    color: #f97316;
    font-weight: 600;
}

/* Gradient text utilities */
.gradient-text {
    background: linear-gradient(135deg, #f97316, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button hover effects */
.btn-hover-lift {
    transition: all 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626);
}

/* Responsive improvements */
@media (max-width: 640px) {
    .recipe-title {
        font-size: 1.5rem;
    }
    
    .section-header {
        font-size: 1.25rem;
    }
    
    .recipe-step {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .recipe-meta {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .recipe-card {
        padding: 1.5rem;
    }
}

/* Animation delays for staggered effects */
.animation-delay-150 {
    animation-delay: 150ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-450 {
    animation-delay: 450ms;
}

.animation-delay-2000 {
    animation-delay: 2000ms;
}

/* Enhanced hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

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

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

/* Gradient background animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background: linear-gradient(-45deg, #ee7724, #d8363a, #dd3675, #b44593);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Improved button hover effects */
.btn-gradient:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px) scale(1.02);
}

/* Enhanced card hover effects */
.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth transitions for all interactive elements */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states */
.focus-enhanced:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(255 255 255), 0 0 0 4px rgb(249 115 22);
}

/* Loading state animations */
.loading-dots {
    display: inline-block;
}

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

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: orange;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 orange,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 orange,
            .5em 0 0 orange;
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .developer-avatar {
        width: 120px;
        height: 120px;
    }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    .dark-mode-ready {
        background: rgb(17 24 39);
        color: rgb(243 244 246);
    }
}
