/* static/user_profile.css */
.user-profile-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.error {
    text-align: center;
    color: #ff5555;
    font-size: 1.2em;
}

.user-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-info {
    flex-grow: 1;
}

.user-info h2 {
    margin: 0;
    font-size: 1.8em;
    color: #50c878;
    display: flex;
    align-items: center;
}

.user-info h2 img.badge {
    height: 1em;
    margin-left: 5px;
}

.user-stats p {
    margin: 5px 0;
    color: #cccccc;
}

.profile-actions {
    margin-top: 10px;
}

.profile-actions .btn {
    background: #50c878;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.profile-actions .btn:hover {
    background: #3da660;
}

.tabs {
    margin: 15px 0;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
}

.tabs a {
    margin-right: 20px;
    text-decoration: none;
    color: #50c878;
    font-size: 1.1em;
    padding-bottom: 5px;
}

.tabs a.active {
    color: #fff;
    border-bottom: 2px solid #50c878;
}

.search-bar {
    margin: 15px 0;
}

.search-bar form {
    display: flex;
    align-items: center;
}

.search-bar input {
    flex-grow: 1;
    padding: 8px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #f0f0f0;
    border-radius: 4px 0 0 4px;
}

.search-bar .search-btn {
    padding: 8px;
    background: #50c878;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-bar .search-btn img {
    width: 20px;
    height: 20px;
}

.search-bar .search-btn:hover {
    background: #3da660;
}

.sort-options {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
}

.sort-options a {
    margin-right: 20px;
    text-decoration: none;
    color: #50c878;
}

.sort-options a.active {
    color: #fff;
    font-weight: bold;
}

.items-list {
    margin: 20px 0;
}

.post-item, .comment-item {
    display: flex;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 4px;
    margin-bottom: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
}

.vote-arrow {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.vote-arrow img {
    width: 20px;
    height: 20px;
}

.vote-arrow.voted img {
    display: none;
}

.vote-arrow.voted.upvoted img {
    display: block;
}

.vote-arrow.voted.downvoted img {
    display: block;
}

.vote-section span {
    margin: 5px 0;
    font-weight: bold;
}

.post-content, .comment-content {
    flex-grow: 1;
}

.post-content h3 {
    margin: 0 0 5px;
    font-size: 1.2em;
}

.post-content h3 a {
    color: #50c878;
    text-decoration: none;
}

.post-content h3 a:hover {
    text-decoration: underline;
}

.post-content p, .comment-content p {
    margin: 5px 0;
    color: #cccccc;
}

.post-content p a, .comment-content p a {
    color: #50c878;
    text-decoration: none;
}

.post-content p a:hover, .comment-content p a:hover {
    text-decoration: underline;
}

.post-content .badge, .comment-content .badge {
    height: 1em;
    margin-left: 5px;
    vertical-align: middle;
}

.comment-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
}

.comment-box {
    background: #3a3a3a;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    color: #f0f0f0;
}

.report-link {
    color: #ff5555;
    text-decoration: none;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

.report-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex; /* Removed justify-content: flex-end */
    justify-content: center; /* Centered alignment to match index.css */
    margin-top: 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    background: #50c878;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
}

.pagination-btn:hover {
    background: #3da660;
}

.pagination-btn.disabled {
    background: #3a3a3a;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-numbers a {
    padding: 5px 10px;
    color: #50c878;
    text-decoration: none;
    border-radius: 4px;
}

.page-numbers a.active {
    background: #50c878;
    color: #fff;
}

.page-numbers a:hover:not(.active) {
    background: #2a2a2a;
}

.page-numbers span {
    padding: 5px 10px;
    color: #cccccc;
}

.no-items-message {
    text-align: center;
    color: #cccccc;
    font-size: 1.2em;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .user-profile-container {
        padding: 10px;
    }

    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-pic {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .user-info h2 {
        font-size: 1.5em;
    }

    .user-stats p {
        font-size: 0.9em;
    }

    .profile-actions .btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .tabs a {
        margin-right: 15px;
        font-size: 1em;
    }

    .search-bar input {
        padding: 6px;
        font-size: 0.9em;
    }

    .search-bar .search-btn img {
        width: 16px;
        height: 16px;
    }

    .sort-options a {
        margin-right: 15px;
        font-size: 0.9em;
    }

    .post-item, .comment-item {
        flex-direction: column;
        padding: 10px;
    }

    .vote-section {
        flex-direction: row;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .vote-section span {
        margin: 0 10px;
    }

    .vote-arrow img {
        width: 16px;
        height: 16px;
    }

    .post-content h3 {
        font-size: 1.1em;
    }

    .post-content p, .comment-content p {
        font-size: 0.9em;
    }

    .comment-icon {
        width: 16px;
        height: 16px;
    }

    .comment-box {
        padding: 8px;
        font-size: 0.9em;
    }

    .pagination-controls {
        gap: 5px;
    }

    .pagination-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .page-numbers a, .page-numbers span {
        padding: 3px 8px;
        font-size: 0.9em;
    }
}
