body {
    font-family: sans-serif;
    background-color: #f4f4f4;
}

.main {
    padding: 20px;
    margin-top: 64px; /* Reduced from 84px to 64px to remove gap */
    background-color: rgba(255, 255, 255, 0.9); /* 0.9 opacity white background */
    border-radius: 8px; /* Match container border-radius */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Add a subtle shadow */
}

.profile-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 960px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.profile-avatar { /* Changed from .avatar to .profile-avatar */
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Make it circular */
    object-fit: cover; /* Ensure image fills the circle */
    margin-right: 30px;
    border: 3px solid #007bff; /* Add a border */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}

.username {
    font-size: 2em;
    margin: 0;
}

.bio {
    font-size: 1.1em;
    color: #666;
}

.settings-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
}

.settings-btn:hover {
    background-color: #f4f4f4;
}

.profile-content h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.user-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.user-gallery img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop if necessary to fill the space */
    border-radius: 5px;
}

.profile-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px; /* Space between buttons */
}

.profile-actions .settings-button {
    /* Reuse existing settings-button styles or define new ones */
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    background-color: #f0f0f0;
    transition: background-color 0.2s;
}

.profile-actions .settings-button:hover {
    background-color: #e0e0e0;
}

/* Styles for favorite post author on my_favorites.html */
.favorite-post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.favorite-post-author a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #666;
}

.favorite-post-author a:hover {
    color: #007bff;
}

.favorite-post-author .author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
    border: 1px solid #eee;
}
