/* Profile Page - Instagram-like Layout */
/* Adapted to ProShapeHub brand colors */

:root {
    --primary-color: #3fdf89;
    --primary-hover: #5f63e6;
    --background-dark: #161616;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --border-color: #2b2b2b;
}

body {
    background-color: var(--background-dark);
    color: var(--text-primary);
}

.profile-container {
    min-height: 100vh;
    background-color: var(--background-dark);
    padding-bottom: 60px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Profile Header */
.profile-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.profile-cover-wrapper {
    width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2b2b2b;
    overflow: hidden;
    position: relative;
}

.profile-cover-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(20px);
    transform: scale(1.1);
    z-index: 1;
}

.profile-cover {
    max-width: 800px;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
}

.profile-info-container {
    padding: 30px 0;
}

.profile-avatar-col {
    display: flex;
    align-items: flex-start;
}

.profile-avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    object-fit: cover;
}

.profile-info-col {
    flex: 1;
    min-width: 0;
}

/* Profile Info */
.profile-info {
    padding: 0;
}

.profile-displayname-row {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-display-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.profile-username-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.profile-username {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.verified-badge {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.btn-follow,
.btn-following,
.btn-edit-profile {
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-follow {
    background-color: var(--primary-color);
    color: white;
}

.btn-follow:hover {
    background-color: var(--primary-hover);
}

.btn-following {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-following:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-edit-profile {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    display: inline-block;
}

.btn-edit-profile:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Stats */
.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 16px;
}

.stat {
    display: flex;
    gap: 5px;
}

.stat-count {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
}

/* Personal Info */
.profile-personal-info {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.personal-info-item {
    display: flex;
    gap: 6px;
    font-size: 14px;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
}

/* Bio */
.profile-bio {
    margin-top: 0;
}

.profile-bio-text {
    font-size: 14px;
    line-height: 1;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

/* Bio Links */
.bio-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.bio-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.bio-mention {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.bio-mention:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.bio-hashtag {
    color: var(--primary-color);
    font-weight: 500;
}

/* Posts Section */
.posts-section {
    margin-top: 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 20px;
}

.post-item {
    position: relative;
    padding-bottom: 100%;
    background-size: cover;
    background-position: center;
    background-color: #2b2b2b;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.post-item:hover .post-overlay {
    opacity: 1;
}

.post-stats {
    display: flex;
    gap: 20px;
    color: white;
    font-weight: 600;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-posts-icon {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-posts p {
    font-size: 14px;
}

/* Login Modal (reused from socialmedia.css) */
.login-modal-container {
    background-color: var(--card-bg);
    left: 0;
    right: 0;
    height: 150px;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 0;
    box-shadow: -1px -6px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.login-modal-container img {
    width: 120px;
    height: 120px;
    margin-right: 84px !important;
    pointer-events: none;
}

.login-modal-title {
    font-size: x-large;
}

.login-modal-footer {
    color: gray;
    font-size: x-small;
}

.login-modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-modal-footer a:hover {
    text-decoration: underline;
}

.login-modal-container button {
    width: 160px;
    height: 34px;
    background-color: var(--primary-color);
    border: none;
    color: white;
}

.login-modal-container button:hover {
    background-color: var(--primary-hover);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .profile-cover-wrapper {
        height: 250px;
    }

    .profile-avatar-wrapper {
        width: 80px;
        height: 80px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        border: 3px solid var(--card-bg);
    }

    .profile-avatar-col {
        padding-right: 15px;
    }

    .profile-display-name {
        font-size: 16px;
    }

    .profile-username {
        font-size: 20px;
    }

    .verified-badge {
        width: 14px;
        height: 14px;
    }

    .profile-stats {
        gap: 15px;
    }

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

    .stat-count {
        font-size: 14px;
    }

    .stat-label {
        font-size: 12px;
    }

    .profile-personal-info {
        gap: 16px;
    }

    .personal-info-item {
        font-size: 13px;
    }

    .posts-grid {
        gap: 2px;
    }

    .login-modal-container {
        height: 220px;
    }

    .login-modal-container img {
        width: 60px;
        height: 60px;
        margin: auto !important;
    }

    .login-modal-container .row {
        padding: 0 16px;
    }

    .login-modal-title {
        font-size: large;
        text-align: center;
    }

    .login-modal-message {
        text-align: center;
    }

    .login-modal-footer {
        text-align: center;
    }
}

@media screen and (max-width: 576px) {
    .profile-cover-wrapper {
        height: 200px;
    }

    .profile-info-container {
        padding: 20px 15px;
    }

    .profile-username {
        font-size: 18px;
    }

    .profile-display-name {
        font-size: 14px;
    }

    .profile-stats {
        gap: 12px;
        font-size: 13px;
    }

    .stat-count {
        font-size: 13px;
    }

    .stat-label {
        font-size: 11px;
    }

    .posts-grid {
        gap: 1px;
    }

    .profile-username-row {
        gap: 8px;
        margin-bottom: 8px;
    }

    .btn-follow,
    .btn-following,
    .btn-edit-profile {
        padding: 5px 12px;
        font-size: 12px;
    }

    .profile-personal-info {
        flex-direction: column;
        gap: 8px;
    }

    .personal-info-item {
        font-size: 12px;
    }
}

/* Tablet specific adjustments */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .profile-cover-wrapper {
        height: 350px;
    }

    .profile-avatar-wrapper {
        width: 130px;
        height: 130px;
    }

    .profile-avatar {
        width: 130px;
        height: 130px;
    }

    .profile-username {
        font-size: 22px;
    }

    .profile-display-name {
        font-size: 18px;
    }
}

/* Large screens */
@media screen and (min-width: 1200px) {
    .profile-info-container .container {
        max-width: 935px;
    }

    .posts-section .container {
        max-width: 935px;
    }
}
