/* استایل آواتارهای دوستان */
.friend-avatar-circle {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
}

.friend-avatar-circle:hover {
    transform: translateY(-5px);
}

.friend-avatar-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple);
    box-shadow: 0 5px 15px rgba(108, 64, 197, 0.3);
    margin-bottom: 8px;
}

.friend-avatar-initials {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 3px solid var(--accent-purple);
    margin-bottom: 8px;
}

.friend-avatar-name {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.friend-transaction-info {
    position: absolute;
    top: -10px;
    right: -5px;
    background: var(--accent-purple);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    border: 2px solid var(--primary-dark);
}

.friend-transaction-info.positive {
    background: #4CD964;
}

.friend-transaction-info.negative {
    background: #FF3B30;
}

/* مودال نمایش اطلاعات دوست */
.friend-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.friend-info-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.friend-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.friend-modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-purple);
}

.friend-modal-details h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.friend-modal-details p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.summary-label {
    color: var(--text-gray);
}

.summary-value {
    font-weight: 600;
}

.summary-value.positive {
    color: #4CD964;
}

.summary-value.negative {
    color: #FF3B30;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.friend-avatar-circle {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
}

.friend-avatar-circle:hover {
    transform: translateY(-5px);
}

.friend-avatar-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple);
    box-shadow: 0 5px 15px rgba(108, 64, 197, 0.3);
    margin-bottom: 8px;
}

.friend-avatar-initials {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 3px solid var(--accent-purple);
    margin-bottom: 8px;
}

.friend-avatar-name {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.friend-transaction-info {
    position: absolute;
    top: -10px;
    right: -5px;
    background: var(--accent-purple);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    border: 2px solid var(--primary-dark);
    min-width: 30px;
    text-align: center;
}

.friend-transaction-info.positive {
    background: #4CD964;
}

.friend-transaction-info.negative {
    background: #FF3B30;
}

/* Friend Info Modal */
.friend-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.friend-info-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.friend-avatar-circle {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
}

.friend-avatar-circle:hover {
    transform: translateY(-5px);
}

.friend-avatar-circle:hover .friend-avatar-img,
.friend-avatar-circle:hover .friend-avatar-initials {
    border-color: var(--accent-pink);
    box-shadow: 0 8px 25px rgba(108, 64, 197, 0.4);
}

.friend-avatar-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-purple);
    box-shadow: 0 5px 15px rgba(108, 64, 197, 0.3);
    margin-bottom: 8px;
    transition: var(--transition);
}

.friend-avatar-initials {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 3px solid var(--accent-purple);
    margin-bottom: 8px;
    transition: var(--transition);
}

.friend-avatar-name {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    font-weight: 500;
}

.friend-transaction-info {
    position: absolute;
    top: -8px;
    right: -5px;
    background: var(--accent-purple);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    border: 2px solid var(--primary-dark);
    min-width: 25px;
    text-align: center;
    z-index: 1;
}

.friend-transaction-info.positive {
    background: #4CD964;
}

.friend-transaction-info.negative {
    background: #FF3B30;
}

.friend-transaction-count {
    position: absolute;
    bottom: 25px;
    right: -5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.view-all-btn .view-all-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: var(--transition);
}

.view-all-btn:hover .view-all-circle {
    background: rgba(108, 64, 197, 0.1);
    border-color: var(--accent-purple);
    transform: rotate(90deg);
}

.view-all-btn .view-all-circle i {
    font-size: 1.5rem;
    color: var(--text-gray);
}

/* Friend Info Modal */
.friend-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.friend-info-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    position: relative;
}

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

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #FF3B30;
    color: #FF3B30;
    transform: rotate(90deg);
}

/* Loading and Error States */
.loading-friends,
.no-friends,
.friends-error {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.loading-friends i,
.no-friends i,
.friends-error i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.no-friends i {
    opacity: 0.5;
}

.friends-error i {
    color: #FF3B30;
}

.no-friends h3,
.friends-error h3 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.no-friends p,
.friends-error p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .friends-avatar-container {
        gap: 15px;
    }
    
    .friend-avatar-img,
    .friend-avatar-initials {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }
    
    .friend-avatar-name {
        font-size: 0.75rem;
        max-width: 70px;
    }
    
    .view-all-btn .view-all-circle {
        width: 60px;
        height: 60px;
    }
    
    .friend-info-content {
        padding: 20px;
        margin: 10px;
    }
    
    .friend-modal-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .friend-modal-details h3 {
        font-size: 1.3rem;
    }
}


