body {
    font-family: sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
}

.profile-container {
    padding: 100px 2rem 2rem 2rem;
    max-width: 1200px;
    width: 90%;
    margin: 2rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.recipe-card-mini {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.recipe-card-mini:hover {
    transform: translateY(-2px);
}

#other-recipes-list {
    list-style: none;
    padding: 0;
}

#other-recipes-list li {
    background-color: #f8f9fa;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

#other-recipes-list li:hover {
    background-color: #e9ecef;
}

/* Fix for recipe actions overlapping tags on profile page */
.recipe-card .recipe-actions {
    position: static;
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}



/* Vertical Stack Layout for Profile Page Recipe Cards */
#featured-recipes-container .recipe-card .recipe-body {
    flex-direction: column;
}

#featured-recipes-container .recipe-card .recipe-image,
#featured-recipes-container .recipe-card .recipe-content {
    width: 100%;
}

#featured-recipes-container .recipe-card .recipe-tags {
    margin-bottom: 1rem;
}

#featured-recipes-container .recipe-card .recipe-image {
    min-height: 250px;
    /* Reducing height slightly for vertical card balance */
    border-radius: 8px 8px 0 0;
    /* Rounded top only */
}

#featured-recipes-container .recipe-card .recipe-image img {
    border-radius: 8px 8px 0 0;
}

/* Author Card Styles */
.author-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.author-info i {
    font-size: 2.5rem;
    color: #6c757d;
}

.author-info span {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

/* Profile Tabs Styling */
.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0px;
    overflow-x: auto;
    /* Handle overflow on small screens */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #ccc transparent;
}

/* Custom Scrollbar for Webkit (Chrome/Safari/Edge) */
.profile-tabs::-webkit-scrollbar {
    height: 6px;
}

.profile-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.profile-tabs::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.profile-tabs::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevent tabs from shrinking */
}

.tab-btn:hover {
    color: var(--primary-color, #2c3e50);
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: var(--primary-color, #2c3e50);
    border-bottom: 3px solid var(--primary-color, #2c3e50);
    background-color: transparent;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .profile-container {
        padding: 80px 1rem 1rem 1rem;
        /* Reduced padding, keeping top for header */
        width: 95%;
        margin-top: 1rem;
    }

    /* Stack Profile Header */
    .profile-header-container>div {
        flex-direction: column;
        text-align: center;
        gap: 1rem !important;
    }

    #profile-bio {
        margin: 0 auto !important;
        /* Center bio */
    }

    #profile-stats {
        justify-content: center;
    }

    /* Adjust Action Buttons */
    .profile-header-container>div>div:last-child {
        margin-left: 0 !important;
        align-items: center !important;
        width: 100%;
        flex-direction: row !important;
        /* Keep buttons side-by-side if they fit, or wrap */
        justify-content: center;
        gap: 1rem;
    }

    /* Tabs Scrolling */
    .profile-tabs {
        justify-content: flex-start;
        /* Align start to allow scrolling */
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* Recipe Grid on Mobile */
    .recipe-grid {
        grid-template-columns: 1fr;
        /* Single column */
    }

    #mutual-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    }
}