/* ============================================================
   PROFIL PAGE – SimsUnivers
   ============================================================ */

/* --- Cover / Banner --- */
.profile-cover {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #E6007E 0%, #f472b6 40%, #ec4899 70%, #E6007E 100%);
}

/* Abstract blobs on the cover */
.profile-cover::before,
.profile-cover::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .35;
    pointer-events: none;
}

.profile-cover::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #f9a8d4 0%, transparent 70%);
    top: -100px;
    left: 15%;
}

.profile-cover::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f472b6 0%, transparent 70%);
    bottom: -160px;
    right: 5%;
}

/* Extra decorative blobs via inner element */
.profile-cover-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.profile-cover-blobs span {
    position: absolute;
    border-radius: 50%;
    opacity: .25;
}

.profile-cover-blobs span:nth-child(1) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #f9a8d4, transparent 70%);
    top: 30%;
    left: 40%;
}

.profile-cover-blobs span:nth-child(2) {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #c5006a, transparent 70%);
    top: -30px;
    right: 20%;
}

.profile-cover-blobs span:nth-child(3) {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #e879a8, transparent 65%);
    bottom: -80px;
    left: -5%;
}

/* Cover image (if user has one) */
.profile-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* --- Social icons floating on cover --- */
.profile-cover-socials {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 14, 20, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 6px 12px;
}

.profile-cover-socials a {
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1;
    opacity: .85;
    transition: opacity .2s, color .2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.profile-cover-socials a:hover {
    opacity: 1;
    color: var(--primary);
}

/* --- Profile header (avatar + name + actions) --- */
.profile-header {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -50px;
    padding: 0 8px;
    z-index: 10;
    flex-wrap: wrap;
    gap: 16px;
}

.profile-header-left {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

/* Avatar */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg);
    background: var(--bg-card);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Username area */
.profile-identity {
    padding-bottom: 8px;
}

.profile-username {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-username .badge-staff {
    font-size: .7rem;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.profile-username .badge-super {
    color: var(--primary);
    font-size: 1.1rem;
}

.profile-handle {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Action buttons --- */
.profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Gabarito', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
    line-height: 1;
}

.btn-profile:hover {
    transform: translateY(-1px);
}

.btn-profile:active {
    transform: translateY(0);
}

.btn-profile i {
    font-size: 1.1rem;
}

/* Subscribe / S'abonner */
.btn-subscribe {
    background: linear-gradient(135deg, #E6007E, #ff3d9a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(230, 0, 126, .35);
}

.btn-subscribe:hover {
    background: linear-gradient(135deg, #c5006a, #E6007E);
    box-shadow: 0 6px 22px rgba(230, 0, 126, .45);
}

/* Message */
.btn-message {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-message:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* More (three dots) */
.btn-more {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 10px;
}

.btn-more:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Profile navigation tabs --- */
.profile-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 28px;
    border-bottom: 1px solid var(--border);
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.profile-nav::-webkit-scrollbar {
    display: none;
}

.profile-nav-link {
    font-family: 'Gabarito', sans-serif;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 18px;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}

.profile-nav-link:hover {
    color: var(--text);
}

.profile-nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.profile-nav-count {
    font-size: .78rem;
    color: var(--text-muted);
    margin-left: 4px;
    font-weight: 400;
}

/* --- Profile content area --- */
.profile-content {
    margin-top: 24px;
    padding: 0 8px;
}

/* --- Bio / About section --- */
.profile-about {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}

.profile-about-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-about-title i {
    color: var(--primary);
}

.profile-about-text {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.profile-about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.profile-about-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--text-muted);
}

.profile-about-meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

/* --- Stats row --- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.profile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: border-color .2s, transform .15s;
}

.profile-stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.profile-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.profile-stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* --- Games section --- */
.profile-games {
    margin-top: 20px;
}

.profile-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title i {
    color: var(--primary);
    font-size: 1.15rem;
}

.profile-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.profile-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}

.profile-game-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 0, 126, .12);
}

.profile-game-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.profile-game-info {
    padding: 14px;
}

.profile-game-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.profile-game-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .8rem;
    color: var(--text-muted);
}

.profile-game-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-game-details i {
    font-size: .9rem;
    color: var(--primary);
}

/* --- Activity / Recent activity section --- */
.profile-activity {
    margin-top: 20px;
}

.profile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    transition: border-color .2s;
}

.profile-activity-item:hover {
    border-color: var(--primary);
}

.profile-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(230, 0, 126, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-activity-icon i {
    color: var(--primary);
    font-size: 1.15rem;
}

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

.profile-activity-text {
    font-size: .88rem;
    color: var(--text);
    font-weight: 500;
}

.profile-activity-text strong {
    color: var(--primary);
    font-weight: 700;
}

.profile-activity-time {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Two-column layout --- */
/* .profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
} */

/* --- Tab panels show/hide --- */
.profile-tab-panel {
    display: none;
    animation: profileFadeIn .3s ease;
}

.profile-tab-panel.active {
    display: block;
}

@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Game status badge (tab Jeux) --- */
.profile-game-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 8px;
}

.profile-game-status.online {
    color: #22c55e;
    background: rgba(34, 197, 94, .1);
}

.profile-game-status.offline {
    color: var(--text-muted);
    background: rgba(255, 255, 255, .04);
}

.profile-game-status i {
    font-size: .7rem;
}

/* --- User cards grid (Abonnés / Abonnements) --- */
.profile-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.profile-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    transition: border-color .2s, transform .15s;
}

.profile-user-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* User avatar with online indicator */
.profile-user-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
}

.profile-user-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-user-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.profile-user-status.online {
    background: #22c55e;
}

.profile-user-status.offline {
    background: #6b7280;
}

/* User info */
.profile-user-info {
    flex: 1;
    min-width: 0;
}

.profile-user-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-user-handle {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Follow button (small) */
.btn-follow-sm {
    font-size: .78rem;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(230, 0, 126, .12);
    color: var(--primary);
    border: 1px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}

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

.btn-follow-sm.btn-following {
    background: var(--bg-hover);
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-follow-sm.btn-following:hover {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, .3);
}

/* --- Responsive --- */
@media (max-width: 1000px) {
    /* .profile-grid {
        grid-template-columns: 1fr;
    } */

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-cover {
        height: 200px;
        border-radius: 12px;
    }

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

    .profile-header {
        margin-top: -40px;
    }

    .profile-username {
        font-size: 1.25rem;
    }

    .profile-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-profile {
        padding: 9px 16px;
        font-size: .85rem;
    }

    .profile-about {
        padding: 18px;
    }

    .profile-nav-link {
        padding: 10px 14px;
        font-size: .85rem;
    }
}

@media (max-width: 576px) {
    .profile-cover {
        height: 160px;
        border-radius: 10px;
    }

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

    .profile-header {
        margin-top: -35px;
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .profile-identity {
        padding-bottom: 0;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .profile-stat-card {
        padding: 14px;
    }

    .profile-stat-value {
        font-size: 1.3rem;
    }

    .profile-games-grid {
        grid-template-columns: 1fr;
    }

    .profile-users-grid {
        grid-template-columns: 1fr;
    }

    .profile-cover-socials {
        bottom: 10px;
        right: 10px;
        padding: 4px 8px;
        gap: 4px;
    }

    .profile-cover-socials a {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
}
