/* Recipe card styles */
.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recipe-image-container {
    position: relative;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.recipe-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.recipe-image-watermark {
    position: absolute;
    bottom: 2rem;
    right: 1rem;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    z-index: 2;
    transform: rotate(-5deg);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.85;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #212529;
    line-height: 1.4;
}

.card-text {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-body .recipe-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 0.85em;
}

.card-body .recipe-time .total-time {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-body .recipe-time .total-time::before {
    content: "⏱";
    font-size: 1em;
}

.card-body .recipe-time .difficulty {
    display: inline-flex;
    align-items: center;
    padding: 8px 28px;
    border-radius: 30px;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    text-transform: capitalize;
    color: #a16df0 !important;
    margin-left: auto;
}

.recipe-metadata {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    color: #666;
    font-size: 0.9em;
}

.recipe-metadata span {
    background-color: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    color: #495057;
}

.recipe-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recipe-content {
    padding: 1.5rem;
    background: white;
}

.recipe-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.recipe-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.recipe-meta span {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.prep-time, .difficulty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #777;
    letter-spacing: 0.02em;
    background: none !important;
    padding: 0 !important;
}

.prep-time i, .difficulty i {
    color: var(--primary-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.recipe-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2d3436;
    line-height: 1.4;
}

/* Loading states */
.loading-placeholder {
    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;
    }
}

/* Error states */
.card.error {
    border: 1px solid #dc3545;
}

.card.error .card-title {
    color: #dc3545;
}

/* Recipe details page styles */
#recipe-details {
    max-width: 1200px;
    margin: 0 auto;
}

#recipe-image {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#recipe-title {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
}

/* Recipe sections */
.card-header {
    background-color: #f8f9fa;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-header h3 {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

#recipe-ingredients li,
#recipe-nutrition li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

#recipe-ingredients li:last-child,
#recipe-nutrition li:last-child {
    border-bottom: none;
}

#recipe-instructions li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

#recipe-tips li {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    #recipe-title {
        font-size: 1.5rem;
    }
}