/* ============================================
   GAMESHARE™ - MODERN PROFILE PAGE STYLES
   Inspired by LinkedIn, GitHub, and Discord
   ============================================ */

/* Profile Page Container */
#profilePage {
    background: var(--bg-darker);
    min-height: 100vh;
    padding-bottom: 60px;
}

#profilePage .section {
    padding: 0;
}

#profilePage .container {
    max-width: 1200px;
    padding: 0;
}

/* ============================================
   COVER BANNER
   ============================================ */

.profile-banner {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: cover;
    background-position: center;
    border-radius: 0;
    overflow: hidden;
}

.profile-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.profile-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-banner-edit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.profile-banner-edit-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

/* ============================================
   PROFILE HEADER
   ============================================ */

.profile-header {
    position: relative;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px 20px 40px;
    margin-top: -80px;
    z-index: 3;
}

.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -60px;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid var(--bg-dark);
    object-fit: cover;
    background: var(--bg-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-avatar-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid var(--bg-dark);
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-avatar-edit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid var(--bg-dark);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-avatar-edit:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    padding-top: 20px;
    padding-bottom: 10px;
}

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

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

.profile-username {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-karma-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #fbbf24;
    margin-left: 8px;
}

.profile-karma-badge i {
    font-size: 18px;
}

.profile-badges-showcase {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.profile-badge-showcase-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    cursor: help;
}

.profile-badge-showcase-item:hover {
    transform: scale(1.15) rotate(5deg);
}

.profile-badge-showcase-item.common {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    border: 2px solid #616161;
    color: #fff;
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.4);
}

.profile-badge-showcase-item.rare {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border: 2px solid #1565c0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
}

.profile-badge-showcase-item.epic {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border: 2px solid #6a1b9a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.6);
}

.profile-badge-showcase-item.legendary {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: 2px solid #ff6f00;
    color: #000;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.7);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 6px 24px rgba(255, 215, 0, 0.9);
    }
}

.profile-bio {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 600px;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-meta-item i {
    color: var(--primary-color);
}

.profile-actions {
    display: flex;
    gap: 12px;
    padding-bottom: 10px;
}

.profile-action-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-action-btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.profile-action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.profile-action-btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.profile-action-btn-secondary:hover {
    background: var(--bg-darker);
    border-color: var(--primary-color);
}

/* ============================================
   PROFILE STATS GRID
   ============================================ */

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px 40px;
    background: var(--bg-darker);
}

.profile-stat-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
}

.profile-stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    color: white;
}

.profile-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   PROFILE CONTENT TABS
   ============================================ */

.profile-content {
    padding: 30px 40px;
    background: var(--bg-darker);
}

.profile-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.profile-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.profile-tab:hover {
    color: var(--text-primary);
}

.profile-tab.active {
    color: var(--primary-color);
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-magenta));
}

.profile-tab-content {
    display: none;
}

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

/* ============================================
   ACTIVITY FEED
   ============================================ */

.profile-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-activity-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.profile-activity-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.1);
}

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

.profile-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(217, 70, 239, 0.2));
    color: var(--primary-color);
}

.profile-activity-details {
    flex: 1;
}

.profile-activity-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-activity-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-activity-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-activity-image {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;
}

.profile-activity-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.profile-activity-image img:hover {
    transform: scale(1.02);
}

/* ============================================
   FOLLOWERS / FOLLOWING SECTION
   ============================================ */

.profile-followers-section {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.profile-followers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.profile-followers-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-followers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.profile-follower-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-follower-card:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.profile-follower-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-follower-info {
    flex: 1;
    overflow: hidden;
}

.profile-follower-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-follower-username {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.profile-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-dark);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

.profile-empty-icon {
    font-size: 64px;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 16px;
}

.profile-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-empty-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .profile-banner {
        height: 200px;
    }

    .profile-header {
        padding: 0 20px 20px 20px;
        margin-top: -60px;
    }

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

    .profile-avatar-wrapper {
        margin-top: -40px;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 120px;
        height: 120px;
    }

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

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

    .profile-name-row {
        flex-wrap: wrap;
        padding-right: 10px;
    }

    .profile-karma-badge {
        margin-left: 0;
        margin-right: 10px;
    }

    .profile-actions {
        width: 100%;
        flex-direction: column;
    }

    .profile-action-btn {
        width: 100%;
        justify-content: center;
    }

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

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

    .profile-stat-value {
        font-size: 24px;
    }

    .profile-content {
        padding: 20px;
    }

    .profile-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .profile-tab {
        padding: 10px 14px;
        font-size: 13px;
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .profile-tab i {
        display: block;
        margin-bottom: 4px;
        font-size: 16px;
    }

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

@media (max-width: 480px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }

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